From d9fcce2219fc57a1c040d54cdf33afaaa795ca12 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 17 Jul 2024 15:11:05 +0200 Subject: [PATCH] src: expose LookupAndCompile with parameters --- src/node_builtins.cc | 8 ++++++++ src/node_builtins.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 1702ac0ac5332e..97dde02295c975 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -489,6 +489,14 @@ MaybeLocal BuiltinLoader::CompileAndCall(Local context, return fn->Call(context, undefined, argc, argv); } +MaybeLocal BuiltinLoader::LookupAndCompile( + Local context, + const char* id, + std::vector>* parameters, + Realm* optional_realm) { + return LookupAndCompileInternal(context, id, parameters, optional_realm); +} + bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache( Local context, const std::vector& eager_builtins, diff --git a/src/node_builtins.h b/src/node_builtins.h index 75a7f3dd89e096..1cb85b9058d065 100644 --- a/src/node_builtins.h +++ b/src/node_builtins.h @@ -97,6 +97,12 @@ class NODE_EXTERN_PRIVATE BuiltinLoader { const char* id, Realm* optional_realm); + v8::MaybeLocal LookupAndCompile( + v8::Local context, + const char* id, + std::vector>* parameters, + Realm* optional_realm); + v8::MaybeLocal CompileAndCall(v8::Local context, const char* id, int argc,