mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibJS/Bytecode: Rename emit_function_body_bytecode() -> compile()
This function isn't really one of the "emit_foo" family -- it's the main compilation driver!
This commit is contained in:
parent
3b56be61dc
commit
59c2637fdc
Notes:
sideshowbarker
2024-07-17 04:03:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/59c2637fdc Pull-request: https://github.com/SerenityOS/serenity/pull/24504
@ -197,7 +197,7 @@ CodeGenerationErrorOr<void> Generator::emit_function_declaration_instantiation(E
|
||||
return {};
|
||||
}
|
||||
|
||||
CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::emit_function_body_bytecode(VM& vm, ASTNode const& node, FunctionKind enclosing_function_kind, GCPtr<ECMAScriptFunctionObject const> function, MustPropagateCompletion must_propagate_completion)
|
||||
CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::compile(VM& vm, ASTNode const& node, FunctionKind enclosing_function_kind, GCPtr<ECMAScriptFunctionObject const> function, MustPropagateCompletion must_propagate_completion)
|
||||
{
|
||||
Generator generator(vm, must_propagate_completion);
|
||||
|
||||
@ -431,12 +431,12 @@ CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::emit_function_body_by
|
||||
|
||||
CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::generate_from_ast_node(VM& vm, ASTNode const& node, FunctionKind enclosing_function_kind)
|
||||
{
|
||||
return emit_function_body_bytecode(vm, node, enclosing_function_kind, {});
|
||||
return compile(vm, node, enclosing_function_kind, {});
|
||||
}
|
||||
|
||||
CodeGenerationErrorOr<NonnullGCPtr<Executable>> Generator::generate_from_function(VM& vm, ECMAScriptFunctionObject const& function)
|
||||
{
|
||||
return emit_function_body_bytecode(vm, function.ecmascript_code(), function.kind(), &function, MustPropagateCompletion::No);
|
||||
return compile(vm, function.ecmascript_code(), function.kind(), &function, MustPropagateCompletion::No);
|
||||
}
|
||||
|
||||
void Generator::grow(size_t additional_size)
|
||||
|
@ -344,7 +344,7 @@ public:
|
||||
private:
|
||||
VM& m_vm;
|
||||
|
||||
static CodeGenerationErrorOr<NonnullGCPtr<Executable>> emit_function_body_bytecode(VM&, ASTNode const&, FunctionKind, GCPtr<ECMAScriptFunctionObject const>, MustPropagateCompletion = MustPropagateCompletion::Yes);
|
||||
static CodeGenerationErrorOr<NonnullGCPtr<Executable>> compile(VM&, ASTNode const&, FunctionKind, GCPtr<ECMAScriptFunctionObject const>, MustPropagateCompletion = MustPropagateCompletion::Yes);
|
||||
|
||||
enum class JumpType {
|
||||
Continue,
|
||||
|
Loading…
Reference in New Issue
Block a user