Index: test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
diff --git a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
index 347b2e048096c75019fd911c21ebb6826e1e9aef..922cb7d2936888fda8eb9081eacf00ce7c9af7e4 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
@@ -14,28 +14,27 @@ snippet: " |
" |
frame size: 8 |
parameter count: 1 |
-bytecode array length: 72 |
+bytecode array length: 69 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
/* 30 E> */ B(StackCheck), |
B(LdaTheHole), |
B(Star), R(0), |
- /* 34 S> */ B(LdaTheHole), |
+ /* 34 S> */ B(CreateClosure), U8(0), U8(2), |
B(Star), R(3), |
- B(CreateClosure), U8(0), U8(2), |
+ B(LdaTheHole), |
B(Star), R(4), |
B(LdaSmi), U8(34), |
- B(Star), R(5), |
- B(Wide), B(LdaSmi), U16(148), |
B(Star), R(6), |
- B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), |
- B(Star), R(3), |
- B(LdaNamedProperty), R(3), U8(1), U8(2), |
+ B(Wide), B(LdaSmi), U16(148), |
+ B(Star), R(7), |
+ B(Mov), R(3), R(5), |
+ B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
B(Star), R(4), |
- B(LdaConstant), U8(2), |
+ B(LdaConstant), U8(1), |
B(ToName), R(6), |
- B(CreateClosure), U8(3), U8(2), |
+ B(CreateClosure), U8(2), U8(2), |
B(Star), R(7), |
B(LdaSmi), U8(2), |
B(StaDataPropertyInLiteral), R(4), R(6), R(7), U8(1), |
@@ -49,7 +48,6 @@ bytecodes: [ |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
- ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], |
SHARED_FUNCTION_INFO_TYPE, |
] |
@@ -65,28 +63,27 @@ snippet: " |
" |
frame size: 8 |
parameter count: 1 |
-bytecode array length: 72 |
+bytecode array length: 69 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
/* 30 E> */ B(StackCheck), |
B(LdaTheHole), |
B(Star), R(0), |
- /* 34 S> */ B(LdaTheHole), |
+ /* 34 S> */ B(CreateClosure), U8(0), U8(2), |
B(Star), R(3), |
- B(CreateClosure), U8(0), U8(2), |
+ B(LdaTheHole), |
B(Star), R(4), |
B(LdaSmi), U8(34), |
- B(Star), R(5), |
- B(Wide), B(LdaSmi), U16(148), |
B(Star), R(6), |
- B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), |
- B(Star), R(3), |
- B(LdaNamedProperty), R(3), U8(1), U8(2), |
+ B(Wide), B(LdaSmi), U16(148), |
+ B(Star), R(7), |
+ B(Mov), R(3), R(5), |
+ B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
B(Star), R(4), |
- B(LdaConstant), U8(2), |
+ B(LdaConstant), U8(1), |
B(ToName), R(6), |
- B(CreateClosure), U8(3), U8(2), |
+ B(CreateClosure), U8(2), U8(2), |
B(Star), R(7), |
B(LdaSmi), U8(2), |
B(StaDataPropertyInLiteral), R(4), R(6), R(7), U8(1), |
@@ -100,7 +97,6 @@ bytecodes: [ |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
- ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], |
SHARED_FUNCTION_INFO_TYPE, |
] |
@@ -118,7 +114,7 @@ snippet: " |
" |
frame size: 10 |
parameter count: 1 |
-bytecode array length: 115 |
+bytecode array length: 112 |
bytecodes: [ |
B(CreateFunctionContext), U8(2), |
B(PushContext), R(3), |
@@ -131,28 +127,27 @@ bytecodes: [ |
/* 57 E> */ B(StaCurrentContextSlot), U8(5), |
B(LdaTheHole), |
B(Star), R(0), |
- /* 62 S> */ B(LdaTheHole), |
+ /* 62 S> */ B(CreateClosure), U8(2), U8(2), |
B(Star), R(4), |
- B(CreateClosure), U8(2), U8(2), |
+ B(LdaTheHole), |
B(Star), R(5), |
B(LdaSmi), U8(62), |
- B(Star), R(6), |
- B(Wide), B(LdaSmi), U16(128), |
B(Star), R(7), |
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
- B(Star), R(4), |
- B(LdaNamedProperty), R(4), U8(3), U8(2), |
+ B(Wide), B(LdaSmi), U16(128), |
+ B(Star), R(8), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4), |
B(Star), R(5), |
B(LdaCurrentContextSlot), U8(4), |
/* 75 E> */ B(ToName), R(7), |
- B(CreateClosure), U8(4), U8(2), |
+ B(CreateClosure), U8(3), U8(2), |
B(Star), R(8), |
B(LdaSmi), U8(2), |
B(StaDataPropertyInLiteral), R(5), R(7), R(8), U8(3), |
B(Star), R(9), |
B(LdaCurrentContextSlot), U8(5), |
/* 106 E> */ B(ToName), R(7), |
- B(LdaConstant), U8(3), |
+ B(LdaConstant), U8(4), |
B(TestEqualStrict), R(7), U8(0), |
B(Mov), R(4), R(6), |
B(JumpIfToBooleanFalse), U8(7), |
@@ -172,8 +167,8 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"], |
SHARED_FUNCTION_INFO_TYPE, |
- ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
SHARED_FUNCTION_INFO_TYPE, |
] |
handlers: [ |
@@ -185,9 +180,9 @@ snippet: " |
class C { constructor() { count++; }} |
return new C(); |
" |
-frame size: 8 |
+frame size: 9 |
parameter count: 1 |
-bytecode array length: 66 |
+bytecode array length: 63 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(3), |
@@ -198,17 +193,16 @@ bytecodes: [ |
/* 46 E> */ B(StaCurrentContextSlot), U8(4), |
B(LdaTheHole), |
B(Star), R(0), |
- /* 49 S> */ B(LdaTheHole), |
+ /* 49 S> */ B(CreateClosure), U8(0), U8(2), |
B(Star), R(4), |
- B(CreateClosure), U8(0), U8(2), |
+ B(LdaTheHole), |
B(Star), R(5), |
B(LdaSmi), U8(49), |
- B(Star), R(6), |
- B(LdaSmi), U8(86), |
B(Star), R(7), |
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
- B(Star), R(4), |
- B(LdaNamedProperty), R(4), U8(1), U8(2), |
+ B(LdaSmi), U8(86), |
+ B(Star), R(8), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4), |
B(Star), R(5), |
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(4), U8(1), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
@@ -216,12 +210,11 @@ bytecodes: [ |
B(Star), R(1), |
B(Star), R(2), |
/* 87 S> */ B(Nop), |
- /* 94 E> */ B(New), R(2), R(0), U8(0), U8(4), |
+ /* 94 E> */ B(New), R(2), R(0), U8(0), U8(2), |
/* 103 S> */ B(Return), |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
- ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
] |
handlers: [ |
] |
@@ -233,45 +226,43 @@ snippet: " |
" |
frame size: 9 |
parameter count: 1 |
-bytecode array length: 101 |
+bytecode array length: 95 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(3), |
/* 30 E> */ B(StackCheck), |
- /* 35 S> */ B(LdaTheHole), |
+ /* 35 S> */ B(CreateClosure), U8(0), U8(2), |
B(Star), R(4), |
- B(CreateClosure), U8(0), U8(2), |
+ B(LdaTheHole), |
B(Star), R(5), |
B(LdaSmi), U8(35), |
- B(Star), R(6), |
- B(LdaSmi), U8(43), |
B(Star), R(7), |
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
- B(Star), R(4), |
- B(LdaNamedProperty), R(4), U8(1), U8(2), |
+ B(LdaSmi), U8(43), |
+ B(Star), R(8), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4), |
B(Star), R(5), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(1), |
B(LdaTheHole), |
B(Star), R(0), |
- /* 45 S> */ B(LdaTheHole), |
+ /* 45 S> */ B(CreateClosure), U8(1), U8(2), |
B(Star), R(4), |
- B(CreateClosure), U8(2), U8(2), |
+ B(LdaTheHole), |
B(Star), R(5), |
B(LdaSmi), U8(45), |
- B(Star), R(6), |
- B(LdaSmi), U8(73), |
B(Star), R(7), |
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
- B(Star), R(4), |
- B(LdaNamedProperty), R(4), U8(1), U8(4), |
+ B(LdaSmi), U8(73), |
+ B(Star), R(8), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4), |
B(Star), R(5), |
- B(LdaConstant), U8(3), |
+ B(LdaConstant), U8(2), |
B(ToName), R(7), |
- B(CreateClosure), U8(4), U8(2), |
+ B(CreateClosure), U8(3), U8(2), |
B(Star), R(8), |
B(LdaSmi), U8(2), |
- B(StaDataPropertyInLiteral), R(4), R(7), R(8), U8(1), |
+ B(StaDataPropertyInLiteral), R(6), R(7), R(8), U8(1), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(2), |
@@ -281,7 +272,6 @@ bytecodes: [ |
] |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
- ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
SHARED_FUNCTION_INFO_TYPE, |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"], |
SHARED_FUNCTION_INFO_TYPE, |