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

Unified Diff: test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden

Issue 1805503003: [Interpreter] Add bytecode generator expectations for super calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add additional test cases. Created 4 years, 9 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
« no previous file with comments | « no previous file | test/cctest/interpreter/generate-bytecode-expectations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden b/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
new file mode 100644
index 0000000000000000000000000000000000000000..62214594ea157b5b9bdae657311f35aaa260b2cc
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
@@ -0,0 +1,261 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: no
+test function name: test
+
+---
+snippet: "
+ var test;
+ (function() {
+ class A {
+ method() { return 2; }
+ }
+ class B extends A {
+ method() { return super.method() + 1; }
+ }
+ test = new B().method;
+ test();
+ })();
+"
+frame size: 7
+parameter count: 1
+bytecode array length: 57
+bytecodes: [
+ B(Ldar), R(closure),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(this),
+ B(Star), R(3),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(6),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
+ B(Star), R(6),
+ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(6), U8(3),
+ B(Star), R(4),
+ B(LdaConstant), U8(2),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
+ B(Mov), R(3), R(2),
+ B(Star), R(1),
+ B(Call), R(1), R(2), U8(1), U8(1),
+ B(Star), R(3),
+ B(LdaSmi8), U8(1),
+ B(Add), R(3),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var test;
+ (function() {
+ class A {
+ get x() { return 1; }
+ set x(val) { return; }
+ }
+ class B extends A {
+ method() { super.x = 2; return super.x; }
+ }
+ test = new B().method;
+ test();
+ })();
+"
+frame size: 6
+parameter count: 1
+bytecode array length: 80
+bytecodes: [
+ B(Ldar), R(closure),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(this),
+ B(Star), R(1),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(Star), R(5),
+ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(5), U8(1),
+ B(Star), R(2),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(LdaSmi8), U8(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4),
+ B(Ldar), R(this),
+ B(Star), R(1),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(4),
+ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(4), U8(3),
+ B(Star), R(2),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var test;
+ (function() {
+ class A {
+ constructor(x) { this.x_ = x; }
+ }
+ class B extends A {
+ constructor() { super(1); this.y_ = 2; }
+ }
+ test = new B().constructor;
+ })();
+"
+frame size: 5
+parameter count: 1
+bytecode array length: 106
+bytecodes: [
+ B(Ldar), R(closure),
+ B(Star), R(1),
+ B(Ldar), R(new_target),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(1),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
+ B(Star), R(2),
+ B(LdaSmi8), U8(1),
+ B(Star), R(3),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(New), R(2), R(3), U8(1),
+ B(Star), R(2),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(4),
+ B(Jump), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(this),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Star), R(2),
+ B(LdaSmi8), U8(2),
+ B(StoreICStrict), R(2), U8(3), U8(4),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var test;
+ (function() {
+ class A {
+ constructor() { this.x_ = 1; }
+ }
+ class B extends A {
+ constructor() { super(); this.y_ = 2; }
+ }
+ test = new B().constructor;
+ })();
+"
+frame size: 4
+parameter count: 1
+bytecode array length: 102
+bytecodes: [
+ B(Ldar), R(closure),
+ B(Star), R(1),
+ B(Ldar), R(new_target),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(1),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
+ B(Star), R(2),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(New), R(2), R(0), U8(0),
+ B(Star), R(2),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(4),
+ B(Jump), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(this),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Star), R(2),
+ B(LdaSmi8), U8(2),
+ B(StoreICStrict), R(2), U8(3), U8(4),
+ B(Ldar), R(this),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
« no previous file with comments | « no previous file | test/cctest/interpreter/generate-bytecode-expectations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698