mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibJS: Make native function/property callbacks take VM, not Interpreter
More work on decoupling the general runtime from Interpreter. The goal is becoming clearer. Interpreter should be one possible way to execute code inside a VM. In the future we might have other ways :^)
This commit is contained in:
parent
1ff9d33131
commit
340a115dfe
64 changed files with 1160 additions and 1114 deletions
|
@ -40,14 +40,14 @@ public:
|
|||
Symbol,
|
||||
};
|
||||
|
||||
static PropertyName from_value(Interpreter& interpreter, Value value)
|
||||
static PropertyName from_value(GlobalObject& global_object, Value value)
|
||||
{
|
||||
if (value.is_symbol())
|
||||
return &value.as_symbol();
|
||||
if (value.is_number())
|
||||
return value.as_i32();
|
||||
if (!value.is_empty())
|
||||
return value.to_string(interpreter);
|
||||
return value.to_string(global_object);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue