Skip to content

Truly independent web browser

LibJS: Drop lexical environment restores that change nothing

Aliaksandr Kalenikc417d9dec5f1
diff --git a/Libraries/LibJS/Rust/src/bytecode/generator.rs b/Libraries/LibJS/Rust/src/bytecode/generator.rs
index 72e432c0a56..9698c13e03a 100644
--- a/Libraries/LibJS/Rust/src/bytecode/generator.rs
+++ b/Libraries/LibJS/Rust/src/bytecode/generator.rs
@@ -1910,30 +1910,55 @@ impl Generator {
});
if let Some((load_block_index, load_instruction_index)) = synthetic_load {
- let saved_environment_is_used = self.basic_blocks.iter().enumerate().any(|(block_index, block)| {
- block
- .instructions
- .iter()
- .enumerate()
- .any(|(instruction_index, (instruction, _, _))| {
- if block_index == load_block_index && instruction_index == load_instruction_index {
- return false;
+ let is_restore_of_saved_environment = |instruction: &Instruction| {
+ matches!(
+ instruction,
+ Instruction::SetLexicalEnvironment { environment } if *environment == saved_environment
+ )
+ };
+ let mut saved_environment_is_only_restored = true;
+ let mut has_restores_of_saved_environment = false;
+ let mut changes_running_lexical_environment = false;
+ for (block_index, block) in self.basic_blocks.iter().enumerate() {
+ for (instruction_index, (instruction, _, _)) in block.instructions.iter().enumerate() {
+ if block_index == load_block_index && instruction_index == load_instruction_index {
+ continue;
+ }
+ if is_restore_of_saved_environment(instruction) {
+ has_restores_of_saved_environment = true;
+ continue;
+ }
+ // NB: These are the instructions whose interpreter handlers change the running lexical environment:
+ // SetLexicalEnvironment in interpreter.flap, and the slow paths in slow_paths/bindings.rs.
+ // Exception unwinding and generator resumption do not change it.
+ changes_running_lexical_environment |= matches!(
+ instruction,
+ Instruction::SetLexicalEnvironment { .. }
+ | Instruction::CreateLexicalEnvironment { .. }
+ | Instruction::CreateVariableEnvironment { .. }
+ | Instruction::EnterObjectEnvironment { .. }
+ );
+ let mut instruction = instruction.clone();
+ instruction.visit_operands(&mut |operand: &mut Operand| {
+ if *operand == saved_environment {
+ saved_environment_is_only_restored = false;
}
- let mut instruction = instruction.clone();
- let mut mentions_saved_environment = false;
- instruction.visit_operands(&mut |operand: &mut Operand| {
- if *operand == saved_environment {
- mentions_saved_environment = true;
- }
- });
- mentions_saved_environment
- })
- });
+ });
+ }
+ }
- if !saved_environment_is_used {
+ // NB: Restoring an environment that no instruction changes does nothing.
+ if saved_environment_is_only_restored
+ && (!has_restores_of_saved_environment || !changes_running_lexical_environment)
+ {
self.basic_blocks[load_block_index]
.instructions
.remove(load_instruction_index);
+ for block in &mut self.basic_blocks {
+ block
+ .instructions
+ .retain(|(instruction, _, _)| !is_restore_of_saved_environment(instruction));
+ }
}
}
diff --git a/Tests/LibJS/Bytecode/expected/catch-scope-boundary.txt b/Tests/LibJS/Bytecode/expected/catch-scope-boundary.txt
index bc19202f6b5..90e260b05a8 100644
--- a/Tests/LibJS/Bytecode/expected/catch-scope-boundary.txt
+++ b/Tests/LibJS/Bytecode/expected/catch-scope-boundary.txt
@@ -19,7 +19,7 @@ block0:
[ 108] End value:reg7
-throwInCatch$1622cfce catch-scope-boundary.js:2:5
+throwInCatch$9784c856 catch-scope-boundary.js:2:5
Registers: 7
Blocks: 6
Locals: e2~0, e~1, result~2
@@ -31,37 +31,34 @@ throwInCatch$1622cfce catch-scope-boundary.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:result~2, src:String("bad")
- [ 20] Jump target:block5
+ [ 8] Mov dst:result~2, src:String("bad")
+ [ 18] Jump target:block5
block1:
- [ 28] Catch value_feedback:0, dst:reg5
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov dst:e~1, src:reg5
- [ 48] Jump target:block3
+ [ 20] Catch value_feedback:0, dst:reg5
+ [ 28] Mov dst:e~1, src:reg5
+ [ 38] Jump target:block3
block2:
- [ 50] Catch value_feedback:1, dst:reg6
- [ 58] SetLexicalEnvironment environment:reg4
- [ 60] Mov2 c0_dst:e2~0, c0_src:reg6, c1_dst:result~2, c1_src:String("good")
- [ 78] Return value:result~2
+ [ 40] Catch value_feedback:1, dst:reg6
+ [ 48] Mov2 c0_dst:e2~0, c0_src:reg6, c1_dst:result~2, c1_src:String("good")
+ [ 60] Return value:result~2
block3:
- [ 80] Throw src:Int32(2)
+ [ 68] Throw src:Int32(2)
block4:
- [ 88] Return value:result~2
+ [ 70] Return value:result~2
block5:
- [ 90] Throw src:Int32(1)
+ [ 78] Throw src:Int32(1)
Exception handlers:
- [ 80 .. 88] => handler block2
- [ 90 .. 98] => handler block1
+ [ 68 .. 70] => handler block2
+ [ 78 .. 80] => handler block1
-throwInCatchWithLocals$b44ee161 catch-scope-boundary.js:17:5
+throwInCatchWithLocals$32ece8d9 catch-scope-boundary.js:17:5
Registers: 9
Blocks: 5
Locals: inner~0, catchLocal~1, e~2, outerVar~3
@@ -74,36 +71,33 @@ throwInCatchWithLocals$b44ee161 catch-scope-boundary.js:17:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:outerVar~3, src:String("outer")
- [ 20] Jump target:block4
+ [ 8] Mov dst:outerVar~3, src:String("outer")
+ [ 18] Jump target:block4
block1:
- [ 28] Catch value_feedback:0, dst:reg5
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov dst:e~2, src:reg5
- [ 48] Add arith_feedback:0, dst:catchLocal~1, lhs:String("local:"), rhs:e~2
- [ 58] Jump target:block3
+ [ 20] Catch value_feedback:0, dst:reg5
+ [ 28] Mov dst:e~2, src:reg5
+ [ 38] Add arith_feedback:0, dst:catchLocal~1, lhs:String("local:"), rhs:e~2
+ [ 48] Jump target:block3
block2:
- [ 60] Catch value_feedback:1, dst:reg6
- [ 68] SetLexicalEnvironment environment:reg4
- [ 70] Mov dst:inner~0, src:reg6
- [ 80] Add arith_feedback:1, dst:reg7, lhs:outerVar~3, rhs:String(",")
- [ 90] Add arith_feedback:2, dst:reg8, lhs:reg7, rhs:catchLocal~1
- [ a0] Add arith_feedback:3, dst:reg7, lhs:reg8, rhs:String(",")
- [ b0] Add arith_feedback:4, dst:reg8, lhs:reg7, rhs:inner~0
- [ c0] Return value:reg8
+ [ 50] Catch value_feedback:1, dst:reg6
+ [ 58] Mov dst:inner~0, src:reg6
+ [ 68] Add arith_feedback:1, dst:reg7, lhs:outerVar~3, rhs:String(",")
+ [ 78] Add arith_feedback:2, dst:reg8, lhs:reg7, rhs:catchLocal~1
+ [ 88] Add arith_feedback:3, dst:reg7, lhs:reg8, rhs:String(",")
+ [ 98] Add arith_feedback:4, dst:reg8, lhs:reg7, rhs:inner~0
+ [ a8] Return value:reg8
block3:
- [ c8] Throw src:String("second")
+ [ b0] Throw src:String("second")
block4:
- [ d0] Throw src:String("first")
+ [ b8] Throw src:String("first")
Exception handlers:
- [ c8 .. d0] => handler block2
- [ d0 .. d8] => handler block1
+ [ b0 .. b8] => handler block2
+ [ b8 .. c0] => handler block1
"good"
diff --git a/Tests/LibJS/Bytecode/expected/chained-member-call.txt b/Tests/LibJS/Bytecode/expected/chained-member-call.txt
index 8c006928303..bf396d4f82a 100644
--- a/Tests/LibJS/Bytecode/expected/chained-member-call.txt
+++ b/Tests/LibJS/Bytecode/expected/chained-member-call.txt
@@ -1,4 +1,4 @@
-$06e3b363 chained-member-call.js:12:1
+$9619613b chained-member-call.js:12:1
Registers: 10
Blocks: 6
Constants:
@@ -7,40 +7,37 @@ $06e3b363 chained-member-call.js:12:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block3
+ [ 8] Jump target:block3
block1:
- [ 18] Catch value_feedback:0, dst:reg5
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov2 c0_dst:reg6, c0_src:Undefined, c1_dst:reg7, c1_src:reg6
+ [ 10] Catch value_feedback:0, dst:reg5
+ [ 18] Mov2 c0_dst:reg6, c0_src:Undefined, c1_dst:reg7, c1_src:reg6
block2:
- [ 40] Jump target:block5
+ [ 30] Jump target:block5
block3:
- [ 48] MovSrcUndefined dst:reg5
- [ 50] GetGlobal value_feedback:1, dst:reg8, `chained_computed_call`
- [ 60] Call value_feedback:2, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined, chained_computed_call, arguments:[Int32(0), Int32(0), Int32(0)]
- [ 90] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
- [ a8] JumpLoop target:block2
+ [ 38] MovSrcUndefined dst:reg5
+ [ 40] GetGlobal value_feedback:1, dst:reg8, `chained_computed_call`
+ [ 50] Call value_feedback:2, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined, chained_computed_call, arguments:[Int32(0), Int32(0), Int32(0)]
+ [ 80] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
+ [ 98] JumpLoop target:block2
block4:
- [ b0] Catch value_feedback:3, dst:reg5
- [ b8] SetLexicalEnvironment environment:reg4
- [ c0] Mov2 c0_dst:reg7, c0_src:Undefined, c1_dst:reg8, c1_src:reg7
- [ d8] End value:reg7
+ [ a0] Catch value_feedback:3, dst:reg5
+ [ a8] Mov2 c0_dst:reg7, c0_src:Undefined, c1_dst:reg8, c1_src:reg7
+ [ c0] End value:reg7
block5:
- [ e0] MovSrcUndefined dst:reg5
- [ e8] GetGlobal value_feedback:4, dst:reg9, `chained_dot_call`
- [ f8] Call value_feedback:5, call_feedback:1, dst:reg7, callee:reg9, this_value:Undefined, chained_dot_call, arguments:[Int32(0)]
- [ 120] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg7, c1_src:reg5
- [ 138] End value:reg7
+ [ c8] MovSrcUndefined dst:reg5
+ [ d0] GetGlobal value_feedback:4, dst:reg9, `chained_dot_call`
+ [ e0] Call value_feedback:5, call_feedback:1, dst:reg7, callee:reg9, this_value:Undefined, chained_dot_call, arguments:[Int32(0)]
+ [ 108] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg7, c1_src:reg5
+ [ 120] End value:reg7
Exception handlers:
- [ 48 .. b0] => handler block1
- [ e0 .. 140] => handler block4
+ [ 38 .. a0] => handler block1
+ [ c8 .. 128] => handler block4
chained_computed_call$7b82f37a chained-member-call.js:5:5
diff --git a/Tests/LibJS/Bytecode/expected/const-assignment-no-extra-tdz.txt b/Tests/LibJS/Bytecode/expected/const-assignment-no-extra-tdz.txt
index cd383114099..e069ac5d7a0 100644
--- a/Tests/LibJS/Bytecode/expected/const-assignment-no-extra-tdz.txt
+++ b/Tests/LibJS/Bytecode/expected/const-assignment-no-extra-tdz.txt
@@ -1,4 +1,4 @@
-$8ea9e309 const-assignment-no-extra-tdz.js:5:1
+$865e0fd9 const-assignment-no-extra-tdz.js:5:1
Registers: 9
Blocks: 3
Locals: e~0
@@ -7,24 +7,22 @@ $8ea9e309 const-assignment-no-extra-tdz.js:5:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block2
+ [ 8] Jump target:block2
block1:
- [ 18] Catch value_feedback:0, dst:reg5
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov3 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:Undefined, c2_dst:reg7, c2_src:reg6
- [ 48] End value:reg6
+ [ 10] Catch value_feedback:0, dst:reg5
+ [ 18] Mov3 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:Undefined, c2_dst:reg7, c2_src:reg6
+ [ 38] End value:reg6
block2:
- [ 50] MovSrcUndefined dst:reg5
- [ 58] GetGlobal value_feedback:1, dst:reg8, `f`
- [ 68] Call value_feedback:2, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined, f
- [ 88] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
- [ a0] End value:reg6
+ [ 40] MovSrcUndefined dst:reg5
+ [ 48] GetGlobal value_feedback:1, dst:reg8, `f`
+ [ 58] Call value_feedback:2, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined, f
+ [ 78] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
+ [ 90] End value:reg6
Exception handlers:
- [ 50 .. a8] => handler block1
+ [ 40 .. 98] => handler block1
f$6007a144 const-assignment-no-extra-tdz.js:2:5
diff --git a/Tests/LibJS/Bytecode/expected/destructure-array-rest.txt b/Tests/LibJS/Bytecode/expected/destructure-array-rest.txt
index 343a1dabea7..f58eb13b581 100644
--- a/Tests/LibJS/Bytecode/expected/destructure-array-rest.txt
+++ b/Tests/LibJS/Bytecode/expected/destructure-array-rest.txt
@@ -11,7 +11,7 @@ block0:
[ 38] End value:reg5
-f$4947a2c6 destructure-array-rest.js:6:5
+f$4683b1b6 destructure-array-rest.js:6:5
Registers: 14
Blocks: 19
Locals: a~0, b~1
@@ -23,77 +23,75 @@ f$4947a2c6 destructure-array-rest.js:6:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
- [ 38] Mov dst:reg6, src:Bool(false)
- [ 48] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5, fast_array_mode_allowed:true
- [ 68] Jump target:block3
+ [ 8] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
+ [ 30] Mov dst:reg6, src:Bool(false)
+ [ 40] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5, fast_array_mode_allowed:true
+ [ 60] Jump target:block3
block1:
- [ 70] Catch value_feedback:0, dst:reg11
- [ 78] SetLexicalEnvironment environment:reg4
- [ 80] Mov dst:reg10, src:Int32(1)
- [ 90] JumpIf condition:reg9, true_target:block14, false_target:block13
+ [ 68] Catch value_feedback:0, dst:reg11
+ [ 70] Mov dst:reg10, src:Int32(1)
+ [ 80] JumpIf condition:reg9, true_target:block14, false_target:block13
block2:
- [ a0] Return value:b~1
+ [ 90] Return value:b~1
block3:
- [ a8] Jump target:block5
+ [ 98] Jump target:block5
block4:
- [ b0] MovSrcUndefined dst:reg12
- [ b8] Jump target:block6
+ [ a0] MovSrcUndefined dst:reg12
+ [ a8] Jump target:block6
block5:
- [ c0] IteratorNextUnpack dst_value:reg12, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
- [ d8] JumpTrueLoop condition:reg6, target:block4
+ [ b0] IteratorNextUnpack dst_value:reg12, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
+ [ c8] JumpTrueLoop condition:reg6, target:block4
block6:
- [ e8] Mov dst:a~0, src:reg12
- [ f8] JumpFalse condition:reg6, target:block8
+ [ d8] Mov dst:a~0, src:reg12
+ [ e8] JumpFalse condition:reg6, target:block8
block7:
- [ 108] NewArray dst:reg13
- [ 118] Jump target:block9
+ [ f8] NewArray dst:reg13
+ [ 108] Jump target:block9
block8:
- [ 120] IteratorToArray dst:reg13, iterator_object:reg7, iterator_next_method:reg8, iterator_done_property:reg9
+ [ 110] IteratorToArray dst:reg13, iterator_object:reg7, iterator_next_method:reg8, iterator_done_property:reg9
block9:
- [ 138] Mov dst:b~1, src:reg13
+ [ 128] Mov dst:b~1, src:reg13
block10:
- [ 148] JumpFalse condition:reg9, target:block12
+ [ 138] JumpFalse condition:reg9, target:block12
block11:
- [ 158] Return value:b~1
+ [ 148] Return value:b~1
block12:
- [ 160] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
- [ 180] JumpLoop target:block11
+ [ 150] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
+ [ 170] JumpLoop target:block11
block13:
- [ 188] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg10, rhs:1, true_target:block15, false_target:block16
+ [ 178] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg10, rhs:1, true_target:block15, false_target:block16
block14:
- [ 1a0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg10, rhs:2, true_target:block17, false_target:block18
+ [ 190] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg10, rhs:2, true_target:block17, false_target:block18
block15:
- [ 1b8] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:reg11
- [ 1d8] Throw src:reg11
+ [ 1a8] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:reg11
+ [ 1c8] Throw src:reg11
block16:
- [ 1e0] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
- [ 200] JumpLoop target:block14
+ [ 1d0] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
+ [ 1f0] JumpLoop target:block14
block17:
- [ 208] Return value:reg11
+ [ 1f8] Return value:reg11
block18:
- [ 210] Throw src:reg11
+ [ 200] Throw src:reg11
Exception handlers:
- [ a8 .. c0] => handler block1
- [ e8 .. 120] => handler block1
- [ 138 .. 148] => handler block1
+ [ 98 .. b0] => handler block1
+ [ d8 .. 110] => handler block1
+ [ 128 .. 138] => handler block1
diff --git a/Tests/LibJS/Bytecode/expected/destructuring-assignment-in-logical-and.txt b/Tests/LibJS/Bytecode/expected/destructuring-assignment-in-logical-and.txt
index beb856dd599..758b27db651 100644
--- a/Tests/LibJS/Bytecode/expected/destructuring-assignment-in-logical-and.txt
+++ b/Tests/LibJS/Bytecode/expected/destructuring-assignment-in-logical-and.txt
@@ -13,7 +13,7 @@ block0:
[ 40] End value:reg5
-f$7ade6b02 destructuring-assignment-in-logical-and.js:2:5
+f$6d0ab5b2 destructuring-assignment-in-logical-and.js:2:5
Registers: 14
Blocks: 21
Locals: a~0, b~1
@@ -25,87 +25,85 @@ f$7ade6b02 destructuring-assignment-in-logical-and.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov3 c0_dst:a~0, c0_src:Undefined, c1_dst:b~1, c1_src:Undefined, c2_dst:reg5, c2_src:arg0
- [ 30] JumpFalse condition:arg0, target:block2
+ [ 8] Mov3 c0_dst:a~0, c0_src:Undefined, c1_dst:b~1, c1_src:Undefined, c2_dst:reg5, c2_src:arg0
+ [ 28] JumpFalse condition:arg0, target:block2
block1:
- [ 40] Mov2 c0_dst:reg7, c0_src:arg0, c1_dst:reg8, c1_src:arg1
- [ 58] Call value_feedback:0, call_feedback:0, dst:reg6, callee:reg7, this_value:Undefined, t, arguments:[reg8]
- [ 80] Mov dst:reg7, src:Bool(false)
- [ 90] GetIterator dst_iterator_object:reg8, dst_iterator_next:reg9, dst_iterator_done:reg10, iterable:reg6, fast_array_mode_allowed:true
- [ b0] Jump target:block5
+ [ 38] Mov2 c0_dst:reg7, c0_src:arg0, c1_dst:reg8, c1_src:arg1
+ [ 50] Call value_feedback:0, call_feedback:0, dst:reg6, callee:reg7, this_value:Undefined, t, arguments:[reg8]
+ [ 78] Mov dst:reg7, src:Bool(false)
+ [ 88] GetIterator dst_iterator_object:reg8, dst_iterator_next:reg9, dst_iterator_done:reg10, iterable:reg6, fast_array_mode_allowed:true
+ [ a8] Jump target:block5
block2:
- [ b8] End value:Undefined
+ [ b0] End value:Undefined
block3:
- [ c0] Catch value_feedback:1, dst:reg12
- [ c8] SetLexicalEnvironment environment:reg4
- [ d0] Mov dst:reg11, src:Int32(1)
- [ e0] JumpIf condition:reg10, true_target:block16, false_target:block15
+ [ b8] Catch value_feedback:1, dst:reg12
+ [ c0] Mov dst:reg11, src:Int32(1)
+ [ d0] JumpIf condition:reg10, true_target:block16, false_target:block15
block4:
- [ f0] Mov dst:reg5, src:reg6
- [ 100] JumpLoop target:block2
+ [ e0] Mov dst:reg5, src:reg6
+ [ f0] JumpLoop target:block2
block5:
- [ 108] Jump target:block7
+ [ f8] Jump target:block7
block6:
- [ 110] MovSrcUndefined dst:reg13
- [ 118] Jump target:block8
+ [ 100] MovSrcUndefined dst:reg13
+ [ 108] Jump target:block8
block7:
- [ 120] IteratorNextUnpack dst_value:reg13, dst_done:reg7, iterator_object:reg8, iterator_next:reg9, iterator_done:reg10
- [ 138] JumpTrueLoop condition:reg7, target:block6
+ [ 110] IteratorNextUnpack dst_value:reg13, dst_done:reg7, iterator_object:reg8, iterator_next:reg9, iterator_done:reg10
+ [ 128] JumpTrueLoop condition:reg7, target:block6
block8:
- [ 148] Mov dst:a~0, src:reg13
- [ 158] JumpFalse condition:reg7, target:block10
+ [ 138] Mov dst:a~0, src:reg13
+ [ 148] JumpFalse condition:reg7, target:block10
block9:
- [ 168] MovSrcUndefined dst:reg13
- [ 170] Jump target:block11
+ [ 158] MovSrcUndefined dst:reg13
+ [ 160] Jump target:block11
block10:
- [ 178] IteratorNextUnpack dst_value:reg13, dst_done:reg7, iterator_object:reg8, iterator_next:reg9, iterator_done:reg10
- [ 190] JumpTrueLoop condition:reg7, target:block9
+ [ 168] IteratorNextUnpack dst_value:reg13, dst_done:reg7, iterator_object:reg8, iterator_next:reg9, iterator_done:reg10
+ [ 180] JumpTrueLoop condition:reg7, target:block9
block11:
- [ 1a0] Mov dst:b~1, src:reg13
+ [ 190] Mov dst:b~1, src:reg13
block12:
- [ 1b0] JumpFalse condition:reg10, target:block14
+ [ 1a0] JumpFalse condition:reg10, target:block14
block13:
- [ 1c0] JumpLoop target:block4
+ [ 1b0] JumpLoop target:block4
block14:
- [ 1c8] IteratorClose iterator_object:reg8, iterator_next:reg9, iterator_done:reg10, completion_value:Undefined
- [ 1e8] JumpLoop target:block13
+ [ 1b8] IteratorClose iterator_object:reg8, iterator_next:reg9, iterator_done:reg10, completion_value:Undefined
+ [ 1d8] JumpLoop target:block13
block15:
- [ 1f0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg11, rhs:1, true_target:block17, false_target:block18
+ [ 1e0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg11, rhs:1, true_target:block17, false_target:block18
block16:
- [ 208] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg11, rhs:2, true_target:block19, false_target:block20
+ [ 1f8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg11, rhs:2, true_target:block19, false_target:block20
block17:
- [ 220] IteratorClose iterator_object:reg8, iterator_next:reg9, iterator_done:reg10, completion_value:reg12
- [ 240] Throw src:reg12
+ [ 210] IteratorClose iterator_object:reg8, iterator_next:reg9, iterator_done:reg10, completion_value:reg12
+ [ 230] Throw src:reg12
block18:
- [ 248] IteratorClose iterator_object:reg8, iterator_next:reg9, iterator_done:reg10, completion_value:Undefined
- [ 268] JumpLoop target:block16
+ [ 238] IteratorClose iterator_object:reg8, iterator_next:reg9, iterator_done:reg10, completion_value:Undefined
+ [ 258] JumpLoop target:block16
block19:
- [ 270] Return value:reg12
+ [ 260] Return value:reg12
block20:
- [ 278] Throw src:reg12
+ [ 268] Throw src:reg12
Exception handlers:
- [ 108 .. 120] => handler block3
- [ 148 .. 178] => handler block3
- [ 1a0 .. 1b0] => handler block3
+ [ f8 .. 110] => handler block3
+ [ 138 .. 168] => handler block3
+ [ 190 .. 1a0] => handler block3
diff --git a/Tests/LibJS/Bytecode/expected/destructuring-assignment.txt b/Tests/LibJS/Bytecode/expected/destructuring-assignment.txt
index 68b11862352..dec59c3fc96 100644
--- a/Tests/LibJS/Bytecode/expected/destructuring-assignment.txt
+++ b/Tests/LibJS/Bytecode/expected/destructuring-assignment.txt
@@ -126,7 +126,7 @@ block2:
[ 88] Return value:x~0
-setter_parameter_resolution$ef39fadb destructuring-assignment.js:19:9
+setter_parameter_resolution$f1fdebeb destructuring-assignment.js:19:9
Registers: 14
Blocks: 16
Constants:
@@ -137,74 +137,72 @@ setter_parameter_resolution$ef39fadb destructuring-assignment.js:19:9
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] CreateVariable `setValue`, is_immutable:false, is_global:false, is_strict:false
- [ 20] InitializeVariableBinding `setValue`, src:Undefined
- [ 38] NewPrimitiveArray dst:reg5, elements:[23]
- [ 50] Mov dst:reg6, src:Bool(false)
- [ 60] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5, fast_array_mode_allowed:true
- [ 80] Jump target:block3
+ [ 8] CreateVariable `setValue`, is_immutable:false, is_global:false, is_strict:false
+ [ 18] InitializeVariableBinding `setValue`, src:Undefined
+ [ 30] NewPrimitiveArray dst:reg5, elements:[23]
+ [ 48] Mov dst:reg6, src:Bool(false)
+ [ 58] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5, fast_array_mode_allowed:true
+ [ 78] Jump target:block3
block1:
- [ 88] Catch value_feedback:0, dst:reg11
- [ 90] SetLexicalEnvironment environment:reg4
- [ 98] Mov dst:reg10, src:Int32(1)
- [ a8] JumpIf condition:reg9, true_target:block11, false_target:block10
+ [ 80] Catch value_feedback:0, dst:reg11
+ [ 88] Mov dst:reg10, src:Int32(1)
+ [ 98] JumpIf condition:reg9, true_target:block11, false_target:block10
block2:
- [ b8] GetInitializedBinding value_feedback:1, dst:reg5, `setValue`
- [ d0] Return value:reg5
+ [ a8] GetInitializedBinding value_feedback:1, dst:reg5, `setValue`
+ [ c0] Return value:reg5
block3:
- [ d8] NewObject dst:reg12
- [ e8] NewFunction dst:reg13, shared_function_data_index:0 (set y), home_object:reg12
- [ 100] PutById base:reg12, `y`, src:reg13, kind:Setter
- [ 120] Jump target:block5
+ [ c8] NewObject dst:reg12
+ [ d8] NewFunction dst:reg13, shared_function_data_index:0 (set y), home_object:reg12
+ [ f0] PutById base:reg12, `y`, src:reg13, kind:Setter
+ [ 110] Jump target:block5
block4:
- [ 128] MovSrcUndefined dst:reg13
- [ 130] Jump target:block6
+ [ 118] MovSrcUndefined dst:reg13
+ [ 120] Jump target:block6
block5:
- [ 138] IteratorNextUnpack dst_value:reg13, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
- [ 150] JumpTrueLoop condition:reg6, target:block4
+ [ 128] IteratorNextUnpack dst_value:reg13, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
+ [ 140] JumpTrueLoop condition:reg6, target:block4
block6:
- [ 160] PutById base:reg12, `y`, src:reg13, kind:Normal
+ [ 150] PutById base:reg12, `y`, src:reg13, kind:Normal
block7:
- [ 180] JumpFalse condition:reg9, target:block9
+ [ 170] JumpFalse condition:reg9, target:block9
block8:
- [ 190] JumpLoop target:block2
+ [ 180] JumpLoop target:block2
block9:
- [ 198] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
- [ 1b8] JumpLoop target:block8
+ [ 188] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
+ [ 1a8] JumpLoop target:block8
block10:
- [ 1c0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg10, rhs:1, true_target:block12, false_target:block13
+ [ 1b0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg10, rhs:1, true_target:block12, false_target:block13
block11:
- [ 1d8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg10, rhs:2, true_target:block14, false_target:block15
+ [ 1c8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg10, rhs:2, true_target:block14, false_target:block15
block12:
- [ 1f0] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:reg11
- [ 210] Throw src:reg11
+ [ 1e0] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:reg11
+ [ 200] Throw src:reg11
block13:
- [ 218] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
- [ 238] JumpLoop target:block11
+ [ 208] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
+ [ 228] JumpLoop target:block11
block14:
- [ 240] Return value:reg11
+ [ 230] Return value:reg11
block15:
- [ 248] Throw src:reg11
+ [ 238] Throw src:reg11
Exception handlers:
- [ d8 .. 138] => handler block1
- [ 160 .. 180] => handler block1
+ [ c8 .. 128] => handler block1
+ [ 150 .. 170] => handler block1
set y$f1335721 destructuring-assignment.js:21:26
diff --git a/Tests/LibJS/Bytecode/expected/destructuring-no-base-identifier.txt b/Tests/LibJS/Bytecode/expected/destructuring-no-base-identifier.txt
index 290c47378ed..4741be9c234 100644
--- a/Tests/LibJS/Bytecode/expected/destructuring-no-base-identifier.txt
+++ b/Tests/LibJS/Bytecode/expected/destructuring-no-base-identifier.txt
@@ -1,4 +1,4 @@
-$bc604c32 destructuring-no-base-identifier.js:1:1
+$bf243d42 destructuring-no-base-identifier.js:1:1
Registers: 14
Blocks: 16
Constants:
@@ -9,68 +9,66 @@ $bc604c32 destructuring-no-base-identifier.js:1:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] NewObject dst:reg5
- [ 20] SetGlobal `x`, src:reg5
- [ 30] NewPrimitiveArray dst:reg5, elements:[42]
- [ 48] Mov dst:reg6, src:Bool(false)
- [ 58] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5, fast_array_mode_allowed:true
- [ 78] Jump target:block3
+ [ 8] NewObject dst:reg5
+ [ 18] SetGlobal `x`, src:reg5
+ [ 28] NewPrimitiveArray dst:reg5, elements:[42]
+ [ 40] Mov dst:reg6, src:Bool(false)
+ [ 50] GetIterator dst_iterator_object:reg7, dst_iterator_next:reg8, dst_iterator_done:reg9, iterable:reg5, fast_array_mode_allowed:true
+ [ 70] Jump target:block3
block1:
- [ 80] Catch value_feedback:1, dst:reg11
- [ 88] SetLexicalEnvironment environment:reg4
- [ 90] Mov dst:reg10, src:Int32(1)
- [ a0] JumpIf condition:reg9, true_target:block11, false_target:block10
+ [ 78] Catch value_feedback:1, dst:reg11
+ [ 80] Mov dst:reg10, src:Int32(1)
+ [ 90] JumpIf condition:reg9, true_target:block11, false_target:block10
block2:
- [ b0] End value:reg5
+ [ a0] End value:reg5
block3:
- [ b8] GetGlobal value_feedback:0, dst:reg12, `x`
- [ c8] Jump target:block5
+ [ a8] GetGlobal value_feedback:0, dst:reg12, `x`
+ [ b8] Jump target:block5
block4:
- [ d0] MovSrcUndefined dst:reg13
- [ d8] Jump target:block6
+ [ c0] MovSrcUndefined dst:reg13
+ [ c8] Jump target:block6
block5:
- [ e0] IteratorNextUnpack dst_value:reg13, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
- [ f8] JumpTrueLoop condition:reg6, target:block4
+ [ d0] IteratorNextUnpack dst_value:reg13, dst_done:reg6, iterator_object:reg7, iterator_next:reg8, iterator_done:reg9
+ [ e8] JumpTrueLoop condition:reg6, target:block4
block6:
- [ 108] PutById base:reg12, `y`, src:reg13, kind:Normal
+ [ f8] PutById base:reg12, `y`, src:reg13, kind:Normal
block7:
- [ 128] JumpFalse condition:reg9, target:block9
+ [ 118] JumpFalse condition:reg9, target:block9
block8:
- [ 138] End value:reg5
+ [ 128] End value:reg5
block9:
- [ 140] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
- [ 160] JumpLoop target:block8
+ [ 130] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
+ [ 150] JumpLoop target:block8
block10:
- [ 168] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg10, rhs:1, true_target:block12, false_target:block13
+ [ 158] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg10, rhs:1, true_target:block12, false_target:block13
block11:
- [ 180] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg10, rhs:2, true_target:block14, false_target:block15
+ [ 170] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg10, rhs:2, true_target:block14, false_target:block15
block12:
- [ 198] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:reg11
- [ 1b8] Throw src:reg11
+ [ 188] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:reg11
+ [ 1a8] Throw src:reg11
block13:
- [ 1c0] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
- [ 1e0] JumpLoop target:block11
+ [ 1b0] IteratorClose iterator_object:reg7, iterator_next:reg8, iterator_done:reg9, completion_value:Undefined
+ [ 1d0] JumpLoop target:block11
block14:
- [ 1e8] Return value:reg11
+ [ 1d8] Return value:reg11
block15:
- [ 1f0] Throw src:reg11
+ [ 1e0] Throw src:reg11
Exception handlers:
- [ b8 .. e0] => handler block1
- [ 108 .. 128] => handler block1
+ [ a8 .. d0] => handler block1
+ [ f8 .. 118] => handler block1
diff --git a/Tests/LibJS/Bytecode/expected/for-of-cond-rhs-block-order.txt b/Tests/LibJS/Bytecode/expected/for-of-cond-rhs-block-order.txt
index f4ad9cc922f..76d266f5dc1 100644
--- a/Tests/LibJS/Bytecode/expected/for-of-cond-rhs-block-order.txt
+++ b/Tests/LibJS/Bytecode/expected/for-of-cond-rhs-block-order.txt
@@ -12,7 +12,7 @@ block0:
[ 40] End value:reg5
-f$9826e38d for-of-cond-rhs-block-order.js:2:21
+f$062d44a5 for-of-cond-rhs-block-order.js:2:21
Registers: 19
Blocks: 31
Locals: r~0, n~1
@@ -24,131 +24,128 @@ f$9826e38d for-of-cond-rhs-block-order.js:2:21
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] JumpIf condition:arg0, true_target:block3, false_target:block4
+ [ 8] JumpIf condition:arg0, true_target:block3, false_target:block4
block1:
- [ 20] End value:Undefined
+ [ 18] End value:Undefined
block2:
- [ 28] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg5, iterator_next:reg8, iterator_done:reg6
- [ 40] JumpIfLoop condition:reg11, true_target:block1, false_target:block8
+ [ 20] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg5, iterator_next:reg8, iterator_done:reg6
+ [ 38] JumpIfLoop condition:reg11, true_target:block1, false_target:block8
block3:
- [ 50] Mov dst:reg6, src:arg0
- [ 60] GetById value_feedback:0, dst:reg7, base:reg6, `x` (o.x)
- [ 78] Mov dst:reg5, src:reg7
- [ 88] Jump target:block5
+ [ 48] Mov dst:reg6, src:arg0
+ [ 58] GetById value_feedback:0, dst:reg7, base:reg6, `x` (o.x)
+ [ 70] Mov dst:reg5, src:reg7
+ [ 80] Jump target:block5
block4:
- [ 90] Mov dst:reg5, src:arg1
+ [ 88] Mov dst:reg5, src:arg1
block5:
- [ a0] GetGlobal value_feedback:1, dst:reg6, `Object`
- [ b0] GetById value_feedback:2, dst:reg8, base:reg6, `entries` (Object.entries)
- [ c8] NewObject dst:reg9
- [ d8] Call value_feedback:3, call_feedback:0, dst:reg7, callee:reg8, this_value:reg6, Object.entries, arguments:[reg9]
- [ 100] GetIterator dst_iterator_object:reg5, dst_iterator_next:reg8, dst_iterator_done:reg6, iterable:reg7, fast_array_mode_allowed:true
- [ 120] JumpLoop target:block2
+ [ 98] GetGlobal value_feedback:1, dst:reg6, `Object`
+ [ a8] GetById value_feedback:2, dst:reg8, base:reg6, `entries` (Object.entries)
+ [ c0] NewObject dst:reg9
+ [ d0] Call value_feedback:3, call_feedback:0, dst:reg7, callee:reg8, this_value:reg6, Object.entries, arguments:[reg9]
+ [ f8] GetIterator dst_iterator_object:reg5, dst_iterator_next:reg8, dst_iterator_done:reg6, iterable:reg7, fast_array_mode_allowed:true
+ [ 118] JumpLoop target:block2
block6:
- [ 128] Catch value_feedback:5, dst:reg9
- [ 130] SetLexicalEnvironment environment:reg4
- [ 138] Mov dst:reg7, src:Int32(1)
+ [ 120] Catch value_feedback:5, dst:reg9
+ [ 128] Mov dst:reg7, src:Int32(1)
block7:
- [ 148] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg7, rhs:1, true_target:block27, false_target:block28
+ [ 138] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg7, rhs:1, true_target:block27, false_target:block28
block8:
- [ 160] Mov dst:reg12, src:Bool(false)
- [ 170] GetIterator dst_iterator_object:reg13, dst_iterator_next:reg14, dst_iterator_done:reg15, iterable:reg10, fast_array_mode_allowed:true
- [ 190] Jump target:block11
+ [ 150] Mov dst:reg12, src:Bool(false)
+ [ 160] GetIterator dst_iterator_object:reg13, dst_iterator_next:reg14, dst_iterator_done:reg15, iterable:reg10, fast_array_mode_allowed:true
+ [ 180] Jump target:block11
block9:
- [ 198] Catch value_feedback:4, dst:reg17
- [ 1a0] SetLexicalEnvironment environment:reg4
- [ 1a8] Mov dst:reg16, src:Int32(1)
- [ 1b8] JumpIf condition:reg15, true_target:block22, false_target:block21
+ [ 188] Catch value_feedback:4, dst:reg17
+ [ 190] Mov dst:reg16, src:Int32(1)
+ [ 1a0] JumpIf condition:reg15, true_target:block22, false_target:block21
block10:
- [ 1c8] JumpLoop target:block2
+ [ 1b0] JumpLoop target:block2
block11:
- [ 1d0] Jump target:block13
+ [ 1b8] Jump target:block13
block12:
- [ 1d8] MovSrcUndefined dst:reg18
- [ 1e0] Jump target:block14
+ [ 1c0] MovSrcUndefined dst:reg18
+ [ 1c8] Jump target:block14
block13:
- [ 1e8] IteratorNextUnpack dst_value:reg18, dst_done:reg12, iterator_object:reg13, iterator_next:reg14, iterator_done:reg15
- [ 200] JumpTrueLoop condition:reg12, target:block12
+ [ 1d0] IteratorNextUnpack dst_value:reg18, dst_done:reg12, iterator_object:reg13, iterator_next:reg14, iterator_done:reg15
+ [ 1e8] JumpTrueLoop condition:reg12, target:block12
block14:
- [ 210] Mov dst:r~0, src:reg18
- [ 220] JumpFalse condition:reg12, target:block16
+ [ 1f8] Mov dst:r~0, src:reg18
+ [ 208] JumpFalse condition:reg12, target:block16
block15:
- [ 230] MovSrcUndefined dst:reg18
- [ 238] Jump target:block17
+ [ 218] MovSrcUndefined dst:reg18
+ [ 220] Jump target:block17
block16:
- [ 240] IteratorNextUnpack dst_value:reg18, dst_done:reg12, iterator_object:reg13, iterator_next:reg14, iterator_done:reg15
- [ 258] JumpTrueLoop condition:reg12, target:block15
+ [ 228] IteratorNextUnpack dst_value:reg18, dst_done:reg12, iterator_object:reg13, iterator_next:reg14, iterator_done:reg15
+ [ 240] JumpTrueLoop condition:reg12, target:block15
block17:
- [ 268] Mov dst:n~1, src:reg18
+ [ 250] Mov dst:n~1, src:reg18
block18:
- [ 278] JumpFalse condition:reg15, target:block20
+ [ 260] JumpFalse condition:reg15, target:block20
block19:
- [ 288] JumpLoop target:block10
+ [ 270] JumpLoop target:block10
block20:
- [ 290] IteratorClose iterator_object:reg13, iterator_next:reg14, iterator_done:reg15, completion_value:Undefined
- [ 2b0] JumpLoop target:block19
+ [ 278] IteratorClose iterator_object:reg13, iterator_next:reg14, iterator_done:reg15, completion_value:Undefined
+ [ 298] JumpLoop target:block19
block21:
- [ 2b8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg16, rhs:1, true_target:block23, false_target:block24
+ [ 2a0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg16, rhs:1, true_target:block23, false_target:block24
block22:
- [ 2d0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg16, rhs:2, true_target:block25, false_target:block26
+ [ 2b8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg16, rhs:2, true_target:block25, false_target:block26
block23:
- [ 2e8] IteratorClose iterator_object:reg13, iterator_next:reg14, iterator_done:reg15, completion_value:reg17
- [ 308] Throw src:reg17
+ [ 2d0] IteratorClose iterator_object:reg13, iterator_next:reg14, iterator_done:reg15, completion_value:reg17
+ [ 2f0] Throw src:reg17
block24:
- [ 310] IteratorClose iterator_object:reg13, iterator_next:reg14, iterator_done:reg15, completion_value:Undefined
- [ 330] JumpLoop target:block22
+ [ 2f8] IteratorClose iterator_object:reg13, iterator_next:reg14, iterator_done:reg15, completion_value:Undefined
+ [ 318] JumpLoop target:block22
block25:
- [ 338] Mov2 c0_dst:reg7, c0_src:reg16, c1_dst:reg9, c1_src:reg17
- [ 350] JumpLoop target:block7
+ [ 320] Mov2 c0_dst:reg7, c0_src:reg16, c1_dst:reg9, c1_src:reg17
+ [ 338] JumpLoop target:block7
block26:
- [ 358] Throw src:reg17
+ [ 340] Throw src:reg17
block27:
- [ 360] IteratorClose iterator_object:reg5, iterator_next:reg8, iterator_done:reg6, completion_value:reg9
- [ 380] Throw src:reg9
+ [ 348] IteratorClose iterator_object:reg5, iterator_next:reg8, iterator_done:reg6, completion_value:reg9
+ [ 368] Throw src:reg9
block28:
- [ 388] IteratorClose iterator_object:reg5, iterator_next:reg8, iterator_done:reg6, completion_value:Undefined
- [ 3a8] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:2, true_target:block29, false_target:block30
+ [ 370] IteratorClose iterator_object:reg5, iterator_next:reg8, iterator_done:reg6, completion_value:Undefined
+ [ 390] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:2, true_target:block29, false_target:block30
block29:
- [ 3c0] Return value:reg9
+ [ 3a8] Return value:reg9
block30:
- [ 3c8] Throw src:reg9
+ [ 3b0] Throw src:reg9
Exception handlers:
- [ 160 .. 1d0] => handler block6
- [ 1d0 .. 1e8] => handler block9
- [ 1e8 .. 210] => handler block6
- [ 210 .. 240] => handler block9
- [ 240 .. 268] => handler block6
- [ 268 .. 278] => handler block9
- [ 278 .. 360] => handler block6
+ [ 150 .. 1b8] => handler block6
+ [ 1b8 .. 1d0] => handler block9
+ [ 1d0 .. 1f8] => handler block6
+ [ 1f8 .. 228] => handler block9
+ [ 228 .. 250] => handler block6
+ [ 250 .. 260] => handler block9
+ [ 260 .. 348] => handler block6
diff --git a/Tests/LibJS/Bytecode/expected/for-of-iteration-env-capacity.txt b/Tests/LibJS/Bytecode/expected/for-of-iteration-env-capacity.txt
index 4fb191e4d5a..473c5f51327 100644
--- a/Tests/LibJS/Bytecode/expected/for-of-iteration-env-capacity.txt
+++ b/Tests/LibJS/Bytecode/expected/for-of-iteration-env-capacity.txt
@@ -1,4 +1,4 @@
-$8366c2b5 for-of-iteration-env-capacity.js:1:14
+$8bb295e5 for-of-iteration-env-capacity.js:1:14
Registers: 13
Blocks: 9
Locals: x~0
@@ -9,42 +9,40 @@ $8366c2b5 for-of-iteration-env-capacity.js:1:14
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
- [ 38] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
- [ 58] MovSrcUndefined dst:reg5
- [ 60] Jump target:block2
+ [ 8] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
+ [ 30] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
+ [ 50] MovSrcUndefined dst:reg5
+ [ 58] Jump target:block2
block1:
- [ 68] End value:reg5
+ [ 60] End value:reg5
block2:
- [ 70] IteratorNextUnpack dst_value:reg11, dst_done:reg12, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
- [ 88] JumpIfLoop condition:reg12, true_target:block1, false_target:block4
+ [ 68] IteratorNextUnpack dst_value:reg11, dst_done:reg12, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
+ [ 80] JumpIfLoop condition:reg12, true_target:block1, false_target:block4
block3:
- [ 98] Catch value_feedback:0, dst:reg10
- [ a0] SetLexicalEnvironment environment:reg4
- [ a8] Mov dst:reg9, src:Int32(1)
- [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg9, rhs:1, true_target:block5, false_target:block6
+ [ 90] Catch value_feedback:0, dst:reg10
+ [ 98] Mov dst:reg9, src:Int32(1)
+ [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg9, rhs:1, true_target:block5, false_target:block6
block4:
- [ d0] Mov2 c0_dst:x~0, c0_src:reg11, c1_dst:reg5, c1_src:x~0
- [ e8] JumpLoop target:block2
+ [ c0] Mov2 c0_dst:x~0, c0_src:reg11, c1_dst:reg5, c1_src:x~0
+ [ d8] JumpLoop target:block2
block5:
- [ f0] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg10
- [ 110] Throw src:reg10
+ [ e0] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg10
+ [ 100] Throw src:reg10
block6:
- [ 118] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
- [ 138] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg9, rhs:2, true_target:block7, false_target:block8
+ [ 108] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
+ [ 128] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg9, rhs:2, true_target:block7, false_target:block8
block7:
- [ 150] Return value:reg10
+ [ 140] Return value:reg10
block8:
- [ 158] Throw src:reg10
+ [ 148] Throw src:reg10
Exception handlers:
- [ d0 .. f0] => handler block3
+ [ c0 .. e0] => handler block3
diff --git a/Tests/LibJS/Bytecode/expected/for-of-iterator-close.txt b/Tests/LibJS/Bytecode/expected/for-of-iterator-close.txt
index e336f5cad7a..8aca2d6c27d 100644
--- a/Tests/LibJS/Bytecode/expected/for-of-iterator-close.txt
+++ b/Tests/LibJS/Bytecode/expected/for-of-iterator-close.txt
@@ -16,7 +16,7 @@ block0:
[ c8] End value:reg5
-forOfBreak$8f0eb21b for-of-iterator-close.js:2:18
+forOfBreak$8c4ac10b for-of-iterator-close.js:2:18
Registers: 13
Blocks: 13
Locals: x~0
@@ -28,59 +28,57 @@ forOfBreak$8f0eb21b for-of-iterator-close.js:2:18
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
- [ 38] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
- [ 58] Jump target:block2
+ [ 8] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
+ [ 30] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
+ [ 50] Jump target:block2
block1:
- [ 60] End value:Undefined
+ [ 58] End value:Undefined
block2:
- [ 68] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
- [ 80] JumpIfLoop condition:reg11, true_target:block1, false_target:block5
+ [ 60] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
+ [ 78] JumpIfLoop condition:reg11, true_target:block1, false_target:block5
block3:
- [ 90] Catch value_feedback:0, dst:reg9
- [ 98] SetLexicalEnvironment environment:reg4
- [ a0] Mov dst:reg5, src:Int32(1)
+ [ 88] Catch value_feedback:0, dst:reg9
+ [ 90] Mov dst:reg5, src:Int32(1)
block4:
- [ b0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:1, true_target:block8, false_target:block9
+ [ a0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:1, true_target:block8, false_target:block9
block5:
- [ c8] Mov dst:x~0, src:reg10
- [ d8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:x~0, rhs:2, true_target:block6, false_target:block7
+ [ b8] Mov dst:x~0, src:reg10
+ [ c8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:x~0, rhs:2, true_target:block6, false_target:block7
block6:
- [ f0] Mov dst:reg5, src:Int32(3)
- [ 100] JumpLoop target:block4
+ [ e0] Mov dst:reg5, src:Int32(3)
+ [ f0] JumpLoop target:block4
block7:
- [ 108] JumpLoop target:block2
+ [ f8] JumpLoop target:block2
block8:
- [ 110] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
- [ 130] Throw src:reg9
+ [ 100] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
+ [ 120] Throw src:reg9
block9:
- [ 138] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
- [ 158] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:2, lhs:reg5, rhs:3, true_target:block1, false_target:block10
+ [ 128] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
+ [ 148] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:2, lhs:reg5, rhs:3, true_target:block1, false_target:block10
block10:
- [ 170] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg5, rhs:2, true_target:block11, false_target:block12
+ [ 160] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg5, rhs:2, true_target:block11, false_target:block12
block11:
- [ 188] Return value:reg9
+ [ 178] Return value:reg9
block12:
- [ 190] Throw src:reg9
+ [ 180] Throw src:reg9
Exception handlers:
- [ c8 .. 110] => handler block3
+ [ b8 .. 100] => handler block3
-forOfReturn$361b9b39 for-of-iterator-close.js:9:18
+forOfReturn$3e676e69 for-of-iterator-close.js:9:18
Registers: 12
Blocks: 10
Locals: x~0
@@ -91,49 +89,47 @@ forOfReturn$361b9b39 for-of-iterator-close.js:9:18
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
- [ 38] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
- [ 58] Jump target:block2
+ [ 8] NewPrimitiveArray dst:reg5, elements:[1, 2, 3]
+ [ 30] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
+ [ 50] Jump target:block2
block1:
- [ 60] End value:Undefined
+ [ 58] End value:Undefined
block2:
- [ 68] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
- [ 80] JumpIfLoop condition:reg11, true_target:block1, false_target:block5
+ [ 60] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
+ [ 78] JumpIfLoop condition:reg11, true_target:block1, false_target:block5
block3:
- [ 90] Catch value_feedback:0, dst:reg9
- [ 98] SetLexicalEnvironment environment:reg4
- [ a0] Mov dst:reg5, src:Int32(1)
+ [ 88] Catch value_feedback:0, dst:reg9
+ [ 90] Mov dst:reg5, src:Int32(1)
block4:
- [ b0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:1, true_target:block6, false_target:block7
+ [ a0] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:1, true_target:block6, false_target:block7
block5:
- [ c8] Mov3 c0_dst:x~0, c0_src:reg10, c1_dst:reg9, c1_src:x~0, c2_dst:reg5, c2_src:Int32(2)
- [ e8] JumpLoop target:block4
+ [ b8] Mov3 c0_dst:x~0, c0_src:reg10, c1_dst:reg9, c1_src:x~0, c2_dst:reg5, c2_src:Int32(2)
+ [ d8] JumpLoop target:block4
block6:
- [ f0] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
- [ 110] Throw src:reg9
+ [ e0] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
+ [ 100] Throw src:reg9
block7:
- [ 118] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
- [ 138] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block8, false_target:block9
+ [ 108] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
+ [ 128] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block8, false_target:block9
block8:
- [ 150] Return value:reg9
+ [ 140] Return value:reg9
block9:
- [ 158] Throw src:reg9
+ [ 148] Throw src:reg9
Exception handlers:
- [ c8 .. f0] => handler block3
+ [ b8 .. e0] => handler block3
-forAwaitOfBreak$8996d66f for-of-iterator-close.js:16:24
+forAwaitOfBreak$976a8bbf for-of-iterator-close.js:16:24
Registers: 18
Blocks: 29
Locals: x~0
@@ -145,115 +141,113 @@ forAwaitOfBreak$8996d66f for-of-iterator-close.js:16:24
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] GetIterator dst_iterator_object:reg5, dst_iterator_next:reg6, dst_iterator_done:reg7, iterable:arg0, fast_array_mode_allowed:false
- [ 30] Jump target:block2
+ [ 8] GetIterator dst_iterator_object:reg5, dst_iterator_next:reg6, dst_iterator_done:reg7, iterable:arg0, fast_array_mode_allowed:false
+ [ 28] Jump target:block2
block1:
- [ 38] Yield value:Undefined
+ [ 30] Yield value:Undefined
block2:
- [ 48] IteratorNext dst:reg12, iterator_object:reg5, iterator_next:reg6, iterator_done:reg7
- [ 60] Mov dst:reg13, src:reg0
- [ 70] Await continuation_label:block5, argument:reg12
+ [ 40] IteratorNext dst:reg12, iterator_object:reg5, iterator_next:reg6, iterator_done:reg7
+ [ 58] Mov dst:reg13, src:reg0
+ [ 68] Await continuation_label:block5, argument:reg12
block3:
- [ 80] Catch value_feedback:2, dst:reg9
- [ 88] SetLexicalEnvironment environment:reg4
- [ 90] Mov dst:reg8, src:Int32(1)
+ [ 78] Catch value_feedback:2, dst:reg9
+ [ 80] Mov dst:reg8, src:Int32(1)
block4:
- [ a0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg8, rhs:1, true_target:block12, false_target:block13
+ [ 90] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg8, rhs:1, true_target:block12, false_target:block13
block5:
- [ b8] Mov dst:reg13, src:reg0
- [ c8] GetCompletionFields type_dst:reg14, value_dst:reg15, completion:reg13
- [ d8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg14, rhs:1, true_target:block6, false_target:block7
+ [ a8] Mov dst:reg13, src:reg0
+ [ b8] GetCompletionFields type_dst:reg14, value_dst:reg15, completion:reg13
+ [ c8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg14, rhs:1, true_target:block6, false_target:block7
block6:
- [ f0] Mov dst:reg12, src:reg15
- [ 100] ThrowIfNotObject src:reg12
- [ 108] GetById value_feedback:0, dst:reg11, base:reg12, `done`
- [ 120] JumpIfLoop condition:reg11, true_target:block1, false_target:block8
+ [ e0] Mov dst:reg12, src:reg15
+ [ f0] ThrowIfNotObject src:reg12
+ [ f8] GetById value_feedback:0, dst:reg11, base:reg12, `done`
+ [ 110] JumpIfLoop condition:reg11, true_target:block1, false_target:block8
block7:
- [ 130] Throw src:reg15
+ [ 120] Throw src:reg15
block8:
- [ 138] GetById value_feedback:1, dst:reg10, base:reg12, `value`
+ [ 128] GetById value_feedback:1, dst:reg10, base:reg12, `value`
block9:
- [ 150] Mov dst:x~0, src:reg10
- [ 160] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:x~0, rhs:2, true_target:block10, false_target:block11
+ [ 140] Mov dst:x~0, src:reg10
+ [ 150] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:x~0, rhs:2, true_target:block10, false_target:block11
block10:
- [ 178] Mov dst:reg8, src:Int32(3)
- [ 188] JumpLoop target:block4
+ [ 168] Mov dst:reg8, src:Int32(3)
+ [ 178] JumpLoop target:block4
block11:
- [ 190] JumpLoop target:block2
+ [ 180] JumpLoop target:block2
block12:
- [ 198] Jump target:block24
+ [ 188] Jump target:block24
block13:
- [ 1a0] GetMethod dst:reg12, object:reg5, `return`
- [ 1b8] JumpUndefined condition:reg12, true_target:block14, false_target:block15
+ [ 190] GetMethod dst:reg12, object:reg5, `return`
+ [ 1a8] JumpUndefined condition:reg12, true_target:block14, false_target:block15
block14:
- [ 1c8] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:4, lhs:reg8, rhs:3, true_target:block1, false_target:block19
+ [ 1b8] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:4, lhs:reg8, rhs:3, true_target:block1, false_target:block19
block15:
- [ 1e0] Call value_feedback:3, call_feedback:0, dst:reg13, callee:reg12, this_value:reg5
- [ 200] Await continuation_label:block16, argument:reg13
+ [ 1d0] Call value_feedback:3, call_feedback:0, dst:reg13, callee:reg12, this_value:reg5
+ [ 1f0] Await continuation_label:block16, argument:reg13
block16:
- [ 210] Mov dst:reg14, src:reg0
- [ 220] GetCompletionFields type_dst:reg15, value_dst:reg16, completion:reg14
- [ 230] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg15, rhs:1, true_target:block17, false_target:block18
+ [ 200] Mov dst:reg14, src:reg0
+ [ 210] GetCompletionFields type_dst:reg15, value_dst:reg16, completion:reg14
+ [ 220] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg15, rhs:1, true_target:block17, false_target:block18
block17:
- [ 248] ThrowIfNotObject src:reg16
- [ 250] JumpLoop target:block14
+ [ 238] ThrowIfNotObject src:reg16
+ [ 240] JumpLoop target:block14
block18:
- [ 258] Throw src:reg16
+ [ 248] Throw src:reg16
block19:
- [ 260] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg8, rhs:2, true_target:block20, false_target:block21
+ [ 250] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg8, rhs:2, true_target:block20, false_target:block21
block20:
- [ 278] Return value:reg9
+ [ 268] Return value:reg9
block21:
- [ 280] Throw src:reg9
+ [ 270] Throw src:reg9
block22:
- [ 288] Throw src:reg9
+ [ 278] Throw src:reg9
block23:
- [ 290] Catch value_feedback:5, dst:reg12
- [ 298] JumpLoop target:block22
+ [ 280] Catch value_feedback:5, dst:reg12
+ [ 288] JumpLoop target:block22
block24:
- [ 2a0] GetMethod dst:reg12, object:reg5, `return`
- [ 2b8] JumpUndefined condition:reg12, true_target:block22, false_target:block25
+ [ 290] GetMethod dst:reg12, object:reg5, `return`
+ [ 2a8] JumpUndefined condition:reg12, true_target:block22, false_target:block25
block25:
- [ 2c8] Call value_feedback:4, call_feedback:1, dst:reg13, callee:reg12, this_value:reg5
- [ 2e8] Await continuation_label:block26, argument:reg13
+ [ 2b8] Call value_feedback:4, call_feedback:1, dst:reg13, callee:reg12, this_value:reg5
+ [ 2d8] Await continuation_label:block26, argument:reg13
block26:
- [ 2f8] Mov dst:reg14, src:reg0
- [ 308] GetCompletionFields type_dst:reg15, value_dst:reg16, completion:reg14
- [ 318] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg15, rhs:1, true_target:block27, false_target:block28
+ [ 2e8] Mov dst:reg14, src:reg0
+ [ 2f8] GetCompletionFields type_dst:reg15, value_dst:reg16, completion:reg14
+ [ 308] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg15, rhs:1, true_target:block27, false_target:block28
block27:
- [ 330] JumpLoop target:block22
+ [ 320] JumpLoop target:block22
block28:
- [ 338] Throw src:reg16
+ [ 328] Throw src:reg16
Exception handlers:
- [ 150 .. 198] => handler block3
- [ 2a0 .. 340] => handler block23
+ [ 140 .. 188] => handler block3
+ [ 290 .. 330] => handler block23
diff --git a/Tests/LibJS/Bytecode/expected/for-try-finally-continue.txt b/Tests/LibJS/Bytecode/expected/for-try-finally-continue.txt
index 3aa2b356041..443c84e6fdd 100644
--- a/Tests/LibJS/Bytecode/expected/for-try-finally-continue.txt
+++ b/Tests/LibJS/Bytecode/expected/for-try-finally-continue.txt
@@ -1,4 +1,4 @@
-$3dc244ba for-try-finally-continue.js:1:1
+$b99c5b22 for-try-finally-continue.js:1:1
Registers: 11
Blocks: 16
Locals: e~0
@@ -13,71 +13,68 @@ $3dc244ba for-try-finally-continue.js:1:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] SetGlobal `i`, src:Int32(0)
- [ 20] MovSrcUndefined dst:reg5
- [ 28] Jump target:block3
+ [ 8] SetGlobal `i`, src:Int32(0)
+ [ 18] MovSrcUndefined dst:reg5
+ [ 20] Jump target:block3
block1:
- [ 30] Jump target:block8
+ [ 28] Jump target:block8
block2:
- [ 38] GetGlobal value_feedback:1, dst:reg7, `i`
- [ 48] PostfixIncrement arith_feedback:1, dst:reg6, src:reg7
- [ 58] SetGlobal `i`, src:reg7
+ [ 30] GetGlobal value_feedback:1, dst:reg7, `i`
+ [ 40] PostfixIncrement arith_feedback:1, dst:reg6, src:reg7
+ [ 50] SetGlobal `i`, src:reg7
block3:
- [ 68] GetGlobal value_feedback:0, dst:reg6, `i`
- [ 78] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:reg6, rhs:5, true_target:block1, false_target:block4
+ [ 60] GetGlobal value_feedback:0, dst:reg6, `i`
+ [ 70] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:reg6, rhs:5, true_target:block1, false_target:block4
block4:
- [ 90] GetGlobal value_feedback:4, dst:reg10, `i`
- [ a0] StrictlyInequalsRhsInt32 arith_feedback:5, dst:reg8, lhs:reg10, rhs:5
- [ b0] MovSrcUndefined dst:reg10
- [ b8] JumpIf condition:reg8, true_target:block14, false_target:block15
+ [ 88] GetGlobal value_feedback:4, dst:reg10, `i`
+ [ 98] StrictlyInequalsRhsInt32 arith_feedback:5, dst:reg8, lhs:reg10, rhs:5
+ [ a8] MovSrcUndefined dst:reg10
+ [ b0] JumpIf condition:reg8, true_target:block14, false_target:block15
block5:
- [ c8] Catch value_feedback:2, dst:reg7
- [ d0] SetLexicalEnvironment environment:reg4
- [ d8] Mov dst:reg6, src:Int32(1)
+ [ c0] Catch value_feedback:2, dst:reg7
+ [ c8] Mov dst:reg6, src:Int32(1)
block6:
- [ e8] MovSrcUndefined dst:reg9
- [ f0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg6, rhs:0, true_target:block9, false_target:block10
+ [ d8] MovSrcUndefined dst:reg9
+ [ e0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg6, rhs:0, true_target:block9, false_target:block10
block7:
- [ 108] Catch value_feedback:3, dst:reg8
- [ 110] SetLexicalEnvironment environment:reg4
- [ 118] Mov3 c0_dst:e~0, c0_src:reg8, c1_dst:reg9, c1_src:Undefined, c2_dst:reg10, c2_src:reg9
- [ 138] Mov dst:reg6, src:Int32(0)
- [ 148] JumpLoop target:block6
+ [ f8] Catch value_feedback:3, dst:reg8
+ [ 100] Mov3 c0_dst:e~0, c0_src:reg8, c1_dst:reg9, c1_src:Undefined, c2_dst:reg10, c2_src:reg9
+ [ 120] Mov dst:reg6, src:Int32(0)
+ [ 130] JumpLoop target:block6
block8:
- [ 150] Mov3 c0_dst:reg8, c0_src:Undefined, c1_dst:reg5, c1_src:reg8, c2_dst:reg6, c2_src:Int32(3)
- [ 170] JumpLoop target:block6
+ [ 138] Mov3 c0_dst:reg8, c0_src:Undefined, c1_dst:reg5, c1_src:reg8, c2_dst:reg6, c2_src:Int32(3)
+ [ 158] JumpLoop target:block6
block9:
- [ 178] Mov dst:reg5, src:reg10
- [ 188] JumpLoop target:block2
+ [ 160] Mov dst:reg5, src:reg10
+ [ 170] JumpLoop target:block2
block10:
- [ 190] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:3, lhs:reg6, rhs:3, true_target:block2, false_target:block11
+ [ 178] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:3, lhs:reg6, rhs:3, true_target:block2, false_target:block11
block11:
- [ 1a8] JumpStrictlyEqualsRhsInt32 arith_feedback:4, lhs:reg6, rhs:2, true_target:block12, false_target:block13
+ [ 190] JumpStrictlyEqualsRhsInt32 arith_feedback:4, lhs:reg6, rhs:2, true_target:block12, false_target:block13
block12:
- [ 1c0] Return value:reg7
+ [ 1a8] Return value:reg7
block13:
- [ 1c8] Throw src:reg7
+ [ 1b0] Throw src:reg7
block14:
- [ 1d0] Throw src:String("bad")
+ [ 1b8] Throw src:String("bad")
block15:
- [ 1d8] End value:reg10
+ [ 1c0] End value:reg10
Exception handlers:
- [ 108 .. 150] => handler block5
- [ 150 .. 178] => handler block7
+ [ f8 .. 138] => handler block5
+ [ 138 .. 160] => handler block7
diff --git a/Tests/LibJS/Bytecode/expected/generator-yield-finally.txt b/Tests/LibJS/Bytecode/expected/generator-yield-finally.txt
index 38d6c196097..9033d765f17 100644
--- a/Tests/LibJS/Bytecode/expected/generator-yield-finally.txt
+++ b/Tests/LibJS/Bytecode/expected/generator-yield-finally.txt
@@ -11,7 +11,7 @@ block0:
[ 38] End value:reg5
-f$e9b5f1bc generator-yield-finally.js:4:5
+f$e6f200ac generator-yield-finally.js:4:5
Registers: 13
Blocks: 24
Constants:
@@ -24,89 +24,87 @@ f$e9b5f1bc generator-yield-finally.js:4:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Yield continuation_label:block1, value:Undefined
+ [ 8] Yield continuation_label:block1, value:Undefined
block1:
- [ 20] Jump target:block4
+ [ 18] Jump target:block4
block2:
- [ 28] Catch value_feedback:0, dst:reg6
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov dst:reg5, src:Int32(1)
+ [ 20] Catch value_feedback:0, dst:reg6
+ [ 28] Mov dst:reg5, src:Int32(1)
block3:
- [ 48] Mov dst:reg10, src:reg1
- [ 58] Yield continuation_label:block15, value:Int32(3)
+ [ 38] Mov dst:reg10, src:reg1
+ [ 48] Yield continuation_label:block15, value:Int32(3)
block4:
- [ 68] Yield continuation_label:block5, value:Int32(1)
+ [ 58] Yield continuation_label:block5, value:Int32(1)
block5:
- [ 78] Mov dst:reg7, src:reg0
- [ 88] GetCompletionFields type_dst:reg8, value_dst:reg9, completion:reg7
- [ 98] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg8, rhs:1, true_target:block6, false_target:block7
+ [ 68] Mov dst:reg7, src:reg0
+ [ 78] GetCompletionFields type_dst:reg8, value_dst:reg9, completion:reg7
+ [ 88] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg8, rhs:1, true_target:block6, false_target:block7
block6:
- [ b0] Yield continuation_label:block10, value:Int32(2)
+ [ a0] Yield continuation_label:block10, value:Int32(2)
block7:
- [ c0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg8, rhs:5, true_target:block8, false_target:block9
+ [ b0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg8, rhs:5, true_target:block8, false_target:block9
block8:
- [ d8] Throw src:reg9
+ [ c8] Throw src:reg9
block9:
- [ e0] Mov2 c0_dst:reg6, c0_src:reg9, c1_dst:reg5, c1_src:Int32(2)
- [ f8] JumpLoop target:block3
+ [ d0] Mov2 c0_dst:reg6, c0_src:reg9, c1_dst:reg5, c1_src:Int32(2)
+ [ e8] JumpLoop target:block3
block10:
- [ 100] Mov dst:reg9, src:reg0
- [ 110] GetCompletionFields type_dst:reg7, value_dst:reg8, completion:reg9
- [ 120] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg7, rhs:1, true_target:block11, false_target:block12
+ [ f0] Mov dst:reg9, src:reg0
+ [ 100] GetCompletionFields type_dst:reg7, value_dst:reg8, completion:reg9
+ [ 110] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:reg7, rhs:1, true_target:block11, false_target:block12
block11:
- [ 138] Mov dst:reg5, src:Int32(0)
- [ 148] JumpLoop target:block3
+ [ 128] Mov dst:reg5, src:Int32(0)
+ [ 138] JumpLoop target:block3
block12:
- [ 150] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:5, true_target:block13, false_target:block14
+ [ 140] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:5, true_target:block13, false_target:block14
block13:
- [ 168] Throw src:reg8
+ [ 158] Throw src:reg8
block14:
- [ 170] Mov2 c0_dst:reg6, c0_src:reg8, c1_dst:reg5, c1_src:Int32(2)
- [ 188] JumpLoop target:block3
+ [ 160] Mov2 c0_dst:reg6, c0_src:reg8, c1_dst:reg5, c1_src:Int32(2)
+ [ 178] JumpLoop target:block3
block15:
- [ 190] Mov2 c0_dst:reg1, c0_src:reg10, c1_dst:reg8, c1_src:reg0
- [ 1a8] GetCompletionFields type_dst:reg9, value_dst:reg7, completion:reg8
- [ 1b8] JumpStrictlyEqualsRhsInt32 arith_feedback:4, lhs:reg9, rhs:1, true_target:block16, false_target:block17
+ [ 180] Mov2 c0_dst:reg1, c0_src:reg10, c1_dst:reg8, c1_src:reg0
+ [ 198] GetCompletionFields type_dst:reg9, value_dst:reg7, completion:reg8
+ [ 1a8] JumpStrictlyEqualsRhsInt32 arith_feedback:4, lhs:reg9, rhs:1, true_target:block16, false_target:block17
block16:
- [ 1d0] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg5, rhs:0, true_target:block20, false_target:block21
+ [ 1c0] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg5, rhs:0, true_target:block20, false_target:block21
block17:
- [ 1e8] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg9, rhs:5, true_target:block18, false_target:block19
+ [ 1d8] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg9, rhs:5, true_target:block18, false_target:block19
block18:
- [ 200] Throw src:reg7
+ [ 1f0] Throw src:reg7
block19:
- [ 208] Yield value:reg7
+ [ 1f8] Yield value:reg7
block20:
- [ 218] Yield value:Undefined
+ [ 208] Yield value:Undefined
block21:
- [ 228] JumpStrictlyEqualsRhsInt32 arith_feedback:7, lhs:reg5, rhs:2, true_target:block22, false_target:block23
+ [ 218] JumpStrictlyEqualsRhsInt32 arith_feedback:7, lhs:reg5, rhs:2, true_target:block22, false_target:block23
block22:
- [ 240] Yield value:reg6
+ [ 230] Yield value:reg6
block23:
- [ 250] Throw src:reg6
+ [ 240] Throw src:reg6
Exception handlers:
- [ 68 .. 190] => handler block2
+ [ 58 .. 180] => handler block2
diff --git a/Tests/LibJS/Bytecode/expected/indexed-append-guards.txt b/Tests/LibJS/Bytecode/expected/indexed-append-guards.txt
index 0c245a71860..b6f309a7de0 100644
--- a/Tests/LibJS/Bytecode/expected/indexed-append-guards.txt
+++ b/Tests/LibJS/Bytecode/expected/indexed-append-guards.txt
@@ -76,7 +76,7 @@ block6:
[ 3d8] End value:reg5
-expect_type_error$f9cd6888 indexed-append-guards.js:4:5
+expect_type_error$fc915998 indexed-append-guards.js:4:5
Registers: 9
Blocks: 8
Locals: error~0, did_throw~1
@@ -88,43 +88,41 @@ expect_type_error$f9cd6888 indexed-append-guards.js:4:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:did_throw~1, src:Bool(false)
- [ 20] Jump target:block5
+ [ 8] Mov dst:did_throw~1, src:Bool(false)
+ [ 18] Jump target:block5
block1:
- [ 28] Catch value_feedback:0, dst:reg5
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov dst:error~0, src:reg5
- [ 48] GetGlobal value_feedback:1, dst:reg7, `TypeError`
- [ 58] InstanceOf dst:reg8, lhs:error~0, rhs:reg7
- [ 68] Not dst:reg6, src:reg8
- [ 78] JumpFalse condition:reg6, target:block3
+ [ 20] Catch value_feedback:0, dst:reg5
+ [ 28] Mov dst:error~0, src:reg5
+ [ 38] GetGlobal value_feedback:1, dst:reg7, `TypeError`
+ [ 48] InstanceOf dst:reg8, lhs:error~0, rhs:reg7
+ [ 58] Not dst:reg6, src:reg8
+ [ 68] JumpFalse condition:reg6, target:block3
block2:
- [ 88] Throw src:error~0
+ [ 78] Throw src:error~0
block3:
- [ 90] Mov dst:did_throw~1, src:Bool(true)
+ [ 80] Mov dst:did_throw~1, src:Bool(true)
block4:
- [ a0] Not dst:reg5, src:did_throw~1
- [ b0] JumpIf condition:reg5, true_target:block6, false_target:block7
+ [ 90] Not dst:reg5, src:did_throw~1
+ [ a0] JumpIf condition:reg5, true_target:block6, false_target:block7
block5:
- [ c0] Call value_feedback:2, call_feedback:0, dst:reg5, callee:arg0, this_value:Undefined, callback
- [ e0] JumpLoop target:block4
+ [ b0] Call value_feedback:2, call_feedback:0, dst:reg5, callee:arg0, this_value:Undefined, callback
+ [ d0] JumpLoop target:block4
block6:
- [ e8] GetGlobal value_feedback:3, dst:reg8, `Error`
- [ f8] CallConstruct value_feedback:4, call_feedback:1, dst:reg6, callee:reg8, Error, arguments:[String("Expected TypeError")]
- [ 120] Throw src:reg6
+ [ d8] GetGlobal value_feedback:3, dst:reg8, `Error`
+ [ e8] CallConstruct value_feedback:4, call_feedback:1, dst:reg6, callee:reg8, Error, arguments:[String("Expected TypeError")]
+ [ 110] Throw src:reg6
block7:
- [ 128] End value:Undefined
+ [ 118] End value:Undefined
Exception handlers:
- [ c0 .. e8] => handler block1
+ [ b0 .. d8] => handler block1
$e425a642 indexed-append-guards.js:18:5
diff --git a/Tests/LibJS/Bytecode/expected/invalid-lhs-assignment-no-dead-code.txt b/Tests/LibJS/Bytecode/expected/invalid-lhs-assignment-no-dead-code.txt
index 67f9e0d2e7a..b72dafdc939 100644
--- a/Tests/LibJS/Bytecode/expected/invalid-lhs-assignment-no-dead-code.txt
+++ b/Tests/LibJS/Bytecode/expected/invalid-lhs-assignment-no-dead-code.txt
@@ -1,4 +1,4 @@
-$2c4e495c invalid-lhs-assignment-no-dead-code.js:8:1
+$3a21feac invalid-lhs-assignment-no-dead-code.js:8:1
Registers: 10
Blocks: 3
Constants:
@@ -6,25 +6,23 @@ $2c4e495c invalid-lhs-assignment-no-dead-code.js:8:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block2
+ [ 8] Jump target:block2
block1:
- [ 18] Catch value_feedback:0, dst:reg5
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov2 c0_dst:reg6, c0_src:Undefined, c1_dst:reg7, c1_src:reg6
- [ 40] End value:reg6
+ [ 10] Catch value_feedback:0, dst:reg5
+ [ 18] Mov2 c0_dst:reg6, c0_src:Undefined, c1_dst:reg7, c1_src:reg6
+ [ 30] End value:reg6
block2:
- [ 48] MovSrcUndefined dst:reg5
- [ 50] GetGlobal value_feedback:1, dst:reg8, `f`
- [ 60] NewFunction dst:reg9, shared_function_data_index:0
- [ 78] Call value_feedback:2, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined, f, arguments:[reg9]
- [ a0] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
- [ b8] End value:reg6
+ [ 38] MovSrcUndefined dst:reg5
+ [ 40] GetGlobal value_feedback:1, dst:reg8, `f`
+ [ 50] NewFunction dst:reg9, shared_function_data_index:0
+ [ 68] Call value_feedback:2, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined, f, arguments:[reg9]
+ [ 90] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
+ [ a8] End value:reg6
Exception handlers:
- [ 48 .. c0] => handler block1
+ [ 38 .. b0] => handler block1
f$cb5318f8 invalid-lhs-assignment-no-dead-code.js:5:6
diff --git a/Tests/LibJS/Bytecode/expected/lexical-env-teardown.txt b/Tests/LibJS/Bytecode/expected/lexical-env-teardown.txt
index 823a832cbd6..30b53340ebb 100644
--- a/Tests/LibJS/Bytecode/expected/lexical-env-teardown.txt
+++ b/Tests/LibJS/Bytecode/expected/lexical-env-teardown.txt
@@ -126,7 +126,7 @@ block5:
[ f0] JumpLoop target:block2
-forOfTeardown$1604a71f lexical-env-teardown.js:38:5
+forOfTeardown$1340b60f lexical-env-teardown.js:38:5
Registers: 12
Blocks: 9
Locals: v~0, outer~1
@@ -138,48 +138,46 @@ forOfTeardown$1604a71f lexical-env-teardown.js:38:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:outer~1, src:Int32(5)
- [ 20] NewPrimitiveArray dst:reg5, elements:[10, 20]
- [ 40] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
- [ 60] Jump target:block2
+ [ 8] Mov dst:outer~1, src:Int32(5)
+ [ 18] NewPrimitiveArray dst:reg5, elements:[10, 20]
+ [ 38] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
+ [ 58] Jump target:block2
block1:
- [ 68] Return value:outer~1
+ [ 60] Return value:outer~1
block2:
- [ 70] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
- [ 88] JumpIfLoop condition:reg11, true_target:block1, false_target:block4
+ [ 68] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
+ [ 80] JumpIfLoop condition:reg11, true_target:block1, false_target:block4
block3:
- [ 98] Catch value_feedback:0, dst:reg9
- [ a0] SetLexicalEnvironment environment:reg4
- [ a8] Mov dst:reg5, src:Int32(1)
- [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:1, true_target:block5, false_target:block6
+ [ 90] Catch value_feedback:0, dst:reg9
+ [ 98] Mov dst:reg5, src:Int32(1)
+ [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:1, true_target:block5, false_target:block6
block4:
- [ d0] Mov dst:v~0, src:reg10
- [ e0] JumpLoop target:block2
+ [ c0] Mov dst:v~0, src:reg10
+ [ d0] JumpLoop target:block2
block5:
- [ e8] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
- [ 108] Throw src:reg9
+ [ d8] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
+ [ f8] Throw src:reg9
block6:
- [ 110] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
- [ 130] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
+ [ 100] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
+ [ 120] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
block7:
- [ 148] Return value:reg9
+ [ 138] Return value:reg9
block8:
- [ 150] Throw src:reg9
+ [ 140] Throw src:reg9
Exception handlers:
- [ d0 .. e8] => handler block3
+ [ c0 .. d8] => handler block3
-catchTeardown$68bf4d7d lexical-env-teardown.js:48:5
+catchTeardown$6b833e8d lexical-env-teardown.js:48:5
Registers: 7
Blocks: 3
Locals: e~0, outer~1
@@ -190,23 +188,21 @@ catchTeardown$68bf4d7d lexical-env-teardown.js:48:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:outer~1, src:Int32(6)
- [ 20] Jump target:block2
+ [ 8] Mov dst:outer~1, src:Int32(6)
+ [ 18] Jump target:block2
block1:
- [ 28] Catch value_feedback:0, dst:reg5
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov dst:e~0, src:reg5
- [ 48] Return value:outer~1
+ [ 20] Catch value_feedback:0, dst:reg5
+ [ 28] Mov dst:e~0, src:reg5
+ [ 38] Return value:outer~1
block2:
- [ 50] GetGlobal value_feedback:1, dst:reg6, `Error`
- [ 60] CallConstruct value_feedback:2, call_feedback:0, dst:reg5, callee:reg6, Error, arguments:[String("test")]
- [ 88] Throw src:reg5
+ [ 40] GetGlobal value_feedback:1, dst:reg6, `Error`
+ [ 50] CallConstruct value_feedback:2, call_feedback:0, dst:reg5, callee:reg6, Error, arguments:[String("test")]
+ [ 78] Throw src:reg5
Exception handlers:
- [ 50 .. 90] => handler block1
+ [ 40 .. 80] => handler block1
myName$36b03aef lexical-env-teardown.js:60:5
diff --git a/Tests/LibJS/Bytecode/expected/nested-try-finally-continue.txt b/Tests/LibJS/Bytecode/expected/nested-try-finally-continue.txt
index fa71232c2d0..5d8f9a3b9b8 100644
--- a/Tests/LibJS/Bytecode/expected/nested-try-finally-continue.txt
+++ b/Tests/LibJS/Bytecode/expected/nested-try-finally-continue.txt
@@ -11,7 +11,7 @@ block0:
[ 38] End value:reg5
-nestedTryFinallyContinue$c82ca5be nested-try-finally-continue.js:2:5
+nestedTryFinallyContinue$4142cb16 nested-try-finally-continue.js:2:5
Registers: 13
Blocks: 24
Locals: i~0
@@ -26,100 +26,97 @@ nestedTryFinallyContinue$c82ca5be nested-try-finally-continue.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:i~0, src:Int32(0)
- [ 20] Jump target:block3
+ [ 8] Mov dst:i~0, src:Int32(0)
+ [ 18] Jump target:block3
block1:
- [ 28] Jump target:block7
+ [ 20] Jump target:block7
block2:
- [ 30] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
+ [ 28] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
block3:
- [ 40] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:3, true_target:block1, false_target:block4
+ [ 38] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:3, true_target:block1, false_target:block4
block4:
- [ 58] End value:Undefined
+ [ 50] End value:Undefined
block5:
- [ 60] Catch value_feedback:0, dst:reg6
- [ 68] SetLexicalEnvironment environment:reg4
- [ 70] Mov dst:reg5, src:Int32(1)
+ [ 58] Catch value_feedback:0, dst:reg6
+ [ 60] Mov dst:reg5, src:Int32(1)
block6:
- [ 80] GetGlobal value_feedback:5, dst:reg8, `console`
- [ 90] GetById value_feedback:6, dst:reg9, base:reg8, `log` (console.log)
- [ a8] Mov dst:reg11, src:i~0
- [ b8] Call value_feedback:7, call_feedback:1, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[String("outer"), reg11]
- [ e0] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg5, rhs:0, true_target:block19, false_target:block20
+ [ 70] GetGlobal value_feedback:5, dst:reg8, `console`
+ [ 80] GetById value_feedback:6, dst:reg9, base:reg8, `log` (console.log)
+ [ 98] Mov dst:reg11, src:i~0
+ [ a8] Call value_feedback:7, call_feedback:1, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[String("outer"), reg11]
+ [ d0] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg5, rhs:0, true_target:block19, false_target:block20
block7:
- [ f8] Jump target:block10
+ [ e8] Jump target:block10
block8:
- [ 100] Catch value_feedback:1, dst:reg8
- [ 108] SetLexicalEnvironment environment:reg4
- [ 110] Mov dst:reg7, src:Int32(1)
+ [ f0] Catch value_feedback:1, dst:reg8
+ [ f8] Mov dst:reg7, src:Int32(1)
block9:
- [ 120] GetGlobal value_feedback:2, dst:reg10, `console`
- [ 130] GetById value_feedback:3, dst:reg11, base:reg10, `log` (console.log)
- [ 148] Mov dst:reg12, src:i~0
- [ 158] Call value_feedback:4, call_feedback:0, dst:reg9, callee:reg11, this_value:reg10, console.log, arguments:[String("inner"), reg12]
- [ 180] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:0, true_target:block14, false_target:block15
+ [ 108] GetGlobal value_feedback:2, dst:reg10, `console`
+ [ 118] GetById value_feedback:3, dst:reg11, base:reg10, `log` (console.log)
+ [ 130] Mov dst:reg12, src:i~0
+ [ 140] Call value_feedback:4, call_feedback:0, dst:reg9, callee:reg11, this_value:reg10, console.log, arguments:[String("inner"), reg12]
+ [ 168] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:0, true_target:block14, false_target:block15
block10:
- [ 198] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:1, true_target:block11, false_target:block12
+ [ 180] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:1, true_target:block11, false_target:block12
block11:
- [ 1b0] Mov dst:reg7, src:Int32(3)
- [ 1c0] JumpLoop target:block9
+ [ 198] Mov dst:reg7, src:Int32(3)
+ [ 1a8] JumpLoop target:block9
block12:
- [ 1c8] Mov dst:reg7, src:Int32(0)
- [ 1d8] JumpLoop target:block9
+ [ 1b0] Mov dst:reg7, src:Int32(0)
+ [ 1c0] JumpLoop target:block9
block13:
- [ 1e0] Mov dst:reg5, src:Int32(3)
- [ 1f0] JumpLoop target:block6
+ [ 1c8] Mov dst:reg5, src:Int32(3)
+ [ 1d8] JumpLoop target:block6
block14:
- [ 1f8] Mov dst:reg5, src:Int32(0)
- [ 208] JumpLoop target:block6
+ [ 1e0] Mov dst:reg5, src:Int32(0)
+ [ 1f0] JumpLoop target:block6
block15:
- [ 210] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:4, lhs:reg7, rhs:3, true_target:block13, false_target:block16
+ [ 1f8] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:4, lhs:reg7, rhs:3, true_target:block13, false_target:block16
block16:
- [ 228] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg7, rhs:2, true_target:block17, false_target:block18
+ [ 210] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg7, rhs:2, true_target:block17, false_target:block18
block17:
- [ 240] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg6, c1_src:reg8
- [ 258] JumpLoop target:block6
+ [ 228] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg6, c1_src:reg8
+ [ 240] JumpLoop target:block6
block18:
- [ 260] Throw src:reg8
+ [ 248] Throw src:reg8
block19:
- [ 268] JumpLoop target:block2
+ [ 250] JumpLoop target:block2
block20:
- [ 270] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:7, lhs:reg5, rhs:3, true_target:block2, false_target:block21
+ [ 258] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:7, lhs:reg5, rhs:3, true_target:block2, false_target:block21
block21:
- [ 288] JumpStrictlyEqualsRhsInt32 arith_feedback:8, lhs:reg5, rhs:2, true_target:block22, false_target:block23
+ [ 270] JumpStrictlyEqualsRhsInt32 arith_feedback:8, lhs:reg5, rhs:2, true_target:block22, false_target:block23
block22:
- [ 2a0] Return value:reg6
+ [ 288] Return value:reg6
block23:
- [ 2a8] Throw src:reg6
+ [ 290] Throw src:reg6
Exception handlers:
- [ f8 .. 198] => handler block5
- [ 198 .. 1f8] => handler block8
- [ 1f8 .. 268] => handler block5
+ [ e8 .. 180] => handler block5
+ [ 180 .. 1e0] => handler block8
+ [ 1e0 .. 250] => handler block5
"inner" 0
diff --git a/Tests/LibJS/Bytecode/expected/sequential-try-blocks.txt b/Tests/LibJS/Bytecode/expected/sequential-try-blocks.txt
index 5645bd666c0..66bd1c017b8 100644
--- a/Tests/LibJS/Bytecode/expected/sequential-try-blocks.txt
+++ b/Tests/LibJS/Bytecode/expected/sequential-try-blocks.txt
@@ -14,7 +14,7 @@ block0:
[ 88] End value:reg5
-sequentialTryCatch$89225e66 sequential-try-blocks.js:2:5
+sequentialTryCatch$0d4847fe sequential-try-blocks.js:2:5
Registers: 8
Blocks: 5
Locals: e~0, e~1, result~2
@@ -29,41 +29,38 @@ sequentialTryCatch$89225e66 sequential-try-blocks.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:result~2, src:String("")
- [ 20] Jump target:block2
+ [ 8] Mov dst:result~2, src:String("")
+ [ 18] Jump target:block2
block1:
- [ 28] Catch value_feedback:0, dst:reg5
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov2 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:result~2
- [ 50] Add arith_feedback:0, dst:reg7, lhs:reg6, rhs:String("b")
- [ 60] Mov dst:result~2, src:reg7
- [ 70] Jump target:block4
+ [ 20] Catch value_feedback:0, dst:reg5
+ [ 28] Mov2 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:result~2
+ [ 40] Add arith_feedback:0, dst:reg7, lhs:reg6, rhs:String("b")
+ [ 50] Mov dst:result~2, src:reg7
+ [ 60] Jump target:block4
block2:
- [ 78] Mov dst:reg5, src:result~2
- [ 88] Add arith_feedback:1, dst:reg7, lhs:reg5, rhs:String("a")
- [ 98] Mov dst:result~2, src:reg7
- [ a8] Throw src:Int32(1)
+ [ 68] Mov dst:reg5, src:result~2
+ [ 78] Add arith_feedback:1, dst:reg7, lhs:reg5, rhs:String("a")
+ [ 88] Mov dst:result~2, src:reg7
+ [ 98] Throw src:Int32(1)
block3:
- [ b0] Catch value_feedback:1, dst:reg7
- [ b8] SetLexicalEnvironment environment:reg4
- [ c0] Mov2 c0_dst:e~1, c0_src:reg7, c1_dst:reg5, c1_src:result~2
- [ d8] Add arith_feedback:2, dst:reg6, lhs:reg5, rhs:String("d")
- [ e8] Mov dst:result~2, src:reg6
- [ f8] Return value:result~2
+ [ a0] Catch value_feedback:1, dst:reg7
+ [ a8] Mov2 c0_dst:e~1, c0_src:reg7, c1_dst:reg5, c1_src:result~2
+ [ c0] Add arith_feedback:2, dst:reg6, lhs:reg5, rhs:String("d")
+ [ d0] Mov dst:result~2, src:reg6
+ [ e0] Return value:result~2
block4:
- [ 100] Mov dst:reg7, src:result~2
- [ 110] Add arith_feedback:3, dst:reg6, lhs:reg7, rhs:String("c")
- [ 120] Mov dst:result~2, src:reg6
- [ 130] Throw src:Int32(2)
+ [ e8] Mov dst:reg7, src:result~2
+ [ f8] Add arith_feedback:3, dst:reg6, lhs:reg7, rhs:String("c")
+ [ 108] Mov dst:result~2, src:reg6
+ [ 118] Throw src:Int32(2)
Exception handlers:
- [ 78 .. b0] => handler block1
- [ 100 .. 138] => handler block3
+ [ 68 .. a0] => handler block1
+ [ e8 .. 120] => handler block3
"abcd"
diff --git a/Tests/LibJS/Bytecode/expected/super-for-of-resolve-order.txt b/Tests/LibJS/Bytecode/expected/super-for-of-resolve-order.txt
index 61b87b042a5..62ecc648370 100644
--- a/Tests/LibJS/Bytecode/expected/super-for-of-resolve-order.txt
+++ b/Tests/LibJS/Bytecode/expected/super-for-of-resolve-order.txt
@@ -17,7 +17,7 @@ block0:
[ a0] End value:reg6
-C$98034246 super-for-of-resolve-order.js:3:28
+C$a04f1576 super-for-of-resolve-order.js:3:28
Registers: 13
Blocks: 9
Constants:
@@ -28,43 +28,41 @@ C$98034246 super-for-of-resolve-order.js:3:28
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] NewPrimitiveArray dst:reg5, elements:[1, 2]
- [ 30] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
- [ 50] Jump target:block2
+ [ 8] NewPrimitiveArray dst:reg5, elements:[1, 2]
+ [ 28] GetIterator dst_iterator_object:reg6, dst_iterator_next:reg7, dst_iterator_done:reg8, iterable:reg5, fast_array_mode_allowed:true
+ [ 48] Jump target:block2
block1:
- [ 58] End value:Undefined
+ [ 50] End value:Undefined
block2:
- [ 60] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
- [ 78] JumpIfLoop condition:reg11, true_target:block1, false_target:block4
+ [ 58] IteratorNextUnpack dst_value:reg10, dst_done:reg11, iterator_object:reg6, iterator_next:reg7, iterator_done:reg8
+ [ 70] JumpIfLoop condition:reg11, true_target:block1, false_target:block4
block3:
- [ 88] Catch value_feedback:0, dst:reg9
- [ 90] SetLexicalEnvironment environment:reg4
- [ 98] Mov dst:reg5, src:Int32(1)
- [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:1, true_target:block5, false_target:block6
+ [ 80] Catch value_feedback:0, dst:reg9
+ [ 88] Mov dst:reg5, src:Int32(1)
+ [ 98] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:1, true_target:block5, false_target:block6
block4:
- [ c0] ResolveThisBinding
- [ c8] ResolveSuperBase dst:reg12
- [ d0] PutByIdWithThis base:reg12, this_value:this, `prop`, src:reg10, kind:Normal
- [ f0] JumpLoop target:block2
+ [ b0] ResolveThisBinding
+ [ b8] ResolveSuperBase dst:reg12
+ [ c0] PutByIdWithThis base:reg12, this_value:this, `prop`, src:reg10, kind:Normal
+ [ e0] JumpLoop target:block2
block5:
- [ f8] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
- [ 118] Throw src:reg9
+ [ e8] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:reg9
+ [ 108] Throw src:reg9
block6:
- [ 120] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
- [ 140] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
+ [ 110] IteratorClose iterator_object:reg6, iterator_next:reg7, iterator_done:reg8, completion_value:Undefined
+ [ 130] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
block7:
- [ 158] Return value:reg9
+ [ 148] Return value:reg9
block8:
- [ 160] Throw src:reg9
+ [ 150] Throw src:reg9
Exception handlers:
- [ c0 .. f8] => handler block3
+ [ b0 .. e8] => handler block3
diff --git a/Tests/LibJS/Bytecode/expected/this-base-identifier.txt b/Tests/LibJS/Bytecode/expected/this-base-identifier.txt
index c5964de14c4..b1c2a8b1460 100644
--- a/Tests/LibJS/Bytecode/expected/this-base-identifier.txt
+++ b/Tests/LibJS/Bytecode/expected/this-base-identifier.txt
@@ -1,4 +1,4 @@
-$fc88b9ef this-base-identifier.js:16:1
+$c5edd9d4 this-base-identifier.js:16:1
Registers: 10
Blocks: 3
Constants:
@@ -6,28 +6,26 @@ $fc88b9ef this-base-identifier.js:16:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] GetGlobal value_feedback:0, dst:reg6, `get_from_this`
- [ 20] Call value_feedback:1, call_feedback:0, dst:reg5, callee:reg6, this_value:Undefined, get_from_this
- [ 40] GetGlobal value_feedback:2, dst:reg7, `set_on_this`
- [ 50] Call value_feedback:3, call_feedback:1, dst:reg6, callee:reg7, this_value:Undefined, set_on_this
- [ 70] Jump target:block2
+ [ 8] GetGlobal value_feedback:0, dst:reg6, `get_from_this`
+ [ 18] Call value_feedback:1, call_feedback:0, dst:reg5, callee:reg6, this_value:Undefined, get_from_this
+ [ 38] GetGlobal value_feedback:2, dst:reg7, `set_on_this`
+ [ 48] Call value_feedback:3, call_feedback:1, dst:reg6, callee:reg7, this_value:Undefined, set_on_this
+ [ 68] Jump target:block2
block1:
- [ 78] Catch value_feedback:4, dst:reg5
- [ 80] SetLexicalEnvironment environment:reg4
- [ 88] Mov2 c0_dst:reg7, c0_src:Undefined, c1_dst:reg8, c1_src:reg7
- [ a0] End value:reg7
+ [ 70] Catch value_feedback:4, dst:reg5
+ [ 78] Mov2 c0_dst:reg7, c0_src:Undefined, c1_dst:reg8, c1_src:reg7
+ [ 90] End value:reg7
block2:
- [ a8] MovSrcUndefined dst:reg5
- [ b0] GetGlobal value_feedback:5, dst:reg9, `chained_this_access`
- [ c0] Call value_feedback:6, call_feedback:2, dst:reg7, callee:reg9, this_value:Undefined, chained_this_access
- [ e0] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg7, c1_src:reg5
- [ f8] End value:reg7
+ [ 98] MovSrcUndefined dst:reg5
+ [ a0] GetGlobal value_feedback:5, dst:reg9, `chained_this_access`
+ [ b0] Call value_feedback:6, call_feedback:2, dst:reg7, callee:reg9, this_value:Undefined, chained_this_access
+ [ d0] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg7, c1_src:reg5
+ [ e8] End value:reg7
Exception handlers:
- [ a8 .. 100] => handler block1
+ [ 98 .. f0] => handler block1
get_from_this$7b4d6173 this-base-identifier.js:5:5
diff --git a/Tests/LibJS/Bytecode/expected/try-catch-completion-ordering.txt b/Tests/LibJS/Bytecode/expected/try-catch-completion-ordering.txt
index d414c3c9a72..c880c9eb04f 100644
--- a/Tests/LibJS/Bytecode/expected/try-catch-completion-ordering.txt
+++ b/Tests/LibJS/Bytecode/expected/try-catch-completion-ordering.txt
@@ -1,4 +1,4 @@
-$63c57e75 try-catch-completion-ordering.js:1:1
+$66896f85 try-catch-completion-ordering.js:1:1
Registers: 8
Blocks: 3
Locals: e~0
@@ -9,19 +9,17 @@ $63c57e75 try-catch-completion-ordering.js:1:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block2
+ [ 8] Jump target:block2
block1:
- [ 18] Catch value_feedback:0, dst:reg5
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov3 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:Undefined, c2_dst:reg6, c2_src:Int32(42)
- [ 48] Mov dst:reg7, src:reg6
- [ 58] End value:reg7
+ [ 10] Catch value_feedback:0, dst:reg5
+ [ 18] Mov3 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:Undefined, c2_dst:reg6, c2_src:Int32(42)
+ [ 38] Mov dst:reg7, src:reg6
+ [ 48] End value:reg7
block2:
- [ 60] MovSrcUndefined dst:reg5
- [ 68] Throw src:Null
+ [ 50] MovSrcUndefined dst:reg5
+ [ 58] Throw src:Null
Exception handlers:
- [ 60 .. 70] => handler block1
+ [ 50 .. 60] => handler block1
diff --git a/Tests/LibJS/Bytecode/expected/try-catch-finally-register.txt b/Tests/LibJS/Bytecode/expected/try-catch-finally-register.txt
index 24f266dfda8..8e9df1a0e70 100644
--- a/Tests/LibJS/Bytecode/expected/try-catch-finally-register.txt
+++ b/Tests/LibJS/Bytecode/expected/try-catch-finally-register.txt
@@ -1,4 +1,4 @@
-$32b2807a try-catch-finally-register.js:1:1
+$ae8c96e2 try-catch-finally-register.js:1:1
Registers: 10
Blocks: 9
Locals: e~0
@@ -11,42 +11,39 @@ $32b2807a try-catch-finally-register.js:1:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block4
+ [ 8] Jump target:block4
block1:
- [ 18] Catch value_feedback:0, dst:reg6
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov dst:reg5, src:Int32(1)
+ [ 10] Catch value_feedback:0, dst:reg6
+ [ 18] Mov dst:reg5, src:Int32(1)
block2:
- [ 38] Mov2 c0_dst:reg9, c0_src:Undefined, c1_dst:reg9, c1_src:Int32(3)
- [ 50] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:0, true_target:block5, false_target:block6
+ [ 28] Mov2 c0_dst:reg9, c0_src:Undefined, c1_dst:reg9, c1_src:Int32(3)
+ [ 40] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:0, true_target:block5, false_target:block6
block3:
- [ 68] Catch value_feedback:1, dst:reg7
- [ 70] SetLexicalEnvironment environment:reg4
- [ 78] Mov3 c0_dst:e~0, c0_src:reg7, c1_dst:reg8, c1_src:Undefined, c2_dst:reg8, c2_src:Int32(2)
- [ 98] Mov2 c0_dst:reg9, c0_src:reg8, c1_dst:reg5, c1_src:Int32(0)
- [ b0] JumpLoop target:block2
+ [ 58] Catch value_feedback:1, dst:reg7
+ [ 60] Mov3 c0_dst:e~0, c0_src:reg7, c1_dst:reg8, c1_src:Undefined, c2_dst:reg8, c2_src:Int32(2)
+ [ 80] Mov2 c0_dst:reg9, c0_src:reg8, c1_dst:reg5, c1_src:Int32(0)
+ [ 98] JumpLoop target:block2
block4:
- [ b8] Mov3 c0_dst:reg7, c0_src:Undefined, c1_dst:reg7, c1_src:Int32(1), c2_dst:reg8, c2_src:reg7
- [ d8] Mov dst:reg5, src:Int32(0)
- [ e8] JumpLoop target:block2
+ [ a0] Mov3 c0_dst:reg7, c0_src:Undefined, c1_dst:reg7, c1_src:Int32(1), c2_dst:reg8, c2_src:reg7
+ [ c0] Mov dst:reg5, src:Int32(0)
+ [ d0] JumpLoop target:block2
block5:
- [ f0] End value:reg8
+ [ d8] End value:reg8
block6:
- [ f8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
+ [ e0] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
block7:
- [ 110] Return value:reg6
+ [ f8] Return value:reg6
block8:
- [ 118] Throw src:reg6
+ [ 100] Throw src:reg6
Exception handlers:
- [ 68 .. b8] => handler block1
- [ b8 .. f0] => handler block3
+ [ 58 .. a0] => handler block1
+ [ a0 .. d8] => handler block3
diff --git a/Tests/LibJS/Bytecode/expected/try-catch-scoping.txt b/Tests/LibJS/Bytecode/expected/try-catch-scoping.txt
index a8580f0e6ea..6564c064c60 100644
--- a/Tests/LibJS/Bytecode/expected/try-catch-scoping.txt
+++ b/Tests/LibJS/Bytecode/expected/try-catch-scoping.txt
@@ -13,7 +13,7 @@ block0:
[ 68] End value:reg6
-tryCatchWithBlocks$7de19348 try-catch-scoping.js:2:5
+tryCatchWithBlocks$862d6678 try-catch-scoping.js:2:5
Registers: 11
Blocks: 3
Locals: y~0, z~1, e~2, x~3
@@ -25,30 +25,28 @@ tryCatchWithBlocks$7de19348 try-catch-scoping.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:x~3, src:Int32(1)
- [ 20] Jump target:block2
+ [ 8] Mov dst:x~3, src:Int32(1)
+ [ 18] Jump target:block2
block1:
- [ 28] Catch value_feedback:0, dst:reg5
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov2 c0_dst:e~2, c0_src:reg5, c1_dst:z~1, c1_src:Int32(3)
- [ 50] GetGlobal value_feedback:1, dst:reg7, `console`
- [ 60] GetById value_feedback:2, dst:reg8, base:reg7, `log` (console.log)
- [ 78] Add arith_feedback:0, dst:reg9, lhs:x~3, rhs:e~2
- [ 88] Add arith_feedback:1, dst:reg10, lhs:reg9, rhs:z~1
- [ 98] Call value_feedback:3, call_feedback:0, dst:reg6, callee:reg8, this_value:reg7, console.log, arguments:[reg10]
- [ c0] End value:Undefined
+ [ 20] Catch value_feedback:0, dst:reg5
+ [ 28] Mov2 c0_dst:e~2, c0_src:reg5, c1_dst:z~1, c1_src:Int32(3)
+ [ 40] GetGlobal value_feedback:1, dst:reg7, `console`
+ [ 50] GetById value_feedback:2, dst:reg8, base:reg7, `log` (console.log)
+ [ 68] Add arith_feedback:0, dst:reg9, lhs:x~3, rhs:e~2
+ [ 78] Add arith_feedback:1, dst:reg10, lhs:reg9, rhs:z~1
+ [ 88] Call value_feedback:3, call_feedback:0, dst:reg6, callee:reg8, this_value:reg7, console.log, arguments:[reg10]
+ [ b0] End value:Undefined
block2:
- [ c8] Mov dst:y~0, src:Int32(2)
- [ d8] Throw src:y~0
+ [ b8] Mov dst:y~0, src:Int32(2)
+ [ c8] Throw src:y~0
Exception handlers:
- [ c8 .. e0] => handler block1
+ [ b8 .. d0] => handler block1
-tryCatchFinallyWithBlocks$2cda3f32 try-catch-scoping.js:14:5
+tryCatchFinallyWithBlocks$a5f0648a try-catch-scoping.js:14:5
Registers: 12
Blocks: 9
Locals: y~0, e~1, z~2, x~3
@@ -61,53 +59,50 @@ tryCatchFinallyWithBlocks$2cda3f32 try-catch-scoping.js:14:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:x~3, src:Int32(1)
- [ 20] Jump target:block4
+ [ 8] Mov dst:x~3, src:Int32(1)
+ [ 18] Jump target:block4
block1:
- [ 28] Catch value_feedback:0, dst:reg6
- [ 30] SetLexicalEnvironment environment:reg4
- [ 38] Mov dst:reg5, src:Int32(1)
+ [ 20] Catch value_feedback:0, dst:reg6
+ [ 28] Mov dst:reg5, src:Int32(1)
block2:
- [ 48] Mov dst:z~2, src:Int32(3)
- [ 58] GetGlobal value_feedback:5, dst:reg8, `console`
- [ 68] GetById value_feedback:6, dst:reg10, base:reg8, `log` (console.log)
- [ 80] Mov dst:reg9, src:z~2
- [ 90] Call value_feedback:7, call_feedback:1, dst:reg7, callee:reg10, this_value:reg8, console.log, arguments:[reg9]
- [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:0, true_target:block5, false_target:block6
+ [ 38] Mov dst:z~2, src:Int32(3)
+ [ 48] GetGlobal value_feedback:5, dst:reg8, `console`
+ [ 58] GetById value_feedback:6, dst:reg10, base:reg8, `log` (console.log)
+ [ 70] Mov dst:reg9, src:z~2
+ [ 80] Call value_feedback:7, call_feedback:1, dst:reg7, callee:reg10, this_value:reg8, console.log, arguments:[reg9]
+ [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:0, true_target:block5, false_target:block6
block3:
- [ d0] Catch value_feedback:1, dst:reg7
- [ d8] SetLexicalEnvironment environment:reg4
- [ e0] Mov dst:e~1, src:reg7
- [ f0] GetGlobal value_feedback:2, dst:reg9, `console`
- [ 100] GetById value_feedback:3, dst:reg10, base:reg9, `log` (console.log)
- [ 118] Mov dst:reg11, src:e~1
- [ 128] Call value_feedback:4, call_feedback:0, dst:reg8, callee:reg10, this_value:reg9, console.log, arguments:[reg11]
- [ 150] Mov dst:reg5, src:Int32(0)
- [ 160] JumpLoop target:block2
+ [ c0] Catch value_feedback:1, dst:reg7
+ [ c8] Mov dst:e~1, src:reg7
+ [ d8] GetGlobal value_feedback:2, dst:reg9, `console`
+ [ e8] GetById value_feedback:3, dst:reg10, base:reg9, `log` (console.log)
+ [ 100] Mov dst:reg11, src:e~1
+ [ 110] Call value_feedback:4, call_feedback:0, dst:reg8, callee:reg10, this_value:reg9, console.log, arguments:[reg11]
+ [ 138] Mov dst:reg5, src:Int32(0)
+ [ 148] JumpLoop target:block2
block4:
- [ 168] Mov dst:y~0, src:Int32(2)
- [ 178] Throw src:y~0
+ [ 150] Mov dst:y~0, src:Int32(2)
+ [ 160] Throw src:y~0
block5:
- [ 180] End value:Undefined
+ [ 168] End value:Undefined
block6:
- [ 188] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
+ [ 170] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block7, false_target:block8
block7:
- [ 1a0] Return value:reg6
+ [ 188] Return value:reg6
block8:
- [ 1a8] Throw src:reg6
+ [ 190] Throw src:reg6
Exception handlers:
- [ d0 .. 168] => handler block1
- [ 168 .. 180] => handler block3
+ [ c0 .. 150] => handler block1
+ [ 150 .. 168] => handler block3
6
diff --git a/Tests/LibJS/Bytecode/expected/try-catch-terminated.txt b/Tests/LibJS/Bytecode/expected/try-catch-terminated.txt
index 4f2bd08f1f4..73d575e1bb0 100644
--- a/Tests/LibJS/Bytecode/expected/try-catch-terminated.txt
+++ b/Tests/LibJS/Bytecode/expected/try-catch-terminated.txt
@@ -11,7 +11,7 @@ block0:
[ 38] End value:reg5
-try_return$e987f71f try-catch-terminated.js:5:5
+try_return$f1d3ca4f try-catch-terminated.js:5:5
Registers: 6
Blocks: 3
Locals: e~0
@@ -20,17 +20,15 @@ try_return$e987f71f try-catch-terminated.js:5:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block2
+ [ 8] Jump target:block2
block1:
- [ 18] Catch value_feedback:0, dst:reg5
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov dst:e~0, src:reg5
- [ 38] Return value:e~0
+ [ 10] Catch value_feedback:0, dst:reg5
+ [ 18] Mov dst:e~0, src:reg5
+ [ 28] Return value:e~0
block2:
- [ 40] Throw src:Int32(1)
+ [ 30] Throw src:Int32(1)
Exception handlers:
- [ 40 .. 48] => handler block1
+ [ 30 .. 38] => handler block1
diff --git a/Tests/LibJS/Bytecode/expected/try-finally-continue.txt b/Tests/LibJS/Bytecode/expected/try-finally-continue.txt
index ad64b9aba2e..f67a04345a7 100644
--- a/Tests/LibJS/Bytecode/expected/try-finally-continue.txt
+++ b/Tests/LibJS/Bytecode/expected/try-finally-continue.txt
@@ -19,7 +19,7 @@ block0:
[ 108] End value:reg7
-continueThroughFinally$c88b3db6 try-finally-continue.js:2:5
+continueThroughFinally$9f101dc6 try-finally-continue.js:2:5
Registers: 9
Blocks: 15
Locals: i~0, result~1
@@ -33,66 +33,64 @@ continueThroughFinally$c88b3db6 try-finally-continue.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov2 c0_dst:result~1, c0_src:Int32(0), c1_dst:i~0, c1_src:Int32(0)
- [ 28] Jump target:block3
+ [ 8] Mov2 c0_dst:result~1, c0_src:Int32(0), c1_dst:i~0, c1_src:Int32(0)
+ [ 20] Jump target:block3
block1:
- [ 30] Jump target:block7
+ [ 28] Jump target:block7
block2:
- [ 38] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
+ [ 30] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
block3:
- [ 48] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:3, true_target:block1, false_target:block4
+ [ 40] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:3, true_target:block1, false_target:block4
block4:
- [ 60] Return value:result~1
+ [ 58] Return value:result~1
block5:
- [ 68] Catch value_feedback:0, dst:reg6
- [ 70] SetLexicalEnvironment environment:reg4
- [ 78] Mov dst:reg5, src:Int32(1)
+ [ 60] Catch value_feedback:0, dst:reg6
+ [ 68] Mov dst:reg5, src:Int32(1)
block6:
- [ 88] Mov dst:reg8, src:result~1
- [ 98] AddRhsInt32 arith_feedback:4, dst:reg7, lhs:reg8, rhs:10
- [ a8] Mov dst:result~1, src:reg7
- [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg5, rhs:0, true_target:block10, false_target:block11
+ [ 78] Mov dst:reg8, src:result~1
+ [ 88] AddRhsInt32 arith_feedback:4, dst:reg7, lhs:reg8, rhs:10
+ [ 98] Mov dst:result~1, src:reg7
+ [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg5, rhs:0, true_target:block10, false_target:block11
block7:
- [ d0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:1, true_target:block8, false_target:block9
+ [ c0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:1, true_target:block8, false_target:block9
block8:
- [ e8] Mov dst:reg5, src:Int32(3)
- [ f8] JumpLoop target:block6
+ [ d8] Mov dst:reg5, src:Int32(3)
+ [ e8] JumpLoop target:block6
block9:
- [ 100] Mov dst:reg7, src:result~1
- [ 110] Add arith_feedback:3, dst:reg8, lhs:reg7, rhs:i~0
- [ 120] Mov2 c0_dst:result~1, c0_src:reg8, c1_dst:reg5, c1_src:Int32(0)
- [ 138] JumpLoop target:block6
+ [ f0] Mov dst:reg7, src:result~1
+ [ 100] Add arith_feedback:3, dst:reg8, lhs:reg7, rhs:i~0
+ [ 110] Mov2 c0_dst:result~1, c0_src:reg8, c1_dst:reg5, c1_src:Int32(0)
+ [ 128] JumpLoop target:block6
block10:
- [ 140] JumpLoop target:block2
+ [ 130] JumpLoop target:block2
block11:
- [ 148] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:6, lhs:reg5, rhs:3, true_target:block2, false_target:block12
+ [ 138] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:6, lhs:reg5, rhs:3, true_target:block2, false_target:block12
block12:
- [ 160] JumpStrictlyEqualsRhsInt32 arith_feedback:7, lhs:reg5, rhs:2, true_target:block13, false_target:block14
+ [ 150] JumpStrictlyEqualsRhsInt32 arith_feedback:7, lhs:reg5, rhs:2, true_target:block13, false_target:block14
block13:
- [ 178] Return value:reg6
+ [ 168] Return value:reg6
block14:
- [ 180] Throw src:reg6
+ [ 170] Throw src:reg6
Exception handlers:
- [ d0 .. 140] => handler block5
+ [ c0 .. 130] => handler block5
-breakThroughFinally$5813e0da try-finally-continue.js:16:5
+breakThroughFinally$39a8852a try-finally-continue.js:16:5
Registers: 9
Blocks: 15
Locals: i~0, result~1
@@ -107,63 +105,61 @@ breakThroughFinally$5813e0da try-finally-continue.js:16:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov2 c0_dst:result~1, c0_src:Int32(0), c1_dst:i~0, c1_src:Int32(0)
- [ 28] Jump target:block3
+ [ 8] Mov2 c0_dst:result~1, c0_src:Int32(0), c1_dst:i~0, c1_src:Int32(0)
+ [ 20] Jump target:block3
block1:
- [ 30] Jump target:block7
+ [ 28] Jump target:block7
block2:
- [ 38] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
+ [ 30] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
block3:
- [ 48] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:10, true_target:block1, false_target:block4
+ [ 40] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:10, true_target:block1, false_target:block4
block4:
- [ 60] Return value:result~1
+ [ 58] Return value:result~1
block5:
- [ 68] Catch value_feedback:0, dst:reg6
- [ 70] SetLexicalEnvironment environment:reg4
- [ 78] Mov dst:reg5, src:Int32(1)
+ [ 60] Catch value_feedback:0, dst:reg6
+ [ 68] Mov dst:reg5, src:Int32(1)
block6:
- [ 88] Mov dst:reg8, src:result~1
- [ 98] AddRhsInt32 arith_feedback:4, dst:reg7, lhs:reg8, rhs:100
- [ a8] Mov dst:result~1, src:reg7
- [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg5, rhs:0, true_target:block10, false_target:block11
+ [ 78] Mov dst:reg8, src:result~1
+ [ 88] AddRhsInt32 arith_feedback:4, dst:reg7, lhs:reg8, rhs:100
+ [ 98] Mov dst:result~1, src:reg7
+ [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg5, rhs:0, true_target:block10, false_target:block11
block7:
- [ d0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:2, true_target:block8, false_target:block9
+ [ c0] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:2, true_target:block8, false_target:block9
block8:
- [ e8] Mov dst:reg5, src:Int32(3)
- [ f8] JumpLoop target:block6
+ [ d8] Mov dst:reg5, src:Int32(3)
+ [ e8] JumpLoop target:block6
block9:
- [ 100] Mov dst:reg7, src:result~1
- [ 110] Add arith_feedback:3, dst:reg8, lhs:reg7, rhs:i~0
- [ 120] Mov2 c0_dst:result~1, c0_src:reg8, c1_dst:reg5, c1_src:Int32(0)
- [ 138] JumpLoop target:block6
+ [ f0] Mov dst:reg7, src:result~1
+ [ 100] Add arith_feedback:3, dst:reg8, lhs:reg7, rhs:i~0
+ [ 110] Mov2 c0_dst:result~1, c0_src:reg8, c1_dst:reg5, c1_src:Int32(0)
+ [ 128] JumpLoop target:block6
block10:
- [ 140] JumpLoop target:block2
+ [ 130] JumpLoop target:block2
block11:
- [ 148] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:6, lhs:reg5, rhs:3, true_target:block4, false_target:block12
+ [ 138] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:6, lhs:reg5, rhs:3, true_target:block4, false_target:block12
block12:
- [ 160] JumpStrictlyEqualsRhsInt32 arith_feedback:7, lhs:reg5, rhs:2, true_target:block13, false_target:block14
+ [ 150] JumpStrictlyEqualsRhsInt32 arith_feedback:7, lhs:reg5, rhs:2, true_target:block13, false_target:block14
block13:
- [ 178] Return value:reg6
+ [ 168] Return value:reg6
block14:
- [ 180] Throw src:reg6
+ [ 170] Throw src:reg6
Exception handlers:
- [ d0 .. 140] => handler block5
+ [ c0 .. 130] => handler block5
32
diff --git a/Tests/LibJS/Bytecode/expected/try-finally.txt b/Tests/LibJS/Bytecode/expected/try-finally.txt
index 1181741ee4d..6ec492c4bf9 100644
--- a/Tests/LibJS/Bytecode/expected/try-finally.txt
+++ b/Tests/LibJS/Bytecode/expected/try-finally.txt
@@ -15,7 +15,7 @@ block0:
[ 98] End value:reg5
-basicTryFinally$a96d49ee try-finally.js:2:5
+basicTryFinally$ac313afe try-finally.js:2:5
Registers: 10
Blocks: 8
Constants:
@@ -27,41 +27,39 @@ basicTryFinally$a96d49ee try-finally.js:2:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block3
+ [ 8] Jump target:block3
block1:
- [ 18] Catch value_feedback:0, dst:reg6
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov dst:reg5, src:Int32(1)
+ [ 10] Catch value_feedback:0, dst:reg6
+ [ 18] Mov dst:reg5, src:Int32(1)
block2:
- [ 38] GetGlobal value_feedback:1, dst:reg8, `console`
- [ 48] GetById value_feedback:2, dst:reg9, base:reg8, `log` (console.log)
- [ 60] Call value_feedback:3, call_feedback:0, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[String("finally")]
- [ 88] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:0, true_target:block4, false_target:block5
+ [ 28] GetGlobal value_feedback:1, dst:reg8, `console`
+ [ 38] GetById value_feedback:2, dst:reg9, base:reg8, `log` (console.log)
+ [ 50] Call value_feedback:3, call_feedback:0, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[String("finally")]
+ [ 78] JumpStrictlyEqualsRhsInt32 arith_feedback:0, lhs:reg5, rhs:0, true_target:block4, false_target:block5
block3:
- [ a0] Mov2 c0_dst:reg6, c0_src:Int32(1), c1_dst:reg5, c1_src:Int32(2)
- [ b8] JumpLoop target:block2
+ [ 90] Mov2 c0_dst:reg6, c0_src:Int32(1), c1_dst:reg5, c1_src:Int32(2)
+ [ a8] JumpLoop target:block2
block4:
- [ c0] End value:Undefined
+ [ b0] End value:Undefined
block5:
- [ c8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block6, false_target:block7
+ [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg5, rhs:2, true_target:block6, false_target:block7
block6:
- [ e0] Return value:reg6
+ [ d0] Return value:reg6
block7:
- [ e8] Throw src:reg6
+ [ d8] Throw src:reg6
Exception handlers:
- [ a0 .. c0] => handler block1
+ [ 90 .. b0] => handler block1
-breakThroughFinally$08ac3b59 try-finally.js:11:5
+breakThroughFinally$27179709 try-finally.js:11:5
Registers: 11
Blocks: 15
Locals: i~0
@@ -76,65 +74,63 @@ breakThroughFinally$08ac3b59 try-finally.js:11:5
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:i~0, src:Int32(0)
- [ 20] Jump target:block3
+ [ 8] Mov dst:i~0, src:Int32(0)
+ [ 18] Jump target:block3
block1:
- [ 28] Jump target:block7
+ [ 20] Jump target:block7
block2:
- [ 30] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
+ [ 28] PostfixIncrement arith_feedback:1, dst:reg5, src:i~0
block3:
- [ 40] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:10, true_target:block1, false_target:block4
+ [ 38] JumpLessThanLoopRhsInt32 arith_feedback:0, lhs:i~0, rhs:10, true_target:block1, false_target:block4
block4:
- [ 58] End value:Undefined
+ [ 50] End value:Undefined
block5:
- [ 60] Catch value_feedback:0, dst:reg6
- [ 68] SetLexicalEnvironment environment:reg4
- [ 70] Mov dst:reg5, src:Int32(1)
+ [ 58] Catch value_feedback:0, dst:reg6
+ [ 60] Mov dst:reg5, src:Int32(1)
block6:
- [ 80] GetGlobal value_feedback:1, dst:reg8, `console`
- [ 90] GetById value_feedback:2, dst:reg9, base:reg8, `log` (console.log)
- [ a8] Mov dst:reg10, src:i~0
- [ b8] Call value_feedback:3, call_feedback:0, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[reg10]
- [ e0] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg5, rhs:0, true_target:block10, false_target:block11
+ [ 70] GetGlobal value_feedback:1, dst:reg8, `console`
+ [ 80] GetById value_feedback:2, dst:reg9, base:reg8, `log` (console.log)
+ [ 98] Mov dst:reg10, src:i~0
+ [ a8] Call value_feedback:3, call_feedback:0, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[reg10]
+ [ d0] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg5, rhs:0, true_target:block10, false_target:block11
block7:
- [ f8] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:5, true_target:block8, false_target:block9
+ [ e8] JumpStrictlyEqualsRhsInt32 arith_feedback:2, lhs:i~0, rhs:5, true_target:block8, false_target:block9
block8:
- [ 110] Mov dst:reg5, src:Int32(3)
- [ 120] JumpLoop target:block6
+ [ 100] Mov dst:reg5, src:Int32(3)
+ [ 110] JumpLoop target:block6
block9:
- [ 128] Mov dst:reg5, src:Int32(0)
- [ 138] JumpLoop target:block6
+ [ 118] Mov dst:reg5, src:Int32(0)
+ [ 128] JumpLoop target:block6
block10:
- [ 140] JumpLoop target:block2
+ [ 130] JumpLoop target:block2
block11:
- [ 148] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:4, lhs:reg5, rhs:3, true_target:block4, false_target:block12
+ [ 138] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:4, lhs:reg5, rhs:3, true_target:block4, false_target:block12
block12:
- [ 160] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg5, rhs:2, true_target:block13, false_target:block14
+ [ 150] JumpStrictlyEqualsRhsInt32 arith_feedback:5, lhs:reg5, rhs:2, true_target:block13, false_target:block14
block13:
- [ 178] Return value:reg6
+ [ 168] Return value:reg6
block14:
- [ 180] Throw src:reg6
+ [ 170] Throw src:reg6
Exception handlers:
- [ f8 .. 140] => handler block5
+ [ e8 .. 130] => handler block5
-nestedTryFinallyWithBreak$2d651b63 try-finally.js:22:12
+nestedTryFinallyWithBreak$9e2f6d8b try-finally.js:22:12
Registers: 12
Blocks: 21
Locals: i~0
@@ -149,88 +145,85 @@ nestedTryFinallyWithBreak$2d651b63 try-finally.js:22:12
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Mov dst:i~0, src:Int32(0)
+ [ 8] Mov dst:i~0, src:Int32(0)
block1:
- [ 20] Jump target:block6
+ [ 18] Jump target:block6
block2:
- [ 28] PostfixIncrement arith_feedback:0, dst:reg5, src:i~0
- [ 38] JumpLoop target:block1
+ [ 20] PostfixIncrement arith_feedback:0, dst:reg5, src:i~0
+ [ 30] JumpLoop target:block1
block3:
- [ 40] End value:Undefined
+ [ 38] End value:Undefined
block4:
- [ 48] Catch value_feedback:0, dst:reg6
- [ 50] SetLexicalEnvironment environment:reg4
- [ 58] Mov dst:reg5, src:Int32(1)
+ [ 40] Catch value_feedback:0, dst:reg6
+ [ 48] Mov dst:reg5, src:Int32(1)
block5:
- [ 68] GetGlobal value_feedback:5, dst:reg8, `console`
- [ 78] GetById value_feedback:6, dst:reg9, base:reg8, `log` (console.log)
- [ 90] Call value_feedback:7, call_feedback:1, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[String("outer")]
- [ b8] JumpStrictlyEqualsRhsInt32 arith_feedback:4, lhs:reg5, rhs:0, true_target:block16, false_target:block17
+ [ 58] GetGlobal value_feedback:5, dst:reg8, `console`
+ [ 68] GetById value_feedback:6, dst:reg9, base:reg8, `log` (console.log)
+ [ 80] Call value_feedback:7, call_feedback:1, dst:reg7, callee:reg9, this_value:reg8, console.log, arguments:[String("outer")]
+ [ a8] JumpStrictlyEqualsRhsInt32 arith_feedback:4, lhs:reg5, rhs:0, true_target:block16, false_target:block17
block6:
- [ d0] Jump target:block9
+ [ c0] Jump target:block9
block7:
- [ d8] Catch value_feedback:1, dst:reg8
- [ e0] SetLexicalEnvironment environment:reg4
- [ e8] Mov dst:reg7, src:Int32(1)
+ [ c8] Catch value_feedback:1, dst:reg8
+ [ d0] Mov dst:reg7, src:Int32(1)
block8:
- [ f8] GetGlobal value_feedback:2, dst:reg10, `console`
- [ 108] GetById value_feedback:3, dst:reg11, base:reg10, `log` (console.log)
- [ 120] Call value_feedback:4, call_feedback:0, dst:reg9, callee:reg11, this_value:reg10, console.log, arguments:[String("inner")]
- [ 148] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg7, rhs:0, true_target:block11, false_target:block12
+ [ e0] GetGlobal value_feedback:2, dst:reg10, `console`
+ [ f0] GetById value_feedback:3, dst:reg11, base:reg10, `log` (console.log)
+ [ 108] Call value_feedback:4, call_feedback:0, dst:reg9, callee:reg11, this_value:reg10, console.log, arguments:[String("inner")]
+ [ 130] JumpStrictlyEqualsRhsInt32 arith_feedback:1, lhs:reg7, rhs:0, true_target:block11, false_target:block12
block9:
- [ 160] Mov dst:reg7, src:Int32(3)
- [ 170] JumpLoop target:block8
+ [ 148] Mov dst:reg7, src:Int32(3)
+ [ 158] JumpLoop target:block8
block10:
- [ 178] Mov dst:reg5, src:Int32(3)
- [ 188] JumpLoop target:block5
+ [ 160] Mov dst:reg5, src:Int32(3)
+ [ 170] JumpLoop target:block5
block11:
- [ 190] Mov dst:reg5, src:Int32(0)
- [ 1a0] JumpLoop target:block5
+ [ 178] Mov dst:reg5, src:Int32(0)
+ [ 188] JumpLoop target:block5
block12:
- [ 1a8] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:2, lhs:reg7, rhs:3, true_target:block10, false_target:block13
+ [ 190] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:2, lhs:reg7, rhs:3, true_target:block10, false_target:block13
block13:
- [ 1c0] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:2, true_target:block14, false_target:block15
+ [ 1a8] JumpStrictlyEqualsRhsInt32 arith_feedback:3, lhs:reg7, rhs:2, true_target:block14, false_target:block15
block14:
- [ 1d8] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg6, c1_src:reg8
- [ 1f0] JumpLoop target:block5
+ [ 1c0] Mov2 c0_dst:reg5, c0_src:reg7, c1_dst:reg6, c1_src:reg8
+ [ 1d8] JumpLoop target:block5
block15:
- [ 1f8] Throw src:reg8
+ [ 1e0] Throw src:reg8
block16:
- [ 200] JumpLoop target:block2
+ [ 1e8] JumpLoop target:block2
block17:
- [ 208] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:5, lhs:reg5, rhs:3, true_target:block3, false_target:block18
+ [ 1f0] JumpStrictlyEqualsLoopRhsInt32 arith_feedback:5, lhs:reg5, rhs:3, true_target:block3, false_target:block18
block18:
- [ 220] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg5, rhs:2, true_target:block19, false_target:block20
+ [ 208] JumpStrictlyEqualsRhsInt32 arith_feedback:6, lhs:reg5, rhs:2, true_target:block19, false_target:block20
block19:
- [ 238] Return value:reg6
+ [ 220] Return value:reg6
block20:
- [ 240] Throw src:reg6
+ [ 228] Throw src:reg6
Exception handlers:
- [ d0 .. 160] => handler block4
- [ 160 .. 190] => handler block7
- [ 190 .. 200] => handler block4
+ [ c0 .. 148] => handler block4
+ [ 148 .. 178] => handler block7
+ [ 178 .. 1e8] => handler block4
"finally"
diff --git a/Tests/LibJS/Bytecode/expected/using-declaration-non-local-env.txt b/Tests/LibJS/Bytecode/expected/using-declaration-non-local-env.txt
index 6fc192caafb..31228774202 100644
--- a/Tests/LibJS/Bytecode/expected/using-declaration-non-local-env.txt
+++ b/Tests/LibJS/Bytecode/expected/using-declaration-non-local-env.txt
@@ -1,4 +1,4 @@
-$84f4cb35 using-declaration-non-local-env.js:1:1
+$87b8bc45 using-declaration-non-local-env.js:1:1
Registers: 9
Blocks: 3
Locals: e~0
@@ -7,24 +7,22 @@ $84f4cb35 using-declaration-non-local-env.js:1:1
block0:
[ 0] Enter
- [ 8] GetLexicalEnvironment dst:reg4
- [ 10] Jump target:block2
+ [ 8] Jump target:block2
block1:
- [ 18] Catch value_feedback:0, dst:reg5
- [ 20] SetLexicalEnvironment environment:reg4
- [ 28] Mov3 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:Undefined, c2_dst:reg7, c2_src:reg6
- [ 48] End value:reg6
+ [ 10] Catch value_feedback:0, dst:reg5
+ [ 18] Mov3 c0_dst:e~0, c0_src:reg5, c1_dst:reg6, c1_src:Undefined, c2_dst:reg7, c2_src:reg6
+ [ 38] End value:reg6
block2:
- [ 50] MovSrcUndefined dst:reg5
- [ 58] NewFunction dst:reg8, shared_function_data_index:0
- [ 70] Call value_feedback:1, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined
- [ 90] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
- [ a8] End value:reg6
+ [ 40] MovSrcUndefined dst:reg5
+ [ 48] NewFunction dst:reg8, shared_function_data_index:0
+ [ 60] Call value_feedback:1, call_feedback:0, dst:reg6, callee:reg8, this_value:Undefined
+ [ 80] Mov2 c0_dst:reg5, c0_src:reg6, c1_dst:reg6, c1_src:reg5
+ [ 98] End value:reg6
Exception handlers:
- [ 50 .. b0] => handler block1
+ [ 40 .. a0] => handler block1
$dd396d91 using-declaration-non-local-env.js:1:21
diff --git a/Tests/LibJS/JIT/ir/catch-entries.js b/Tests/LibJS/JIT/ir/catch-entries.js
index e9d594f3a5b..74d4d4aabe9 100644
--- a/Tests/LibJS/JIT/ir/catch-entries.js
+++ b/Tests/LibJS/JIT/ir/catch-entries.js
@@ -19,7 +19,7 @@ function sum(n) {
try {
total += thrower(0);
} catch (e) {
- total = 0;
+ total -= e;
}
}
return total;
@@ -35,10 +35,10 @@ jit.compile(sum);
// CHECK-NEXT: LoadSlot
// CHECK: Jump [[HANDLER:b[0-9]+]]
// CHECK: {{^}}[[HANDLER]] (pc [[PC:[0-9]+]]) <- [[ENTRY]]:
-// CHECK-NEXT: LoadSlot r4
-// CHECK-NEXT: SetLexicalEnvironment
+// CHECK-NEXT: CheckInt32
+// CHECK: Int32Sub
// CHECK: osr entry at pc [[PC]]: [[ENTRY]]
// CHECK-COUNT-1: osr entry at pc
-// CHECK-COUNT-1: SetLexicalEnvironment
+// CHECK-COUNT-1: Int32Sub
console.log(sum(100));