Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: test/cctest/interpreter/ClassDeclarations.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: std::vector instead of initializer_list, golden path as constant. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/ClassDeclarations.golden
diff --git a/test/cctest/interpreter/ClassDeclarations.golden b/test/cctest/interpreter/ClassDeclarations.golden
new file mode 100644
index 0000000000000000000000000000000000000000..3268de446e3f6ffa122bae6f18e82e2d135511e4
--- /dev/null
+++ b/test/cctest/interpreter/ClassDeclarations.golden
@@ -0,0 +1,238 @@
+#
+# Autogenerated by generate-bytecode-expectations
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ class Person {
+ constructor(name) { this.name = name; }
+ speak() { console.log(this.name + ' is speaking.'); }
+ }
+"
+frame size: 9 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(LdaTheHole),
+ B(Star), R(1),
+ B(StackCheck),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(2),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(3),
+ B(LdaSmi8), U8(34),
+ B(Star), R(4),
+ B(LdaConstant), U8(1),
+ B(Star), R(5),
+ B(CallRuntime), U16(62), R(2), U8(4),
+ B(Star), R(2),
+ B(LoadIC), R(2), U8(2), U8(1),
+ B(Star), R(3),
+ B(Mov), R(3), R(4),
+ B(LdaConstant), U8(3),
+ B(Star), R(5),
+ B(CreateClosure), U8(4), U8(0),
+ B(Star), R(6),
+ B(LdaSmi8), U8(2),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(8),
+ B(CallRuntime), U16(381), R(4), U8(5),
+ B(CallRuntime), U16(63), R(2), U8(2),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ kInstanceTypeDontCare,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ class person {
+ constructor(name) { this.name = name; }
+ speak() { console.log(this.name + ' is speaking.'); }
+ }
+"
+frame size: 9 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(LdaTheHole),
+ B(Star), R(1),
+ B(StackCheck),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(2),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(3),
+ B(LdaSmi8), U8(34),
+ B(Star), R(4),
+ B(LdaConstant), U8(1),
+ B(Star), R(5),
+ B(CallRuntime), U16(62), R(2), U8(4),
+ B(Star), R(2),
+ B(LoadIC), R(2), U8(2), U8(1),
+ B(Star), R(3),
+ B(Mov), R(3), R(4),
+ B(LdaConstant), U8(3),
+ B(Star), R(5),
+ B(CreateClosure), U8(4), U8(0),
+ B(Star), R(6),
+ B(LdaSmi8), U8(2),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(8),
+ B(CallRuntime), U16(381), R(4), U8(5),
+ B(CallRuntime), U16(63), R(2), U8(2),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ kInstanceTypeDontCare,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var n0 = 'a';var n1 = 'b';class N {
+ [n0]() { return n0; }
+ static [n1]() { return n1; }
+ }
+"
+frame size: 10 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(Star), R(1),
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaConstant), U8(1),
+ B(StaContextSlot), R(context), U8(5),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(3),
+ B(CreateClosure), U8(2), U8(0),
+ B(Star), R(4),
+ B(LdaSmi8), U8(60),
+ B(Star), R(5),
+ B(LdaSmi8), U8(126),
+ B(Star), R(6),
+ B(CallRuntime), U16(62), R(3), U8(4),
+ B(Star), R(3),
+ B(LoadIC), R(3), U8(3), U8(1),
+ B(Star), R(4),
+ B(Mov), R(4), R(5),
+ B(LdaContextSlot), R(context), U8(4),
+ B(ToName),
+ B(Star), R(6),
+ B(CreateClosure), U8(4), U8(0),
+ B(Star), R(7),
+ B(LdaSmi8), U8(2),
+ B(Star), R(8),
+ B(LdaSmi8), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(381), R(5), U8(5),
+ B(Mov), R(3), R(5),
+ B(LdaContextSlot), R(context), U8(5),
+ B(ToName),
+ B(Star), R(6),
+ B(LdaConstant), U8(3),
+ B(TestEqualStrict), R(6),
+ B(JumpIfFalse), U8(7),
+ B(CallRuntime), U16(59), R(0), U8(0),
+ B(CreateClosure), U8(5), U8(0),
+ B(Star), R(7),
+ B(LdaSmi8), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(381), R(5), U8(5),
+ B(CallRuntime), U16(63), R(3), U8(2),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var count = 0;
+ class C { constructor() { count++; }}
+ return new C();
+"
+frame size: 10 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(Star), R(1),
+ B(StackCheck),
+ B(LdaZero),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaTheHole),
+ B(Star), R(0),
+ B(LdaTheHole),
+ B(Star), R(3),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(4),
+ B(LdaSmi8), U8(49),
+ B(Star), R(5),
+ B(LdaSmi8), U8(86),
+ B(Star), R(6),
+ B(CallRuntime), U16(62), R(3), U8(4),
+ B(Star), R(3),
+ B(LoadIC), R(3), U8(1), U8(1),
+ B(Star), R(4),
+ B(CallRuntime), U16(63), R(3), U8(2),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(257), R(4), U8(1),
+ B(Star), R(3),
+ B(New), R(3), R(0), U8(0),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+

Powered by Google App Engine
This is Rietveld 408576698