Bug 1530879 - Update the test262 import to upstream rev 33a306d1026b72227eb50a918db19ada16f12b3d. r=jorendorff
authorJeff Walden <jwalden@mit.edu>
Tue, 26 Feb 2019 17:06:49 -0800
changeset 461668 96045963f36cb3fab9eb79ef550aaa260735b540
parent 461667 846ec57d36ae0ad549c704809baaac59849cf47c
child 461669 f4f9757e41e19aed16bead8cbd9ae533637cc3cc
push id35626
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 11:31:08 +0000
treeherdermozilla-central@2ea0c1db7e60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1530879
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530879 - Update the test262 import to upstream rev 33a306d1026b72227eb50a918db19ada16f12b3d. r=jorendorff
js/src/tests/test262/GIT-INFO
js/src/tests/test262/built-ins/Reflect/ownKeys/return-empty-array.js
js/src/tests/test262/intl402/Locale/constructor-tag.js
js/src/tests/test262/language/expressions/class/elements/private-field-as-arrow-function.js
js/src/tests/test262/language/expressions/class/elements/private-field-as-async-arrow-function.js
js/src/tests/test262/language/expressions/class/elements/private-field-as-async-function.js
js/src/tests/test262/language/expressions/class/elements/private-field-as-function.js
js/src/tests/test262/language/expressions/class/elements/private-field-super-access-throws.js
js/src/tests/test262/language/expressions/object/prop-def-invalid-star-prefix.js
js/src/tests/test262/language/statements/class/elements/private-field-as-arrow-function.js
js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js
js/src/tests/test262/language/statements/class/elements/private-field-as-async-function.js
js/src/tests/test262/language/statements/class/elements/private-field-as-function.js
js/src/tests/test262/language/statements/class/elements/private-field-super-access-throws.js
--- a/js/src/tests/test262/GIT-INFO
+++ b/js/src/tests/test262/GIT-INFO
@@ -1,7 +1,8 @@
-commit 9280e1f872151f68cac99bc0c674527813a91cf9
-Author: Mathias Bynens <mathias@qiwi.be>
-Date:   Mon Feb 4 11:58:05 2019 -0700
+commit 33a306d1026b72227eb50a918db19ada16f12b3d
+Merge: 04ae1c1359 4e3e82ee3f
+Author: Leo Balter <leonardo.balter@gmail.com>
+Date:   Wed Feb 6 15:26:57 2019 -0500
 
-    Add tests for %TypedArray%.prototype.sort stability (#2062)
+    Merge pull request #2067 from caiolima/private-field-function
     
-    https://github.com/tc39/ecma262/pull/1433
+    Adding case where private field stores a function
--- a/js/src/tests/test262/built-ins/Reflect/ownKeys/return-empty-array.js
+++ b/js/src/tests/test262/built-ins/Reflect/ownKeys/return-empty-array.js
@@ -1,14 +1,14 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 es6id: 26.1.11
 description: >
-  Returns empty array when target has now own properties.
+  Returns empty array when target has no own properties.
 info: |
   26.1.11 Reflect.ownKeys ( target )
 
   ...
   2. Let keys be target.[[OwnPropertyKeys]]().
   3. ReturnIfAbrupt(keys).
   4. Return CreateArrayFromList(keys).
 includes: [compareArray.js]
--- a/js/src/tests/test262/intl402/Locale/constructor-tag.js
+++ b/js/src/tests/test262/intl402/Locale/constructor-tag.js
@@ -38,17 +38,17 @@ for (const [langtag, canonical] of Objec
   );
   assert.sameValue(
     new Intl.Locale(langtag).toString(),
     canonical,
     `new Intl.Locale("${langtag}").toString() returns "${canonical}"`
   );
 }
 
-// unicode_language_subtag	= alpha{2,3} | alpha{5,8};
+// unicode_language_subtag = alpha{2,3} | alpha{5,8};
 const invalidLanguageTags = [
   "X-u-foo", 
   "Flob",
   "ZORK",
   "Blah-latn",
   "QuuX-latn-us",
   "SPAM-gb-x-Sausages-BACON-eggs",
 ];
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/class/elements/private-field-as-arrow-function.js
@@ -0,0 +1,36 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-arrow-function.case
+// - src/class-elements/default/cls-expr.template
+/*---
+description: Calling arrow function returned from private field access (field definitions in a class expression)
+esid: prod-FieldDefinition
+features: [class-fields-private, arrow-function, class]
+flags: [generated]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+var C = class {
+  #m = () => 'test262';
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/class/elements/private-field-as-async-arrow-function.js
@@ -0,0 +1,37 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-async-arrow-function.case
+// - src/class-elements/default/cls-expr.template
+/*---
+description: Calling async arrow function returned from private field access (field definitions in a class expression)
+esid: prod-FieldDefinition
+features: [class-fields-private, async-functions, arrow-function, class]
+flags: [generated, async]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+var C = class {
+  #m = async () => 'test262';
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+
+c.method().then((value) => assert.sameValue(value, 'test262'))
+  .then($DONE, $DONE);
+
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/class/elements/private-field-as-async-function.js
@@ -0,0 +1,37 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-async-function.case
+// - src/class-elements/default/cls-expr.template
+/*---
+description: Calling async function returned from private field access (field definitions in a class expression)
+esid: prod-FieldDefinition
+features: [class-fields-private, async-functions, class]
+flags: [generated, async]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+var C = class {
+  #m = async function() { return 'test262'; };
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+
+c.method().then((value) => assert.sameValue(value, 'test262'))
+  .then($DONE, $DONE);
+
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/class/elements/private-field-as-function.js
@@ -0,0 +1,36 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-function.case
+// - src/class-elements/default/cls-expr.template
+/*---
+description: Calling result returned from private field access (field definitions in a class expression)
+esid: prod-FieldDefinition
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+var C = class {
+  #m = function () { return 'test262'; };
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/class/elements/private-field-super-access-throws.js
@@ -0,0 +1,49 @@
+// |reftest| skip -- class-fields-private,class-fields-public is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-super-access-throws.case
+// - src/class-elements/default/cls-expr.template
+/*---
+description: Acessing private field from super should throw an error (field definitions in a class expression)
+esid: prod-FieldDefinition
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+var C = class {
+  #m = function() { return 'test262'; };
+
+  Child = class extends C {
+    access() {
+      return super.#m;
+    }
+
+    method() {
+      return super.#m();
+    }
+  }
+
+}
+
+assert.throws(TypeError, function() {
+  (new (new C()).Child()).method();
+}, 'super.#m() throws TypeError');
+
+assert.throws(TypeError, function() {
+  (new (new C()).Child()).access();
+}, 'super.#m throws TypeError');
+
+
+reportCompare(0, 0);
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/object/prop-def-invalid-star-prefix.js
@@ -0,0 +1,22 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2019 Tiancheng "Timothy" Gu. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+  * is not a valid prefix of an identifier reference
+esid: sec-object-initializer
+info: |
+    PropertyDefinition:
+      IdentifierReference
+      CoverInitializedName
+      PropertyName : AssignmentExpression
+      MethodDefinition
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+({* foo});
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-arrow-function.js
@@ -0,0 +1,36 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling arrow function returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, arrow-function, class]
+flags: [generated]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+  #m = () => 'test262';
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-async-arrow-function.js
@@ -0,0 +1,37 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-async-arrow-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling async arrow function returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, async-functions, arrow-function, class]
+flags: [generated, async]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+  #m = async () => 'test262';
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+
+c.method().then((value) => assert.sameValue(value, 'test262'))
+  .then($DONE, $DONE);
+
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-async-function.js
@@ -0,0 +1,37 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-async-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling async function returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, async-functions, class]
+flags: [generated, async]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+  #m = async function() { return 'test262'; };
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+
+c.method().then((value) => assert.sameValue(value, 'test262'))
+  .then($DONE, $DONE);
+
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-as-function.js
@@ -0,0 +1,36 @@
+// |reftest| skip -- class-fields-private is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-as-function.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Calling result returned from private field access (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class]
+flags: [generated]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+  #m = function () { return 'test262'; };
+
+  method() {
+    return this.#m();
+  }
+}
+
+let c = new C();
+assert.sameValue(c.method(), 'test262');
+
+reportCompare(0, 0);
new file mode 100644
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/private-field-super-access-throws.js
@@ -0,0 +1,49 @@
+// |reftest| skip -- class-fields-private,class-fields-public is not supported
+// This file was procedurally generated from the following sources:
+// - src/class-elements/private-field-super-access-throws.case
+// - src/class-elements/default/cls-decl.template
+/*---
+description: Acessing private field from super should throw an error (field definitions in a class declaration)
+esid: prod-FieldDefinition
+features: [class-fields-private, class-fields-public, class]
+flags: [generated]
+info: |
+    Updated Productions
+
+    CallExpression[Yield, Await]:
+      CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
+      SuperCall[?Yield, ?Await]
+      CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
+      CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
+      CallExpression[?Yield, ?Await].IdentifierName
+      CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
+      CallExpression[?Yield, ?Await].PrivateName
+
+---*/
+
+
+class C {
+  #m = function() { return 'test262'; };
+
+  Child = class extends C {
+    access() {
+      return super.#m;
+    }
+
+    method() {
+      return super.#m();
+    }
+  }
+
+}
+
+assert.throws(TypeError, function() {
+  (new (new C()).Child()).method();
+}, 'super.#m() throws TypeError');
+
+assert.throws(TypeError, function() {
+  (new (new C()).Child()).access();
+}, 'super.#m throws TypeError');
+
+
+reportCompare(0, 0);