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

Unified Diff: test/mjsunit/harmony/super.js

Issue 1226123010: Represent implicit 'this' binding by 'super' in AST. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 5 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 | « src/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/super.js
diff --git a/test/mjsunit/harmony/super.js b/test/mjsunit/harmony/super.js
index 270c159e80b22a1c9b1389e76d8d1262068205c2..ab572b056f262e39dcf522d090cc9667c19309dd 100644
--- a/test/mjsunit/harmony/super.js
+++ b/test/mjsunit/harmony/super.js
@@ -1979,7 +1979,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
class Derived extends Base {
constructor() {
- super();
+ let r = super();
+ assertEquals(this, r);
derivedCalled++;
}
}
@@ -1995,7 +1996,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
class DerivedDerived extends Derived {
constructor() {
- super();
+ let r = super();
+ assertEquals(this, r);
derivedDerivedCalled++;
}
}
@@ -2015,7 +2017,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
}
class Derived2 extends Base2 {
constructor(v1, v2) {
- super(v1);
+ let r = super(v1);
+ assertEquals(this, r);
this.fromDerived = v2;
}
}
@@ -2128,7 +2131,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
}
class Derived extends Base {
constructor(x) {
- eval('super(x)');
+ let r = eval('super(x)');
+ assertEquals(this, r);
}
}
let d = new Derived(42);
@@ -2145,7 +2149,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
}
class Derived extends Base {
constructor(x) {
- (() => super(x))();
+ let r = (() => super(x))();
+ assertEquals(this, r);
}
}
let d = new Derived(42);
@@ -2231,7 +2236,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
}
class Derived extends Base {
constructor(x) {
- eval('super(...[x])');
+ let r = eval('super(...[x])');
+ assertEquals(this, r);
}
}
let d = new Derived(42);
@@ -2248,7 +2254,8 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
}
class Derived extends Base {
constructor(x) {
- (() => super(...[x]))();
+ let r = (() => super(...[x]))();
+ assertEquals(this, r);
}
}
let d = new Derived(42);
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698