Index: test/cctest/interpreter/bytecode_expectations/Modules.golden |
diff --git a/test/cctest/interpreter/bytecode_expectations/Modules.golden b/test/cctest/interpreter/bytecode_expectations/Modules.golden |
index 4a0af44fa400ae97f7061cd05605a93132acff88..850ae10b296c55040ddba0c1956881c0e2174198 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/Modules.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/Modules.golden |
@@ -153,7 +153,7 @@ snippet: " |
" |
frame size: 9 |
parameter count: 2 |
-bytecode array length: 205 |
+bytecode array length: 193 |
bytecodes: [ |
B(Ldar), R(new_target), |
B(JumpIfUndefined), U8(21), |
@@ -208,13 +208,11 @@ bytecodes: [ |
B(Ldar), R(5), |
/* 0 E> */ B(Throw), |
/* 32 S> */ B(LdrUndefined), R(4), |
- B(LdaSmi), U8(-1), |
- B(Star), R(6), |
- /* 32 E> */ B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(6), U8(1), |
+ /* 32 E> */ B(LdaModuleVariable), U8(-1), U8(0), |
B(JumpIfNotHole), U8(11), |
B(LdaConstant), U8(1), |
- B(Star), R(7), |
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(7), U8(1), |
+ B(Star), R(6), |
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1), |
B(Star), R(3), |
B(LdaSmi), U8(42), |
B(Star), R(5), |
@@ -227,13 +225,11 @@ bytecodes: [ |
/* 47 S> */ B(LdaUndefined), |
/* 47 E> */ B(StaCurrentContextSlot), U8(4), |
/* 52 S> */ B(LdrUndefined), R(4), |
- B(LdaSmi), U8(-1), |
- B(Star), R(6), |
- /* 52 E> */ B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(6), U8(1), |
+ /* 52 E> */ B(LdaModuleVariable), U8(-1), U8(1), |
B(JumpIfNotHole), U8(11), |
B(LdaConstant), U8(1), |
- B(Star), R(7), |
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(7), U8(1), |
+ B(Star), R(6), |
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1), |
B(Star), R(3), |
B(LdaSmi), U8(42), |
B(Star), R(5), |
@@ -258,7 +254,7 @@ snippet: " |
" |
frame size: 9 |
parameter count: 2 |
-bytecode array length: 196 |
+bytecode array length: 160 |
bytecodes: [ |
B(Ldar), R(new_target), |
B(JumpIfUndefined), U8(21), |
@@ -313,18 +309,10 @@ bytecodes: [ |
B(Ldar), R(5), |
/* 0 E> */ B(Throw), |
/* 17 S> */ B(LdaSmi), U8(42), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 17 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
- /* 21 S> */ B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(3), U8(1), |
+ /* 17 E> */ B(StaModuleVariable), U8(1), U8(0), |
+ /* 21 S> */ B(LdaModuleVariable), U8(1), U8(0), |
B(Inc), U8(2), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 24 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
+ /* 24 E> */ B(StaModuleVariable), U8(1), U8(0), |
B(Ldar), R(closure), |
B(CreateBlockContext), U8(1), |
B(PushContext), R(1), |
@@ -332,14 +320,9 @@ bytecodes: [ |
B(StaCurrentContextSlot), U8(4), |
/* 34 S> */ B(LdaUndefined), |
/* 34 E> */ B(StaCurrentContextSlot), U8(4), |
- /* 39 S> */ B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(3), U8(1), |
+ /* 39 S> */ B(LdaModuleVariable), U8(1), U8(1), |
B(Inc), U8(3), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 42 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
+ /* 42 E> */ B(StaModuleVariable), U8(1), U8(1), |
B(PopContext), R(1), |
B(LdaUndefined), |
/* 49 S> */ B(Return), |
@@ -359,7 +342,7 @@ snippet: " |
" |
frame size: 9 |
parameter count: 2 |
-bytecode array length: 208 |
+bytecode array length: 164 |
bytecodes: [ |
B(Ldar), R(new_target), |
B(JumpIfUndefined), U8(21), |
@@ -367,7 +350,7 @@ bytecodes: [ |
B(Star), R(2), |
B(LdaZero), |
B(TestEqualStrict), R(2), U8(0), |
- B(JumpIfTrue), U8(75), |
+ B(JumpIfTrue), U8(67), |
B(LdaSmi), U8(76), |
B(Star), R(3), |
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), |
@@ -382,10 +365,7 @@ bytecodes: [ |
B(Ldar), R(this), |
B(StaCurrentContextSlot), U8(4), |
B(LdaTheHole), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
+ B(StaModuleVariable), U8(1), U8(0), |
/* 0 E> */ B(StackCheck), |
/* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(4), |
B(Ldar), R(4), |
@@ -419,18 +399,10 @@ bytecodes: [ |
B(Ldar), R(5), |
/* 0 E> */ B(Throw), |
/* 17 S> */ B(LdaSmi), U8(42), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 17 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
- /* 21 S> */ B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(3), U8(1), |
+ /* 17 E> */ B(StaModuleVariable), U8(1), U8(0), |
+ /* 21 S> */ B(LdaModuleVariable), U8(1), U8(0), |
B(Inc), U8(2), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 24 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
+ /* 24 E> */ B(StaModuleVariable), U8(1), U8(0), |
B(Ldar), R(closure), |
B(CreateBlockContext), U8(1), |
B(PushContext), R(1), |
@@ -438,14 +410,9 @@ bytecodes: [ |
B(StaCurrentContextSlot), U8(4), |
/* 34 S> */ B(LdaUndefined), |
/* 34 E> */ B(StaCurrentContextSlot), U8(4), |
- /* 39 S> */ B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(3), U8(1), |
+ /* 39 S> */ B(LdaModuleVariable), U8(1), U8(1), |
B(Inc), U8(3), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 42 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
+ /* 42 E> */ B(StaModuleVariable), U8(1), U8(1), |
B(PopContext), R(1), |
B(LdaUndefined), |
/* 49 S> */ B(Return), |
@@ -465,7 +432,7 @@ snippet: " |
" |
frame size: 9 |
parameter count: 2 |
-bytecode array length: 196 |
+bytecode array length: 168 |
bytecodes: [ |
B(Ldar), R(new_target), |
B(JumpIfUndefined), U8(21), |
@@ -473,7 +440,7 @@ bytecodes: [ |
B(Star), R(2), |
B(LdaZero), |
B(TestEqualStrict), R(2), U8(0), |
- B(JumpIfTrue), U8(75), |
+ B(JumpIfTrue), U8(67), |
B(LdaSmi), U8(76), |
B(Star), R(3), |
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), |
@@ -488,10 +455,7 @@ bytecodes: [ |
B(Ldar), R(this), |
B(StaCurrentContextSlot), U8(4), |
B(LdaTheHole), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
+ B(StaModuleVariable), U8(1), U8(0), |
/* 0 E> */ B(StackCheck), |
/* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(4), |
B(Ldar), R(4), |
@@ -525,13 +489,8 @@ bytecodes: [ |
B(Ldar), R(5), |
/* 0 E> */ B(Throw), |
/* 19 S> */ B(LdaSmi), U8(42), |
- B(Star), R(4), |
- B(LdaSmi), U8(1), |
- B(Star), R(3), |
- /* 19 E> */ B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(3), U8(2), |
- /* 23 S> */ B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(3), U8(1), |
+ /* 19 E> */ B(StaModuleVariable), U8(1), U8(0), |
+ /* 23 S> */ B(LdaModuleVariable), U8(1), U8(0), |
B(Inc), U8(2), |
/* 26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), |
B(Ldar), R(closure), |
@@ -541,9 +500,7 @@ bytecodes: [ |
B(StaCurrentContextSlot), U8(4), |
/* 36 S> */ B(LdaUndefined), |
/* 36 E> */ B(StaCurrentContextSlot), U8(4), |
- /* 41 S> */ B(LdaSmi), U8(1), |
- B(Star), R(3), |
- B(CallRuntime), U16(Runtime::kLoadModuleVariable), R(3), U8(1), |
+ /* 41 S> */ B(LdaModuleVariable), U8(1), U8(1), |
B(Inc), U8(3), |
/* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), |
B(PopContext), R(1), |
@@ -563,7 +520,7 @@ snippet: " |
" |
frame size: 8 |
parameter count: 2 |
-bytecode array length: 151 |
+bytecode array length: 135 |
bytecodes: [ |
B(Ldar), R(new_target), |
B(JumpIfUndefined), U8(21), |
@@ -571,7 +528,7 @@ bytecodes: [ |
B(Star), R(1), |
B(LdaZero), |
B(TestEqualStrict), R(1), U8(0), |
- B(JumpIfTrue), U8(75), |
+ B(JumpIfTrue), U8(67), |
B(LdaSmi), U8(76), |
B(Star), R(2), |
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), |
@@ -586,10 +543,7 @@ bytecodes: [ |
B(Ldar), R(this), |
B(StaCurrentContextSlot), U8(4), |
B(LdaTheHole), |
- B(Star), R(3), |
- B(LdaSmi), U8(1), |
- B(Star), R(2), |
- B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(2), U8(2), |
+ B(StaModuleVariable), U8(1), U8(0), |
/* 0 E> */ B(StackCheck), |
/* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), |
B(Ldar), R(3), |
@@ -623,10 +577,7 @@ bytecodes: [ |
B(Ldar), R(4), |
/* 0 E> */ B(Throw), |
B(CreateClosure), U8(1), U8(0), |
- B(Star), R(3), |
- B(LdaSmi), U8(1), |
- B(Star), R(2), |
- B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(2), U8(2), |
+ B(StaModuleVariable), U8(1), U8(0), |
B(LdaUndefined), |
/* 32 S> */ B(Return), |
] |
@@ -643,7 +594,7 @@ snippet: " |
" |
frame size: 8 |
parameter count: 2 |
-bytecode array length: 184 |
+bytecode array length: 169 |
bytecodes: [ |
B(Ldar), R(new_target), |
B(JumpIfUndefined), U8(21), |
@@ -651,7 +602,7 @@ bytecodes: [ |
B(Star), R(1), |
B(LdaZero), |
B(TestEqualStrict), R(1), U8(0), |
- B(JumpIfTrue), U8(75), |
+ B(JumpIfTrue), U8(67), |
B(LdaSmi), U8(76), |
B(Star), R(2), |
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1), |
@@ -666,10 +617,7 @@ bytecodes: [ |
B(Ldar), R(this), |
B(StaCurrentContextSlot), U8(4), |
B(LdaTheHole), |
- B(Star), R(3), |
- B(LdaSmi), U8(1), |
- B(Star), R(2), |
- B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(2), U8(2), |
+ B(StaModuleVariable), U8(1), U8(0), |
/* 0 E> */ B(StackCheck), |
/* 0 E> */ B(LdrCurrentContextSlot), U8(4), R(3), |
B(Ldar), R(3), |
@@ -715,10 +663,8 @@ bytecodes: [ |
B(LdrNamedProperty), R(2), U8(2), U8(2), R(3), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), |
B(StaCurrentContextSlot), U8(6), |
- /* 16 E> */ B(LdrCurrentContextSlot), U8(6), R(3), |
- B(LdaSmi), U8(1), |
- B(Star), R(2), |
- B(CallRuntime), U16(Runtime::kStoreModuleVariable), R(2), U8(2), |
+ /* 16 E> */ B(LdaCurrentContextSlot), U8(6), |
+ B(StaModuleVariable), U8(1), U8(0), |
B(LdaUndefined), |
/* 26 S> */ B(Return), |
] |