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 5098fbef5fb6fb93e475dd284798a7c3be507d77..ba52ff294d90c01a9ec6844b9216ba4b428cc1b6 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden |
@@ -15,7 +15,7 @@ snippet: " |
" |
frame size: 10 |
parameter count: 1 |
-bytecode array length: 74 |
+bytecode array length: 104 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
@@ -43,6 +43,18 @@ 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::kObjectHasOwnProperty), R(5), U8(2), |
+ B(JumpIfToBooleanTrue), U8(18), |
+ B(LdaConstant), U8(5), |
+ B(Star), R(7), |
+ B(LdaSmi), U8(3), |
+ B(Star), R(8), |
+ B(LdaZero), |
+ B(Star), R(9), |
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -55,6 +67,8 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"], |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["Person"], |
] |
handlers: [ |
] |
@@ -68,7 +82,7 @@ snippet: " |
" |
frame size: 10 |
parameter count: 1 |
-bytecode array length: 74 |
+bytecode array length: 104 |
bytecodes: [ |
B(LdaTheHole), |
B(Star), R(2), |
@@ -96,6 +110,18 @@ 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::kObjectHasOwnProperty), R(5), U8(2), |
+ B(JumpIfToBooleanTrue), U8(18), |
+ B(LdaConstant), U8(5), |
+ B(Star), R(7), |
+ B(LdaSmi), U8(3), |
+ B(Star), R(8), |
+ B(LdaZero), |
+ B(Star), R(9), |
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -108,6 +134,8 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"], |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["person"], |
] |
handlers: [ |
] |
@@ -123,7 +151,7 @@ snippet: " |
" |
frame size: 11 |
parameter count: 1 |
-bytecode array length: 128 |
+bytecode array length: 158 |
bytecodes: [ |
B(CreateFunctionContext), U8(2), |
B(PushContext), R(3), |
@@ -169,6 +197,18 @@ 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::kObjectHasOwnProperty), R(6), U8(2), |
+ B(JumpIfToBooleanTrue), U8(18), |
+ B(LdaConstant), U8(7), |
+ B(Star), R(8), |
+ B(LdaSmi), U8(3), |
+ B(Star), R(9), |
+ B(LdaZero), |
+ B(Star), R(10), |
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6), U8(5), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
@@ -183,6 +223,8 @@ constant pool: [ |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
SHARED_FUNCTION_INFO_TYPE, |
SHARED_FUNCTION_INFO_TYPE, |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"], |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["N"], |
] |
handlers: [ |
] |
@@ -193,9 +235,9 @@ snippet: " |
class C { constructor() { count++; }} |
return new C(); |
" |
-frame size: 8 |
+frame size: 11 |
parameter count: 1 |
-bytecode array length: 74 |
+bytecode array length: 104 |
bytecodes: [ |
B(CreateFunctionContext), U8(1), |
B(PushContext), R(3), |
@@ -217,12 +259,24 @@ 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::kObjectHasOwnProperty), R(6), U8(2), |
+ B(JumpIfToBooleanTrue), U8(18), |
+ B(LdaConstant), U8(3), |
+ B(Star), R(8), |
+ B(LdaSmi), U8(3), |
+ B(Star), R(9), |
+ B(LdaZero), |
+ B(Star), R(10), |
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6), U8(5), |
B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
B(Star), R(0), |
B(Star), R(1), |
B(Star), R(2), |
/* 87 S> */ B(JumpIfNotHole), U8(11), |
- B(LdaConstant), U8(2), |
+ B(LdaConstant), U8(3), |
B(Star), R(5), |
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
B(Star), R(4), |
@@ -232,8 +286,87 @@ bytecodes: [ |
constant pool: [ |
SHARED_FUNCTION_INFO_TYPE, |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], |
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"], |
ONE_BYTE_INTERNALIZED_STRING_TYPE ["C"], |
] |
handlers: [ |
] |
+--- |
+snippet: " |
+ (class {}) |
+ class E { static name () {}} |
+" |
+frame size: 11 |
+parameter count: 1 |
+bytecode array length: 137 |
+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(3), |
+ B(Star), R(7), |
+ B(Mov), R(4), R(6), |
+ B(CallRuntime), U16(Runtime::kObjectHasOwnProperty), R(6), U8(2), |
+ B(JumpIfToBooleanTrue), U8(18), |
+ B(LdaConstant), U8(5), |
+ B(Star), R(8), |
+ B(LdaSmi), U8(3), |
+ B(Star), R(9), |
+ B(LdaZero), |
+ B(Star), R(10), |
+ B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6), U8(5), |
+ 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: [ |
+] |
+ |