mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibJS: Allow direct index-based initialization of a declarative binding
Similar to the direct getter and setter in DeclarativeEnvironment, there are cases where we already know the index of a binding and can avoid a O(n) lookup to re-find that index.
This commit is contained in:
parent
533170fbfa
commit
435f49d98e
2 changed files with 9 additions and 2 deletions
|
@ -45,6 +45,7 @@ public:
|
|||
return names;
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> initialize_binding_direct(GlobalObject&, size_t index, Value);
|
||||
ThrowCompletionOr<Value> get_binding_value_direct(GlobalObject&, size_t index, bool strict);
|
||||
ThrowCompletionOr<void> set_mutable_binding_direct(GlobalObject&, size_t index, Value, bool strict);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue