mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Eliminate GeneratorResult GC cell allocation on yield/await
Store yield_continuation and yield_is_await directly in ExecutionContext instead of allocating a GeneratorResult GC cell. This removes a heap allocation per yield/await and fixes a latent bug where continuation addresses stored as doubles could lose precision.
This commit is contained in:
committed by
Andreas Kling
parent
9a34fb59aa
commit
1179e40d3f
Notes:
github-actions[bot]
2026-03-20 20:58:50 +00:00
Author: https://github.com/jdahlin Commit: https://github.com/LadybirdBrowser/ladybird/commit/1179e40d3f4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8457 Reviewed-by: https://github.com/awesomekling
@@ -34,9 +34,9 @@ public:
|
||||
ThrowCompletionOr<Value> run(Script&, GC::Ptr<Environment> lexical_environment_override = nullptr);
|
||||
ThrowCompletionOr<Value> run(SourceTextModule&);
|
||||
|
||||
ThrowCompletionOr<Value> run_executable(ExecutionContext&, Executable&, Optional<size_t> entry_point);
|
||||
ThrowCompletionOr<Value> run_executable(ExecutionContext&, Executable&, u32 entry_point = 0);
|
||||
|
||||
ThrowCompletionOr<Value> run_executable(ExecutionContext& context, Executable& executable, Optional<size_t> entry_point, Value initial_accumulator_value)
|
||||
ThrowCompletionOr<Value> run_executable(ExecutionContext& context, Executable& executable, u32 entry_point, Value initial_accumulator_value)
|
||||
{
|
||||
context.registers_and_constants_and_locals_and_arguments_span()[0] = initial_accumulator_value;
|
||||
return run_executable(context, executable, entry_point);
|
||||
|
||||
Reference in New Issue
Block a user