Files
ladybird/Tests/LibJS/Bytecode/expected/var-binding-access.txt
Andreas Kling fdd7809bd1 Tests/LibJS: Add a big pile of AST, bytecode, and runtime tests
Created these while experimenting with LibJS. Might as well bring them
into the tree and increase our coverage.
2026-02-17 20:44:57 +01:00

26 lines
1.2 KiB
Plaintext

JS bytecode executable ""
[ 0] 0: GetLexicalEnvironment dst:reg4
[ 8] GetGlobal dst:reg6, identifier:var_access
[ 18] Call dst:reg5, callee:reg6, this_value:Undefined, var_access
[ 38] GetGlobal dst:reg7, identifier:let_access
[ 48] Call dst:reg6, callee:reg7, this_value:Undefined, let_access
[ 68] End value:reg6
JS bytecode executable "var_access"
[ 0] 0: GetLexicalEnvironment dst:reg4
[ 8] CreateVariable identifier:x, is_immutable:false, is_global:false, is_strict:false
[ 18] InitializeVariableBinding identifier:x, src:Undefined
[ 30] SetLexicalBinding identifier:x, src:Int32(1)
[ 48] NewFunction dst:reg5, shared_function_data_index:0
[ 60] GetInitializedBinding dst:reg5, identifier:x
[ 78] Return value:reg5
JS bytecode executable "let_access"
[ 0] 0: GetLexicalEnvironment dst:reg4
[ 8] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:1
[ 18] CreateVariable identifier:x, is_immutable:false, is_global:false, is_strict:false
[ 28] InitializeLexicalBinding identifier:x, src:Int32(1)
[ 40] NewFunction dst:reg6, shared_function_data_index:0
[ 58] GetBinding dst:reg6, identifier:x
[ 70] Return value:reg6