ladybird/Tests/LibJS/Bytecode/expected/class-environment.txt
Andreas Kling 4046f65ae7 LibJS: Treat class definition parts as strict
Record the generator's strictness for each emitted bytecode
instruction, instead of applying the executable's final strictness to
every instruction during assembly. This lets class heritage and
computed element names run with strict assignment semantics inside
sloppy scripts.

Also create the class self-binding as a strict immutable binding,
matching ClassDefinitionEvaluation, and cover strict class heritage and
computed names in the runtime tests.
2026-05-22 01:56:57 +02:00

56 lines
1.5 KiB
Text

$9d326325 class-environment.js:9:1
Registers: 10
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] GetGlobal dst:reg6, `console`
[ 10] GetById dst:reg7, base:reg6, `log` (console.log)
[ 28] GetGlobal dst:reg9, `classWithName`
[ 38] Call dst:reg8, callee:reg9, this_value:Undefined, classWithName
[ 58] Call dst:reg5, callee:reg7, this_value:reg6, console.log, arguments:[reg8]
[ 80] End value:reg5
classWithName$155d62f1 class-environment.js:2:13
Registers: 8
Blocks: 1
Locals: C~0
Constants:
[0] = String("method")
[1] = Undefined
block0:
[ 0] GetLexicalEnvironment dst:reg4
[ 8] CreateLexicalEnvironment dst:reg5, parent:reg4, capacity:0, is_catch_environment:false
[ 20] CreateVariable `Foo`, is_immutable:true, is_global:false, is_strict:true
[ 30] SetLexicalEnvironment environment:reg4
[ 38] NewClass dst:C~0, class_environment:reg5, class_blueprint_index:0, element_keys:[element_keys:String("method")]
[ 60] CallConstruct dst:reg6, callee:C~0, C
[ 78] GetById dst:reg7, base:reg6, `method`
[ 90] Call dst:reg5, callee:reg7, this_value:reg6, <object>.method
[ b0] StrictlyEquals dst:reg7, lhs:reg5, rhs:C~0
[ c0] Return value:reg7
Foo$534d924b
Registers: 5
Blocks: 1
Constants:
[0] = Undefined
block0:
[ 0] End value:Undefined
method$67eb02f3 class-environment.js:4:13
Registers: 6
Blocks: 1
block0:
[ 0] DynamicGetBinding dst:reg5, `Foo`
[ 10] Return value:reg5
true