Commit 1fc8452b authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[class] Ship instance and static public class fields

Bug: v8:5367
Change-Id: I92a73692e9714b929316d8971a2258e3241bc8c6
Reviewed-on: https://chromium-review.googlesource.com/c/1288643
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Reviewed-by: 's avatarDaniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56790}
parent 39e68c5e
......@@ -228,24 +228,24 @@ DEFINE_IMPLICATION(harmony_class_fields, harmony_private_fields)
// Features that are complete (but still behind --harmony/es-staging flag).
#define HARMONY_STAGED(V) \
V(harmony_public_fields, "harmony public fields in class literals") \
V(harmony_private_fields, "harmony private fields in class literals") \
V(harmony_numeric_separator, "harmony numeric separator between digits") \
V(harmony_string_matchall, "harmony String.prototype.matchAll") \
V(harmony_static_fields, "harmony static fields in class literals")
V(harmony_string_matchall, "harmony String.prototype.matchAll")
// Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING_BASE(V) \
V(harmony_namespace_exports, \
"harmony namespace exports (export * as foo from 'bar')") \
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_import_meta, "harmony import.meta property") \
V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_array_prototype_values, "harmony Array.prototype.values") \
V(harmony_array_flat, "harmony Array.prototype.{flat,flatMap}") \
V(harmony_symbol_description, "harmony Symbol.prototype.description") \
V(harmony_global, "harmony global") \
V(harmony_json_stringify, "well-formed JSON.stringify")
#define HARMONY_SHIPPING_BASE(V) \
V(harmony_namespace_exports, \
"harmony namespace exports (export * as foo from 'bar')") \
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_import_meta, "harmony import.meta property") \
V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_array_prototype_values, "harmony Array.prototype.values") \
V(harmony_array_flat, "harmony Array.prototype.{flat,flatMap}") \
V(harmony_symbol_description, "harmony Symbol.prototype.description") \
V(harmony_global, "harmony global") \
V(harmony_json_stringify, "well-formed JSON.stringify") \
V(harmony_public_fields, "harmony public instance fields in class literals") \
V(harmony_static_fields, "harmony static fields in class literals")
#ifdef V8_INTL_SUPPORT
#define HARMONY_SHIPPING(V) \
......
......@@ -3,12 +3,9 @@ Tests for ES6 class syntax containing semicolon in the class body
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS class A { foo;() { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { foo() ; { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { get ; foo() { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { get foo;() { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { get foo() ; { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { set ; foo(x) { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { set foo;(x) { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { set foo(x) ; { } } threw exception SyntaxError: Unexpected token ;.
PASS class A { ; } did not throw exception.
......
......@@ -23,12 +23,9 @@
description('Tests for ES6 class syntax containing semicolon in the class body');
shouldThrow("class A { foo;() { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { foo() ; { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { get ; foo() { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { get foo;() { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { get foo() ; { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { set ; foo(x) { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { set foo;(x) { } }", "'SyntaxError: Unexpected token ;'");
shouldThrow("class A { set foo(x) ; { } }", "'SyntaxError: Unexpected token ;'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment