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

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: Added test coverage. 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..1d85de0a8c818968082730bc5d22ed4c99503a78 100644
--- a/test/mjsunit/harmony/super.js
+++ b/test/mjsunit/harmony/super.js
@@ -1979,8 +1979,9 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
class Derived extends Base {
constructor() {
- super();
+ let r = super();
derivedCalled++;
rossberg 2015/07/16 13:30:58 Nit: any reason to separate the computation and th
Michael Starzinger 2015/07/16 13:40:15 Done. Nope, no reason, I just do these things to s
+ assertEquals(this, r);
}
}
@@ -1995,8 +1996,9 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
class DerivedDerived extends Derived {
constructor() {
- super();
+ let r = super();
derivedDerivedCalled++;
+ assertEquals(this, r);
}
}
@@ -2015,8 +2017,9 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
}
class Derived2 extends Base2 {
constructor(v1, v2) {
- super(v1);
+ let r = super(v1);
this.fromDerived = v2;
+ assertEquals(this, r);
}
}
@@ -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