Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: expose LookupAndCompile with parameters #53886

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/node_builtins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,14 @@ MaybeLocal<Value> BuiltinLoader::CompileAndCall(Local<Context> context,
return fn->Call(context, undefined, argc, argv);
}

MaybeLocal<Function> BuiltinLoader::LookupAndCompile(
Local<Context> context,
const char* id,
std::vector<Local<String>>* parameters,
Realm* optional_realm) {
return LookupAndCompileInternal(context, id, parameters, optional_realm);
}

bool BuiltinLoader::CompileAllBuiltinsAndCopyCodeCache(
Local<Context> context,
const std::vector<std::string>& eager_builtins,
Expand Down
6 changes: 6 additions & 0 deletions src/node_builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
const char* id,
Realm* optional_realm);

v8::MaybeLocal<v8::Function> LookupAndCompile(
v8::Local<v8::Context> context,
const char* id,
std::vector<v8::Local<v8::String>>* parameters,
Realm* optional_realm);

v8::MaybeLocal<v8::Value> CompileAndCall(v8::Local<v8::Context> context,
const char* id,
int argc,
Expand Down
Loading