Index: test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden |
diff --git a/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden b/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden |
index c92627b1834e68e5caae98d7b6564e02e9d51c43..22a0a4ca711cc9bb0d27c5d128744a011351e797 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden |
@@ -9,9 +9,9 @@ wrap: yes |
snippet: " |
const x = 10; function f1() {return x;} |
" |
-frame size: 2 |
+frame size: 3 |
parameter count: 1 |
-bytecode array length: 20 |
+bytecode array length: 24 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(1), |
@@ -20,13 +20,16 @@ bytecodes: [ |
B(CreateClosure), U8(0), U8(2), U8(2), |
B(Star), R(0), |
/* 30 E> */ B(StackCheck), |
- /* 44 S> */ B(LdaSmi), I8(10), |
+ /* 44 S> */ B(LdaConstant), U8(1), |
+ B(Star), R(2), |
+ B(LdaSmi), I8(10), |
/* 44 E> */ B(StaCurrentContextSlot), U8(4), |
B(LdaUndefined), |
/* 74 S> */ B(Return), |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
] |
handlers: [ |
] |
@@ -35,9 +38,9 @@ handlers: [ |
snippet: " |
const x = 10; function f1() {return x;} return x; |
" |
-frame size: 2 |
+frame size: 3 |
parameter count: 1 |
-bytecode array length: 21 |
+bytecode array length: 25 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(1), |
@@ -46,13 +49,16 @@ bytecodes: [ |
B(CreateClosure), U8(0), U8(2), U8(2), |
B(Star), R(0), |
/* 30 E> */ B(StackCheck), |
- /* 44 S> */ B(LdaSmi), I8(10), |
+ /* 44 S> */ B(LdaConstant), U8(1), |
+ B(Star), R(2), |
+ B(LdaSmi), I8(10), |
/* 44 E> */ B(StaCurrentContextSlot), U8(4), |
/* 74 S> */ B(LdaImmutableCurrentContextSlot), U8(4), |
/* 84 S> */ B(Return), |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
] |
handlers: [ |
] |
@@ -61,9 +67,9 @@ handlers: [ |
snippet: " |
const x = (x = 20); function f1() {return x;} |
" |
-frame size: 4 |
+frame size: 6 |
parameter count: 1 |
-bytecode array length: 40 |
+bytecode array length: 48 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(1), |
@@ -72,13 +78,17 @@ bytecodes: [ |
B(CreateClosure), U8(0), U8(2), U8(2), |
B(Star), R(0), |
/* 30 E> */ B(StackCheck), |
- /* 47 S> */ B(LdaSmi), I8(20), |
+ /* 47 S> */ B(LdaConstant), U8(1), |
B(Star), R(2), |
+ B(LdaConstant), U8(1), |
+ B(Star), R(3), |
+ B(LdaSmi), I8(20), |
+ B(Star), R(4), |
B(LdaCurrentContextSlot), U8(4), |
B(JumpIfNotHole), U8(11), |
B(LdaConstant), U8(1), |
- B(Star), R(3), |
- /* 47 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
+ B(Star), R(5), |
+ /* 47 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), |
/* 47 E> */ B(StaCurrentContextSlot), U8(4), |
B(LdaUndefined), |
@@ -95,9 +105,9 @@ handlers: [ |
snippet: " |
const x = 10; x = 20; function f1() {return x;} |
" |
-frame size: 2 |
+frame size: 3 |
parameter count: 1 |
-bytecode array length: 27 |
+bytecode array length: 33 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(1), |
@@ -106,15 +116,19 @@ bytecodes: [ |
B(CreateClosure), U8(0), U8(2), U8(2), |
B(Star), R(0), |
/* 30 E> */ B(StackCheck), |
- /* 44 S> */ B(LdaSmi), I8(10), |
+ /* 44 S> */ B(LdaConstant), U8(1), |
+ B(Star), R(2), |
+ B(LdaSmi), I8(10), |
/* 44 E> */ B(StaCurrentContextSlot), U8(4), |
- /* 48 S> */ B(LdaSmi), I8(20), |
+ /* 48 S> */ B(LdaConstant), U8(1), |
+ B(Star), R(2), |
/* 50 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), |
B(LdaUndefined), |
/* 82 S> */ B(Return), |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
] |
handlers: [ |
] |