1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 14:07:45 +00:00

LibJS: Capture UnrealizedSourceRanges in ExecutionContext, not ASTNodes

This loosens the connection to the AST interpreter and will allow us to
generate SourceRanges for the Bytecode interpreter in the future as well

Moves UnrealizedSourceRanges from TracebackFrame to the JS namespace for
this
This commit is contained in:
Hediadyoin1 2023-07-27 14:40:01 +02:00 committed by Andreas Kling
parent cd9bb985d4
commit 50bf303edd
11 changed files with 33 additions and 32 deletions

View file

@ -15,6 +15,7 @@
#include <LibJS/Module.h>
#include <LibJS/Runtime/PrivateEnvironment.h>
#include <LibJS/Runtime/Value.h>
#include <LibJS/SourceRange.h>
namespace JS {
@ -42,7 +43,7 @@ public:
// Non-standard: This points at something that owns this ExecutionContext, in case it needs to be protected from GC.
GCPtr<Cell> context_owner;
ASTNode const* current_node { nullptr };
UnrealizedSourceRange source_range;
DeprecatedFlyString function_name;
Value this_value;
MarkedVector<Value> arguments;