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 6f2bf4570e5e6c2ad04420f7b4e6e36c932566f7..7c0fadf69d997fd0f2e00269f3d1707d02274fb7 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
@@ -14,7 +14,7 @@ snippet: " |
" |
frame size: 9 |
parameter count: 1 |
-bytecode array length: 70 |
+bytecode array length: 75 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
@@ -41,6 +41,7 @@ bytecodes: [ |
B(Star), R(8), |
B(LdaZero), |
B(StaDataPropertyInLiteral), R(4), R(6), R(7), R(8), |
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -66,7 +67,7 @@ snippet: " |
" |
frame size: 9 |
parameter count: 1 |
-bytecode array length: 70 |
+bytecode array length: 75 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
@@ -93,6 +94,7 @@ bytecodes: [ |
B(Star), R(8), |
B(LdaZero), |
B(StaDataPropertyInLiteral), R(4), R(6), R(7), R(8), |
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -120,7 +122,7 @@ snippet: " |
" |
frame size: 10 |
parameter count: 1 |
-bytecode array length: 114 |
+bytecode array length: 119 |
bytecodes: [ |
B(CreateFunctionContext), U8(2), |
B(PushContext), R(3), |
@@ -164,6 +166,7 @@ bytecodes: [ |
B(Star), R(8), |
B(LdaSmi), U8(1), |
B(StaDataPropertyInLiteral), R(6), R(7), R(8), R(9), |
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessorWithCheck), R(4), U8(1), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -190,7 +193,7 @@ snippet: " |
" |
frame size: 8 |
parameter count: 1 |
-bytecode array length: 61 |
+bytecode array length: 66 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(3), |
@@ -213,6 +216,7 @@ bytecodes: [ |
B(Star), R(4), |
B(LdaNamedProperty), R(4), U8(1), U8(2), |
B(Star), R(5), |
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(4), U8(1), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -228,3 +232,68 @@ constant pool: [ |
handlers: [ |
] |
+--- |
+snippet: " |
+ (class {}) |
+ class E { static name () {}} |
+" |
+frame size: 10 |
+parameter count: 1 |
+bytecode array length: 104 |
+bytecodes: [ |
+ B(LdaTheHole), |
+ B(Star), R(3), |
+ /* 30 E> */ B(StackCheck), |
+ /* 35 S> */ B(LdaTheHole), |
+ B(Star), R(4), |
+ B(CreateClosure), U8(0), U8(2), |
+ 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(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), |
+ B(Star), R(4), |
+ B(CreateClosure), U8(2), U8(2), |
+ 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(Star), R(5), |
+ B(LdaConstant), U8(3), |
+ B(ToName), R(7), |
+ B(CreateClosure), U8(4), U8(2), |
+ B(Star), R(8), |
+ B(LdaSmi), U8(2), |
+ B(Star), R(9), |
+ B(LdaZero), |
+ B(StaDataPropertyInLiteral), R(4), R(7), R(8), R(9), |
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
+ B(Star), R(0), |
+ B(Star), R(2), |
+ B(Star), R(3), |
+ B(LdaUndefined), |
+ /* 74 S> */ B(Return), |
+] |
+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, |
+] |
+handlers: [ |
+] |
+ |