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 f1a15639a885b2ad78dfb1f24106e15ff9fc632d..1c7d2248c32fe7a6b5220d953c42398ab92a19f9 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
@@ -14,7 +14,7 @@ snippet: " |
" |
frame size: 10 |
parameter count: 1 |
-bytecode array length: 74 |
+bytecode array length: 86 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
@@ -42,6 +42,10 @@ bytecodes: [ |
B(Star), R(9), |
B(Mov), R(4), R(5), |
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), |
+ B(LdaConstant), U8(4), |
+ B(Star), R(6), |
+ B(Mov), R(3), R(5), |
+ B(CallRuntime), U16(Runtime::kDefineClassNameProperty), R(5), U8(2), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -54,6 +58,7 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["Person"], |
] |
handlers: [ |
] |
@@ -67,7 +72,7 @@ snippet: " |
" |
frame size: 10 |
parameter count: 1 |
-bytecode array length: 74 |
+bytecode array length: 86 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
@@ -95,6 +100,10 @@ bytecodes: [ |
B(Star), R(9), |
B(Mov), R(4), R(5), |
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), |
+ B(LdaConstant), U8(4), |
+ B(Star), R(6), |
+ B(Mov), R(3), R(5), |
+ B(CallRuntime), U16(Runtime::kDefineClassNameProperty), R(5), U8(2), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -107,6 +116,7 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["person"], |
] |
handlers: [ |
] |
@@ -122,7 +132,7 @@ snippet: " |
" |
frame size: 11 |
parameter count: 1 |
-bytecode array length: 128 |
+bytecode array length: 140 |
bytecodes: [ |
B(CreateFunctionContext), U8(2), |
B(PushContext), R(3), |
@@ -168,6 +178,10 @@ bytecodes: [ |
B(LdaSmi), U8(1), |
B(Star), R(10), |
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6), U8(5), |
+ B(LdaConstant), U8(6), |
+ B(Star), R(7), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineClassNameProperty), R(6), U8(2), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -182,6 +196,7 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
SHARED_FUNCTION_INFO_TYPE, |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["N"], |
] |
handlers: [ |
] |
@@ -194,7 +209,7 @@ snippet: " |
" |
frame size: 8 |
parameter count: 1 |
-bytecode array length: 74 |
+bytecode array length: 86 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(3), |
@@ -216,6 +231,10 @@ bytecodes: [ |
B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), |
B(Star), R(4), |
B(LdrNamedProperty), R(4), U8(1), U8(2), R(5), |
+ B(LdaConstant), U8(2), |
+ B(Star), R(7), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineClassNameProperty), R(6), U8(2), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -236,3 +255,72 @@ constant pool: [ |
handlers: [ |
] |
+--- |
+snippet: " |
+ (class {}) |
+ class E { static name () {}} |
+" |
+frame size: 11 |
+parameter count: 1 |
+bytecode array length: 116 |
+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(LdrNamedProperty), R(4), U8(1), U8(2), 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(LdrNamedProperty), R(4), U8(1), U8(4), 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(Star), R(10), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6), U8(5), |
+ B(LdaConstant), U8(5), |
+ B(Star), R(7), |
+ B(CallRuntime), U16(Runtime::kDefineClassNameProperty), R(6), U8(2), |
+ 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, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["E"], |
+] |
+handlers: [ |
+] |
+ |