1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibJS: Update bytecode generator to use local variables

- Update ECMAScriptFunctionObject::function_declaration_instantiation
  to initialize local variables
- Introduce GetLocal, SetLocal, TypeofLocal that will be used to
  operate on local variables.
- Update bytecode generator to emit instructions for local variables
This commit is contained in:
Aliaksandr Kalenik 2023-07-05 02:17:10 +02:00 committed by Andreas Kling
parent 0daff637e2
commit ae3a7fd4b8
8 changed files with 170 additions and 37 deletions

View file

@ -41,6 +41,7 @@
O(GetObjectPropertyIterator) \
O(GetPrivateById) \
O(GetVariable) \
O(GetLocal) \
O(GreaterThan) \
O(GreaterThanEquals) \
O(HasPrivateId) \
@ -87,6 +88,7 @@
O(RightShift) \
O(ScheduleJump) \
O(SetVariable) \
O(SetLocal) \
O(Store) \
O(StrictlyEquals) \
O(StrictlyInequals) \
@ -98,6 +100,7 @@
O(ToNumeric) \
O(Typeof) \
O(TypeofVariable) \
O(TypeofLocal) \
O(UnaryMinus) \
O(UnaryPlus) \
O(UnsignedRightShift) \