Commit 5f0ef667 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[class] Remove flags for class fields

Bug: v8:5367, v8:5368
Change-Id: I86f25f9f658e21a05604f3014e6ebf74f1a8a1f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1590164Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61139}
parent 9b78d20b
...@@ -4185,11 +4185,7 @@ void Genesis::InitializeCallSiteBuiltins() { ...@@ -4185,11 +4185,7 @@ void Genesis::InitializeCallSiteBuiltins() {
void Genesis::InitializeGlobal_##id() {} void Genesis::InitializeGlobal_##id() {}
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_namespace_exports) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_namespace_exports)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_public_fields)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_fields)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_methods) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_methods)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_static_fields)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_dynamic_import) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_dynamic_import)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_meta) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_meta)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_separator) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_separator)
......
...@@ -204,17 +204,10 @@ DEFINE_IMPLICATION(es_staging, harmony) ...@@ -204,17 +204,10 @@ DEFINE_IMPLICATION(es_staging, harmony)
// Enabling import.meta requires to also enable import() // Enabling import.meta requires to also enable import()
DEFINE_IMPLICATION(harmony_import_meta, harmony_dynamic_import) DEFINE_IMPLICATION(harmony_import_meta, harmony_dynamic_import)
DEFINE_IMPLICATION(harmony_class_fields, harmony_public_fields)
DEFINE_IMPLICATION(harmony_class_fields, harmony_static_fields)
DEFINE_IMPLICATION(harmony_class_fields, harmony_private_fields)
DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
// Update bootstrapper.cc whenever adding a new feature flag. // Update bootstrapper.cc whenever adding a new feature flag.
// Features that are still work in progress (behind individual flags). // Features that are still work in progress (behind individual flags).
#define HARMONY_INPROGRESS_BASE(V) \ #define HARMONY_INPROGRESS_BASE(V) \
V(harmony_class_fields, "harmony fields in class literals") \
V(harmony_private_methods, "harmony private methods in class literals") \ V(harmony_private_methods, "harmony private methods in class literals") \
V(harmony_regexp_sequence, "RegExp Unicode sequence properties") \ V(harmony_regexp_sequence, "RegExp Unicode sequence properties") \
V(harmony_weak_refs, "harmony weak references") V(harmony_weak_refs, "harmony weak references")
...@@ -248,11 +241,8 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields) ...@@ -248,11 +241,8 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
V(harmony_import_meta, "harmony import.meta property") \ V(harmony_import_meta, "harmony import.meta property") \
V(harmony_dynamic_import, "harmony dynamic import") \ V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_global, "harmony global") \ V(harmony_global, "harmony global") \
V(harmony_public_fields, "harmony public instance fields in class literals") \
V(harmony_static_fields, "harmony static fields in class literals") \
V(harmony_object_from_entries, "harmony Object.fromEntries()") \ V(harmony_object_from_entries, "harmony Object.fromEntries()") \
V(harmony_await_optimization, "harmony await taking 1 tick") \ V(harmony_await_optimization, "harmony await taking 1 tick") \
V(harmony_private_fields, "harmony private fields in class literals") \
V(harmony_hashbang, "harmony hashbang syntax") \ V(harmony_hashbang, "harmony hashbang syntax") \
V(harmony_numeric_separator, "harmony numeric separator between digits") \ V(harmony_numeric_separator, "harmony numeric separator between digits") \
V(harmony_promise_all_settled, "harmony Promise.allSettled") V(harmony_promise_all_settled, "harmony Promise.allSettled")
......
...@@ -60,12 +60,9 @@ ParseInfo::ParseInfo(Isolate* isolate, AccountingAllocator* zone_allocator) ...@@ -60,12 +60,9 @@ ParseInfo::ParseInfo(Isolate* isolate, AccountingAllocator* zone_allocator)
set_might_always_opt(FLAG_always_opt || FLAG_prepare_always_opt); set_might_always_opt(FLAG_always_opt || FLAG_prepare_always_opt);
set_allow_lazy_compile(FLAG_lazy); set_allow_lazy_compile(FLAG_lazy);
set_allow_natives_syntax(FLAG_allow_natives_syntax); set_allow_natives_syntax(FLAG_allow_natives_syntax);
set_allow_harmony_public_fields(FLAG_harmony_public_fields);
set_allow_harmony_static_fields(FLAG_harmony_static_fields);
set_allow_harmony_dynamic_import(FLAG_harmony_dynamic_import); set_allow_harmony_dynamic_import(FLAG_harmony_dynamic_import);
set_allow_harmony_import_meta(FLAG_harmony_import_meta); set_allow_harmony_import_meta(FLAG_harmony_import_meta);
set_allow_harmony_numeric_separator(FLAG_harmony_numeric_separator); set_allow_harmony_numeric_separator(FLAG_harmony_numeric_separator);
set_allow_harmony_private_fields(FLAG_harmony_private_fields);
set_allow_harmony_private_methods(FLAG_harmony_private_methods); set_allow_harmony_private_methods(FLAG_harmony_private_methods);
} }
......
...@@ -101,18 +101,12 @@ class V8_EXPORT_PRIVATE ParseInfo { ...@@ -101,18 +101,12 @@ class V8_EXPORT_PRIVATE ParseInfo {
FLAG_ACCESSOR(kAllowLazyCompile, allow_lazy_compile, set_allow_lazy_compile) FLAG_ACCESSOR(kAllowLazyCompile, allow_lazy_compile, set_allow_lazy_compile)
FLAG_ACCESSOR(kAllowNativeSyntax, allow_native_syntax, FLAG_ACCESSOR(kAllowNativeSyntax, allow_native_syntax,
set_allow_native_syntax) set_allow_native_syntax)
FLAG_ACCESSOR(kAllowHarmonyPublicFields, allow_harmony_public_fields,
set_allow_harmony_public_fields)
FLAG_ACCESSOR(kAllowHarmonyStaticFields, allow_harmony_static_fields,
set_allow_harmony_static_fields)
FLAG_ACCESSOR(kAllowHarmonyDynamicImport, allow_harmony_dynamic_import, FLAG_ACCESSOR(kAllowHarmonyDynamicImport, allow_harmony_dynamic_import,
set_allow_harmony_dynamic_import) set_allow_harmony_dynamic_import)
FLAG_ACCESSOR(kAllowHarmonyImportMeta, allow_harmony_import_meta, FLAG_ACCESSOR(kAllowHarmonyImportMeta, allow_harmony_import_meta,
set_allow_harmony_import_meta) set_allow_harmony_import_meta)
FLAG_ACCESSOR(kAllowHarmonyNumericSeparator, allow_harmony_numeric_separator, FLAG_ACCESSOR(kAllowHarmonyNumericSeparator, allow_harmony_numeric_separator,
set_allow_harmony_numeric_separator) set_allow_harmony_numeric_separator)
FLAG_ACCESSOR(kAllowHarmonyPrivateFields, allow_harmony_private_fields,
set_allow_harmony_private_fields)
FLAG_ACCESSOR(kAllowHarmonyPrivateMethods, allow_harmony_private_methods, FLAG_ACCESSOR(kAllowHarmonyPrivateMethods, allow_harmony_private_methods,
set_allow_harmony_private_methods) set_allow_harmony_private_methods)
FLAG_ACCESSOR(kIsOneshotIIFE, is_oneshot_iife, set_is_oneshot_iife) FLAG_ACCESSOR(kIsOneshotIIFE, is_oneshot_iife, set_is_oneshot_iife)
......
...@@ -263,11 +263,8 @@ class ParserBase { ...@@ -263,11 +263,8 @@ class ParserBase {
script_id_(script_id), script_id_(script_id),
default_eager_compile_hint_(FunctionLiteral::kShouldLazyCompile), default_eager_compile_hint_(FunctionLiteral::kShouldLazyCompile),
allow_natives_(false), allow_natives_(false),
allow_harmony_public_fields_(false),
allow_harmony_static_fields_(false),
allow_harmony_dynamic_import_(false), allow_harmony_dynamic_import_(false),
allow_harmony_import_meta_(false), allow_harmony_import_meta_(false),
allow_harmony_private_fields_(false),
allow_harmony_private_methods_(false), allow_harmony_private_methods_(false),
allow_eval_cache_(true) { allow_eval_cache_(true) {
pointer_buffer_.reserve(32); pointer_buffer_.reserve(32);
...@@ -279,8 +276,6 @@ class ParserBase { ...@@ -279,8 +276,6 @@ class ParserBase {
void set_allow_##name(bool allow) { allow_##name##_ = allow; } void set_allow_##name(bool allow) { allow_##name##_ = allow; }
ALLOW_ACCESSORS(natives) ALLOW_ACCESSORS(natives)
ALLOW_ACCESSORS(harmony_public_fields)
ALLOW_ACCESSORS(harmony_static_fields)
ALLOW_ACCESSORS(harmony_dynamic_import) ALLOW_ACCESSORS(harmony_dynamic_import)
ALLOW_ACCESSORS(harmony_import_meta) ALLOW_ACCESSORS(harmony_import_meta)
ALLOW_ACCESSORS(harmony_private_methods) ALLOW_ACCESSORS(harmony_private_methods)
...@@ -296,13 +291,6 @@ class ParserBase { ...@@ -296,13 +291,6 @@ class ParserBase {
scanner()->set_allow_harmony_numeric_separator(allow); scanner()->set_allow_harmony_numeric_separator(allow);
} }
bool allow_harmony_private_fields() const {
return scanner()->allow_harmony_private_fields();
}
void set_allow_harmony_private_fields(bool allow) {
scanner()->set_allow_harmony_private_fields(allow);
}
uintptr_t stack_limit() const { return stack_limit_; } uintptr_t stack_limit() const { return stack_limit_; }
void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; }
...@@ -1442,11 +1430,8 @@ class ParserBase { ...@@ -1442,11 +1430,8 @@ class ParserBase {
bool accept_IN_ = true; bool accept_IN_ = true;
bool allow_natives_; bool allow_natives_;
bool allow_harmony_public_fields_;
bool allow_harmony_static_fields_;
bool allow_harmony_dynamic_import_; bool allow_harmony_dynamic_import_;
bool allow_harmony_import_meta_; bool allow_harmony_import_meta_;
bool allow_harmony_private_fields_;
bool allow_harmony_private_methods_; bool allow_harmony_private_methods_;
bool allow_eval_cache_; bool allow_eval_cache_;
}; };
...@@ -1566,7 +1551,7 @@ ParserBase<Impl>::ParsePropertyOrPrivatePropertyName() { ...@@ -1566,7 +1551,7 @@ ParserBase<Impl>::ParsePropertyOrPrivatePropertyName() {
if (V8_LIKELY(Token::IsPropertyName(next))) { if (V8_LIKELY(Token::IsPropertyName(next))) {
name = impl()->GetSymbol(); name = impl()->GetSymbol();
key = factory()->NewStringLiteral(name, pos); key = factory()->NewStringLiteral(name, pos);
} else if (allow_harmony_private_fields() && next == Token::PRIVATE_NAME) { } else if (next == Token::PRIVATE_NAME) {
// In the case of a top level function, we completely skip // In the case of a top level function, we completely skip
// analysing it's scope, meaning, we don't have a chance to // analysing it's scope, meaning, we don't have a chance to
// resolve private names and find that they are not enclosed in a // resolve private names and find that they are not enclosed in a
...@@ -2128,9 +2113,6 @@ ParserBase<Impl>::ParseClassPropertyDefinition(ClassInfo* class_info, ...@@ -2128,9 +2113,6 @@ ParserBase<Impl>::ParseClassPropertyDefinition(ClassInfo* class_info,
DCHECK_EQ(prop_info->position, PropertyPosition::kClassLiteral); DCHECK_EQ(prop_info->position, PropertyPosition::kClassLiteral);
Token::Value name_token = peek(); Token::Value name_token = peek();
DCHECK_IMPLIES(name_token == Token::PRIVATE_NAME,
allow_harmony_private_fields());
int property_beg_pos = scanner()->peek_location().beg_pos; int property_beg_pos = scanner()->peek_location().beg_pos;
int name_token_position = property_beg_pos; int name_token_position = property_beg_pos;
ExpressionT name_expression; ExpressionT name_expression;
...@@ -2166,44 +2148,34 @@ ParserBase<Impl>::ParseClassPropertyDefinition(ClassInfo* class_info, ...@@ -2166,44 +2148,34 @@ ParserBase<Impl>::ParseClassPropertyDefinition(ClassInfo* class_info,
case ParsePropertyKind::kAssign: case ParsePropertyKind::kAssign:
case ParsePropertyKind::kClassField: case ParsePropertyKind::kClassField:
case ParsePropertyKind::kShorthandOrClassField: case ParsePropertyKind::kShorthandOrClassField:
case ParsePropertyKind::kNotSet: // This case is a name followed by a name case ParsePropertyKind::kNotSet: { // This case is a name followed by a
// or other property. Here we have to // name or other property. Here we have
// assume that's an uninitialized field // to assume that's an uninitialized
// followed by a linebreak followed by a // field followed by a linebreak
// property, with ASI adding the // followed by a property, with ASI
// semicolon. If not, there will be a // adding the semicolon. If not, there
// syntax error after parsing the first // will be a syntax error after parsing
// name as an uninitialized field. // the first name as an uninitialized
if (allow_harmony_public_fields() || allow_harmony_private_fields()) { // field.
prop_info->kind = ParsePropertyKind::kClassField; prop_info->kind = ParsePropertyKind::kClassField;
DCHECK_IMPLIES(prop_info->is_computed_name, !prop_info->is_private); DCHECK_IMPLIES(prop_info->is_computed_name, !prop_info->is_private);
if (prop_info->is_static && !allow_harmony_static_fields()) {
ReportUnexpectedToken(Next());
return impl()->NullLiteralProperty();
}
if (!prop_info->is_computed_name) { if (!prop_info->is_computed_name) {
CheckClassFieldName(prop_info->name, prop_info->is_static); CheckClassFieldName(prop_info->name, prop_info->is_static);
} }
ExpressionT initializer = ParseMemberInitializer(
class_info, property_beg_pos, prop_info->is_static);
ExpectSemicolon();
ClassLiteralPropertyT result = factory()->NewClassLiteralProperty(
name_expression, initializer, ClassLiteralProperty::FIELD,
prop_info->is_static, prop_info->is_computed_name,
prop_info->is_private);
impl()->SetFunctionNameFromPropertyName(result, prop_info->name);
return result; ExpressionT initializer = ParseMemberInitializer(
class_info, property_beg_pos, prop_info->is_static);
ExpectSemicolon();
} else { ClassLiteralPropertyT result = factory()->NewClassLiteralProperty(
ReportUnexpectedToken(Next()); name_expression, initializer, ClassLiteralProperty::FIELD,
return impl()->NullLiteralProperty(); prop_info->is_static, prop_info->is_computed_name,
} prop_info->is_private);
impl()->SetFunctionNameFromPropertyName(result, prop_info->name);
return result;
}
case ParsePropertyKind::kMethod: { case ParsePropertyKind::kMethod: {
// MethodDefinition // MethodDefinition
// PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}' // PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}'
......
...@@ -422,12 +422,9 @@ Parser::Parser(ParseInfo* info) ...@@ -422,12 +422,9 @@ Parser::Parser(ParseInfo* info)
allow_lazy_ = info->allow_lazy_compile() && info->allow_lazy_parsing() && allow_lazy_ = info->allow_lazy_compile() && info->allow_lazy_parsing() &&
info->extension() == nullptr && can_compile_lazily; info->extension() == nullptr && can_compile_lazily;
set_allow_natives(info->allow_natives_syntax()); set_allow_natives(info->allow_natives_syntax());
set_allow_harmony_public_fields(info->allow_harmony_public_fields());
set_allow_harmony_static_fields(info->allow_harmony_static_fields());
set_allow_harmony_dynamic_import(info->allow_harmony_dynamic_import()); set_allow_harmony_dynamic_import(info->allow_harmony_dynamic_import());
set_allow_harmony_import_meta(info->allow_harmony_import_meta()); set_allow_harmony_import_meta(info->allow_harmony_import_meta());
set_allow_harmony_numeric_separator(info->allow_harmony_numeric_separator()); set_allow_harmony_numeric_separator(info->allow_harmony_numeric_separator());
set_allow_harmony_private_fields(info->allow_harmony_private_fields());
set_allow_harmony_private_methods(info->allow_harmony_private_methods()); set_allow_harmony_private_methods(info->allow_harmony_private_methods());
for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
++feature) { ++feature) {
...@@ -2808,8 +2805,6 @@ void Parser::DeclareClassField(ClassScope* scope, ...@@ -2808,8 +2805,6 @@ void Parser::DeclareClassField(ClassScope* scope,
const AstRawString* property_name, const AstRawString* property_name,
bool is_static, bool is_computed_name, bool is_static, bool is_computed_name,
bool is_private, ClassInfo* class_info) { bool is_private, ClassInfo* class_info) {
DCHECK(allow_harmony_public_fields() || allow_harmony_private_fields());
if (is_static) { if (is_static) {
class_info->static_fields->Add(property, zone()); class_info->static_fields->Add(property, zone());
} else { } else {
......
...@@ -233,11 +233,8 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { ...@@ -233,11 +233,8 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
parsing_module_, parsing_on_main_thread_); parsing_module_, parsing_on_main_thread_);
#define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
SET_ALLOW(natives); SET_ALLOW(natives);
SET_ALLOW(harmony_public_fields);
SET_ALLOW(harmony_static_fields);
SET_ALLOW(harmony_dynamic_import); SET_ALLOW(harmony_dynamic_import);
SET_ALLOW(harmony_import_meta); SET_ALLOW(harmony_import_meta);
SET_ALLOW(harmony_private_fields);
SET_ALLOW(harmony_private_methods); SET_ALLOW(harmony_private_methods);
SET_ALLOW(eval_cache); SET_ALLOW(eval_cache);
#undef SET_ALLOW #undef SET_ALLOW
......
...@@ -556,12 +556,6 @@ Token::Value Scanner::ScanString() { ...@@ -556,12 +556,6 @@ Token::Value Scanner::ScanString() {
} }
Token::Value Scanner::ScanPrivateName() { Token::Value Scanner::ScanPrivateName() {
if (!allow_harmony_private_fields()) {
ReportScannerError(source_pos(),
MessageTemplate::kInvalidOrUnexpectedToken);
return Token::ILLEGAL;
}
next().literal_chars.Start(); next().literal_chars.Start();
DCHECK_EQ(c0_, '#'); DCHECK_EQ(c0_, '#');
DCHECK(!IsIdentifierStart(kEndOfInput)); DCHECK(!IsIdentifierStart(kEndOfInput));
......
...@@ -405,12 +405,6 @@ class V8_EXPORT_PRIVATE Scanner { ...@@ -405,12 +405,6 @@ class V8_EXPORT_PRIVATE Scanner {
bool FoundHtmlComment() const { return found_html_comment_; } bool FoundHtmlComment() const { return found_html_comment_; }
bool allow_harmony_private_fields() const {
return allow_harmony_private_fields_;
}
void set_allow_harmony_private_fields(bool allow) {
allow_harmony_private_fields_ = allow;
}
bool allow_harmony_numeric_separator() const { bool allow_harmony_numeric_separator() const {
return allow_harmony_numeric_separator_; return allow_harmony_numeric_separator_;
} }
...@@ -812,7 +806,6 @@ class V8_EXPORT_PRIVATE Scanner { ...@@ -812,7 +806,6 @@ class V8_EXPORT_PRIVATE Scanner {
bool found_html_comment_; bool found_html_comment_;
// Harmony flags to allow ESNext features. // Harmony flags to allow ESNext features.
bool allow_harmony_private_fields_;
bool allow_harmony_numeric_separator_; bool allow_harmony_numeric_separator_;
const bool is_module_; const bool is_module_;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
--- ---
wrap: yes wrap: yes
private fields: yes
--- ---
snippet: " snippet: "
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
--- ---
wrap: yes wrap: yes
public fields: yes
--- ---
snippet: " snippet: "
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
--- ---
wrap: yes wrap: yes
public fields: yes
static fields: yes
--- ---
snippet: " snippet: "
......
...@@ -43,10 +43,7 @@ class ProgramOptions final { ...@@ -43,10 +43,7 @@ class ProgramOptions final {
print_callee_(false), print_callee_(false),
oneshot_opt_(false), oneshot_opt_(false),
async_iteration_(false), async_iteration_(false),
public_fields_(false),
private_fields_(false),
private_methods_(false), private_methods_(false),
static_fields_(false),
verbose_(false) {} verbose_(false) {}
bool Validate() const; bool Validate() const;
...@@ -67,10 +64,7 @@ class ProgramOptions final { ...@@ -67,10 +64,7 @@ class ProgramOptions final {
bool print_callee() const { return print_callee_; } bool print_callee() const { return print_callee_; }
bool oneshot_opt() const { return oneshot_opt_; } bool oneshot_opt() const { return oneshot_opt_; }
bool async_iteration() const { return async_iteration_; } bool async_iteration() const { return async_iteration_; }
bool public_fields() const { return public_fields_; }
bool private_fields() const { return private_fields_; }
bool private_methods() const { return private_methods_; } bool private_methods() const { return private_methods_; }
bool static_fields() const { return static_fields_; }
bool verbose() const { return verbose_; } bool verbose() const { return verbose_; }
bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; } bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; }
std::vector<std::string> input_filenames() const { return input_filenames_; } std::vector<std::string> input_filenames() const { return input_filenames_; }
...@@ -89,10 +83,7 @@ class ProgramOptions final { ...@@ -89,10 +83,7 @@ class ProgramOptions final {
bool print_callee_; bool print_callee_;
bool oneshot_opt_; bool oneshot_opt_;
bool async_iteration_; bool async_iteration_;
bool public_fields_;
bool private_fields_;
bool private_methods_; bool private_methods_;
bool static_fields_;
bool verbose_; bool verbose_;
std::vector<std::string> input_filenames_; std::vector<std::string> input_filenames_;
std::string output_filename_; std::string output_filename_;
...@@ -195,14 +186,8 @@ ProgramOptions ProgramOptions::FromCommandLine(int argc, char** argv) { ...@@ -195,14 +186,8 @@ ProgramOptions ProgramOptions::FromCommandLine(int argc, char** argv) {
options.oneshot_opt_ = false; options.oneshot_opt_ = false;
} else if (strcmp(argv[i], "--async-iteration") == 0) { } else if (strcmp(argv[i], "--async-iteration") == 0) {
options.async_iteration_ = true; options.async_iteration_ = true;
} else if (strcmp(argv[i], "--public-fields") == 0) {
options.public_fields_ = true;
} else if (strcmp(argv[i], "--private-fields") == 0) {
options.private_fields_ = true;
} else if (strcmp(argv[i], "--private-methods") == 0) { } else if (strcmp(argv[i], "--private-methods") == 0) {
options.private_methods_ = true; options.private_methods_ = true;
} else if (strcmp(argv[i], "--static-fields") == 0) {
options.static_fields_ = true;
} else if (strcmp(argv[i], "--verbose") == 0) { } else if (strcmp(argv[i], "--verbose") == 0) {
options.verbose_ = true; options.verbose_ = true;
} else if (strncmp(argv[i], "--output=", 9) == 0) { } else if (strncmp(argv[i], "--output=", 9) == 0) {
...@@ -312,14 +297,8 @@ void ProgramOptions::UpdateFromHeader(std::istream& stream) { ...@@ -312,14 +297,8 @@ void ProgramOptions::UpdateFromHeader(std::istream& stream) {
oneshot_opt_ = ParseBoolean(line.c_str() + strlen(kOneshotOpt)); oneshot_opt_ = ParseBoolean(line.c_str() + strlen(kOneshotOpt));
} else if (line.compare(0, 17, "async iteration: ") == 0) { } else if (line.compare(0, 17, "async iteration: ") == 0) {
async_iteration_ = ParseBoolean(line.c_str() + 17); async_iteration_ = ParseBoolean(line.c_str() + 17);
} else if (line.compare(0, 15, "public fields: ") == 0) {
public_fields_ = ParseBoolean(line.c_str() + 15);
} else if (line.compare(0, 16, "private fields: ") == 0) {
private_fields_ = ParseBoolean(line.c_str() + 16);
} else if (line.compare(0, 16, "private methods: ") == 0) { } else if (line.compare(0, 16, "private methods: ") == 0) {
private_methods_ = ParseBoolean(line.c_str() + 16); private_methods_ = ParseBoolean(line.c_str() + 16);
} else if (line.compare(0, 15, "static fields: ") == 0) {
static_fields_ = ParseBoolean(line.c_str() + 15);
} else if (line == "---") { } else if (line == "---") {
break; break;
} else if (line.empty()) { } else if (line.empty()) {
...@@ -344,10 +323,7 @@ void ProgramOptions::PrintHeader(std::ostream& stream) const { // NOLINT ...@@ -344,10 +323,7 @@ void ProgramOptions::PrintHeader(std::ostream& stream) const { // NOLINT
if (print_callee_) stream << "\nprint callee: yes"; if (print_callee_) stream << "\nprint callee: yes";
if (oneshot_opt_) stream << "\noneshot opt: yes"; if (oneshot_opt_) stream << "\noneshot opt: yes";
if (async_iteration_) stream << "\nasync iteration: yes"; if (async_iteration_) stream << "\nasync iteration: yes";
if (public_fields_) stream << "\npublic fields: yes";
if (private_fields_) stream << "\nprivate fields: yes";
if (private_methods_) stream << "\nprivate methods: yes"; if (private_methods_) stream << "\nprivate methods: yes";
if (static_fields_) stream << "\nstatic fields: yes";
stream << "\n\n"; stream << "\n\n";
} }
...@@ -456,10 +432,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT ...@@ -456,10 +432,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT
printer.set_test_function_name(options.test_function_name()); printer.set_test_function_name(options.test_function_name());
} }
if (options.public_fields()) i::FLAG_harmony_public_fields = true;
if (options.private_fields()) i::FLAG_harmony_private_fields = true;
if (options.private_methods()) i::FLAG_harmony_private_methods = true; if (options.private_methods()) i::FLAG_harmony_private_methods = true;
if (options.static_fields()) i::FLAG_harmony_static_fields = true;
stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n"; stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n";
options.PrintHeader(stream); options.PrintHeader(stream);
...@@ -467,10 +440,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT ...@@ -467,10 +440,7 @@ void GenerateExpectationsFile(std::ostream& stream, // NOLINT
printer.PrintExpectation(stream, snippet); printer.PrintExpectation(stream, snippet);
} }
i::FLAG_harmony_public_fields = false;
i::FLAG_harmony_private_fields = false;
i::FLAG_harmony_private_methods = false; i::FLAG_harmony_private_methods = false;
i::FLAG_harmony_static_fields = false;
} }
bool WriteExpectationsFile(const std::vector<std::string>& snippet_list, bool WriteExpectationsFile(const std::vector<std::string>& snippet_list,
...@@ -519,10 +489,7 @@ void PrintUsage(const char* exec_path) { ...@@ -519,10 +489,7 @@ void PrintUsage(const char* exec_path) {
" --test-function-name=foo " " --test-function-name=foo "
"Specify the name of the test function.\n" "Specify the name of the test function.\n"
" --top-level Process top level code, not the top-level function.\n" " --top-level Process top level code, not the top-level function.\n"
" --public-fields Enable harmony_public_fields flag.\n"
" --private-fields Enable harmony_private_fields flag.\n"
" --private-methods Enable harmony_private_methods flag.\n" " --private-methods Enable harmony_private_methods flag.\n"
" --static-fields Enable harmony_static_fields flag.\n"
" --output=file.name\n" " --output=file.name\n"
" Specify the output file. If not specified, output goes to " " Specify the output file. If not specified, output goes to "
"stdout.\n" "stdout.\n"
......
...@@ -2650,8 +2650,6 @@ TEST(ClassAndSuperClass) { ...@@ -2650,8 +2650,6 @@ TEST(ClassAndSuperClass) {
} }
TEST(PublicClassFields) { TEST(PublicClassFields) {
bool old_flag = i::FLAG_harmony_public_fields;
i::FLAG_harmony_public_fields = true;
InitializedIgnitionHandleScope scope; InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate()); BytecodeExpectationsPrinter printer(CcTest::isolate());
...@@ -2700,12 +2698,9 @@ TEST(PublicClassFields) { ...@@ -2700,12 +2698,9 @@ TEST(PublicClassFields) {
CHECK(CompareTexts(BuildActual(printer, snippets), CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PublicClassFields.golden"))); LoadGolden("PublicClassFields.golden")));
i::FLAG_harmony_public_fields = old_flag;
} }
TEST(PrivateClassFields) { TEST(PrivateClassFields) {
bool old_flag = i::FLAG_harmony_private_fields;
i::FLAG_harmony_private_fields = true;
InitializedIgnitionHandleScope scope; InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate()); BytecodeExpectationsPrinter printer(CcTest::isolate());
...@@ -2760,14 +2755,9 @@ TEST(PrivateClassFields) { ...@@ -2760,14 +2755,9 @@ TEST(PrivateClassFields) {
CHECK(CompareTexts(BuildActual(printer, snippets), CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PrivateClassFields.golden"))); LoadGolden("PrivateClassFields.golden")));
i::FLAG_harmony_private_fields = old_flag;
} }
TEST(StaticClassFields) { TEST(StaticClassFields) {
bool old_flag = i::FLAG_harmony_public_fields;
bool old_static_flag = i::FLAG_harmony_static_fields;
i::FLAG_harmony_public_fields = true;
i::FLAG_harmony_static_fields = true;
InitializedIgnitionHandleScope scope; InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate()); BytecodeExpectationsPrinter printer(CcTest::isolate());
...@@ -2826,8 +2816,6 @@ TEST(StaticClassFields) { ...@@ -2826,8 +2816,6 @@ TEST(StaticClassFields) {
CHECK(CompareTexts(BuildActual(printer, snippets), CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("StaticClassFields.golden"))); LoadGolden("StaticClassFields.golden")));
i::FLAG_harmony_public_fields = old_flag;
i::FLAG_harmony_static_fields = old_static_flag;
} }
TEST(Generators) { TEST(Generators) {
......
...@@ -110,9 +110,6 @@ TEST(PreParserScopeAnalysis) { ...@@ -110,9 +110,6 @@ TEST(PreParserScopeAnalysis) {
Inner(const char* p, const char* s, SkipTests skip, Bailout bailout) Inner(const char* p, const char* s, SkipTests skip, Bailout bailout)
: params(p), source(s), skip(skip), bailout(bailout) {} : params(p), source(s), skip(skip), bailout(bailout) {}
Inner(const char* s, std::function<void()> p, std::function<void()> e)
: source(s), prologue(p), epilogue(e) {}
const char* params = ""; const char* params = "";
const char* source; const char* source;
SkipTests skip = DONT_SKIP; SkipTests skip = DONT_SKIP;
...@@ -659,33 +656,11 @@ TEST(PreParserScopeAnalysis) { ...@@ -659,33 +656,11 @@ TEST(PreParserScopeAnalysis) {
{"class MyClass extends MyBase { static m() { var var1; function foo() { " {"class MyClass extends MyBase { static m() { var var1; function foo() { "
"var1 = 11; } } }"}, "var1 = 11; } } }"},
{"class X { ['bar'] = 1; }; new X;", {"class X { ['bar'] = 1; }; new X;"},
[] { i::FLAG_harmony_public_fields = true; }, {"class X { static ['foo'] = 2; }; new X;"},
[] { i::FLAG_harmony_public_fields = false; }}, {"class X { ['bar'] = 1; static ['foo'] = 2; }; new X;"},
{"class X { static ['foo'] = 2; }; new X;", {"class X { #x = 1 }; new X;"},
[] { {"function t() { return class { #x = 1 }; } new t();"},
i::FLAG_harmony_public_fields = true;
i::FLAG_harmony_static_fields = true;
},
[] {
i::FLAG_harmony_public_fields = false;
i::FLAG_harmony_static_fields = false;
}},
{"class X { ['bar'] = 1; static ['foo'] = 2; }; new X;",
[] {
i::FLAG_harmony_public_fields = true;
i::FLAG_harmony_static_fields = true;
},
[] {
i::FLAG_harmony_public_fields = false;
i::FLAG_harmony_static_fields = false;
}},
{"class X { #x = 1 }; new X;",
[] { i::FLAG_harmony_private_fields = true; },
[] { i::FLAG_harmony_private_fields = false; }},
{"function t() { return class { #x = 1 }; } new t();",
[] { i::FLAG_harmony_private_fields = true; },
[] { i::FLAG_harmony_private_fields = false; }},
}; };
for (unsigned i = 0; i < arraysize(outers); ++i) { for (unsigned i = 0; i < arraysize(outers); ++i) {
...@@ -705,8 +680,6 @@ TEST(PreParserScopeAnalysis) { ...@@ -705,8 +680,6 @@ TEST(PreParserScopeAnalysis) {
int source_len = Utf8LengthHelper(inner.source); int source_len = Utf8LengthHelper(inner.source);
int len = code_len + params_len + source_len; int len = code_len + params_len + source_len;
if (inner.prologue != nullptr) inner.prologue();
i::ScopedVector<char> program(len + 1); i::ScopedVector<char> program(len + 1);
i::SNPrintF(program, code, inner.params, inner.source); i::SNPrintF(program, code, inner.params, inner.source);
...@@ -770,8 +743,6 @@ TEST(PreParserScopeAnalysis) { ...@@ -770,8 +743,6 @@ TEST(PreParserScopeAnalysis) {
i::ScopeTestHelper::CompareScopes( i::ScopeTestHelper::CompareScopes(
scope_without_skipped_functions, scope_with_skipped_functions, scope_without_skipped_functions, scope_with_skipped_functions,
inner.precise_maybe_assigned == PreciseMaybeAssigned::YES); inner.precise_maybe_assigned == PreciseMaybeAssigned::YES);
if (inner.epilogue != nullptr) inner.epilogue();
} }
} }
} }
......
...@@ -4546,8 +4546,6 @@ TEST(GetPrivateFields) { ...@@ -4546,8 +4546,6 @@ TEST(GetPrivateFields) {
v8::internal::Isolate* isolate = CcTest::i_isolate(); v8::internal::Isolate* isolate = CcTest::i_isolate();
v8::HandleScope scope(v8_isolate); v8::HandleScope scope(v8_isolate);
v8::Local<v8::Context> context = env.local(); v8::Local<v8::Context> context = env.local();
v8::internal::FLAG_harmony_class_fields = true;
v8::internal::FLAG_harmony_private_fields = true;
v8::Local<v8::String> source = v8_str( v8::Local<v8::String> source = v8_str(
"var X = class {\n" "var X = class {\n"
" #foo = 1;\n" " #foo = 1;\n"
......
This diff is collapsed.
// Copyright 2015 the V8 project authors. All rights reserved. // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-public-fields
class X { class X {
constructor = function() {}; constructor = function() {};
......
*%(basename)s:8: SyntaxError: Classes may not have a field named 'constructor' *%(basename)s:6: SyntaxError: Classes may not have a field named 'constructor'
constructor = function() {}; constructor = function() {};
^^^^^^^^^^^ ^^^^^^^^^^^
SyntaxError: Classes may not have a field named 'constructor' SyntaxError: Classes may not have a field named 'constructor'
\ No newline at end of file
// Copyright 2015 the V8 project authors. All rights reserved. // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-public-fields --harmony-static-fields
class X { class X {
static constructor = function() {}; static constructor = function() {};
......
*%(basename)s:8: SyntaxError: Classes may not have a field named 'constructor' *%(basename)s:6: SyntaxError: Classes may not have a field named 'constructor'
static constructor = function() {}; static constructor = function() {};
^^^^^^^^^^^ ^^^^^^^^^^^
SyntaxError: Classes may not have a field named 'constructor' SyntaxError: Classes may not have a field named 'constructor'
\ No newline at end of file
// Copyright 2015 the V8 project authors. All rights reserved. // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-public-fields --harmony-static-fields
class X { class X {
static prototype = function() {}; static prototype = function() {};
......
*%(basename)s:8: SyntaxError: Classes may not have a static property named 'prototype' *%(basename)s:6: SyntaxError: Classes may not have a static property named 'prototype'
static prototype = function() {}; static prototype = function() {};
^^^^^^^^^ ^^^^^^^^^
SyntaxError: Classes may not have a static property named 'prototype' SyntaxError: Classes may not have a static property named 'prototype'
\ No newline at end of file
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-public-fields
class X { class X {
[foo()] = 1; [foo()] = 1;
......
*%(basename)s:8: ReferenceError: foo is not defined *%(basename)s:6: ReferenceError: foo is not defined
[foo()] = 1; [foo()] = 1;
^ ^
ReferenceError: foo is not defined ReferenceError: foo is not defined
at *%(basename)s:8:4 at *%(basename)s:6:4
\ No newline at end of file \ No newline at end of file
// Copyright 2019 the V8 project authors. All rights reserved. // Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-private-fields
class Y { class Y {
makeClass() { makeClass() {
......
*%(basename)s:12: SyntaxError: Undefined private field #b: must be declared in an enclosing class *%(basename)s:10: SyntaxError: Undefined private field #b: must be declared in an enclosing class
getB() { return this.#b; } getB() { return this.#b; }
^ ^
SyntaxError: Undefined private field #b: must be declared in an enclosing class SyntaxError: Undefined private field #b: must be declared in an enclosing class
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-private-fields
var o = {}; var o = {};
class C { class C {
#a = 0; #a = 0;
......
*%(basename)s:11: TypeError: Read of private field #a from an object which did not contain the field *%(basename)s:9: TypeError: Read of private field #a from an object which did not contain the field
[o.#a](){} [o.#a](){}
^ ^
TypeError: Read of private field #a from an object which did not contain the field TypeError: Read of private field #a from an object which did not contain the field
at *%(basename)s:11:8 at *%(basename)s:9:8
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-private-fields
class X { class X {
#x; #x;
......
*%(basename)s:10: TypeError: Write of private field #x to an object which did not contain the field *%(basename)s:8: TypeError: Write of private field #x to an object which did not contain the field
({}).#x = 1; ({}).#x = 1;
^ ^
TypeError: Write of private field #x to an object which did not contain the field TypeError: Write of private field #x to an object which did not contain the field
at new X (*%(basename)s:10:13) at new X (*%(basename)s:8:13)
at *%(basename)s:14:1 at *%(basename)s:12:1
\ No newline at end of file \ No newline at end of file
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-private-fields
class X { class X {
constructor() { constructor() {
......
*%(basename)s:9: SyntaxError: Undefined private field #x: must be declared in an enclosing class *%(basename)s:7: SyntaxError: Undefined private field #x: must be declared in an enclosing class
this.#x = 1; this.#x = 1;
^ ^
SyntaxError: Undefined private field #x: must be declared in an enclosing class SyntaxError: Undefined private field #x: must be declared in an enclosing class
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// MODULE // MODULE
// Flags: --harmony-private-fields
class X { class X {
constructor() { constructor() {
......
*%(basename)s:10: SyntaxError: Undefined private field #x: must be declared in an enclosing class *%(basename)s:9: SyntaxError: Undefined private field #x: must be declared in an enclosing class
this.#x = 1; this.#x = 1;
^ ^
SyntaxError: Undefined private field #x: must be declared in an enclosing class SyntaxError: Undefined private field #x: must be declared in an enclosing class
\ No newline at end of file
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-private-fields
class X { class X {
#x; #x;
......
*%(basename)s:9: TypeError: Read of private field #x from an object which did not contain the field *%(basename)s:7: TypeError: Read of private field #x from an object which did not contain the field
eq(o) { return this.#x === o.#x; } eq(o) { return this.#x === o.#x; }
^ ^
TypeError: Read of private field #x from an object which did not contain the field TypeError: Read of private field #x from an object which did not contain the field
at X.eq (*%(basename)s:9:32) at X.eq (*%(basename)s:7:32)
at *%(basename)s:12:9 at *%(basename)s:10:9
\ No newline at end of file \ No newline at end of file
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-private-fields
class X { class X {
#x; #x;
......
*%(basename)s:9: TypeError: Write of private field #x to an object which did not contain the field *%(basename)s:7: TypeError: Write of private field #x to an object which did not contain the field
setX(o, val) { o.#x = val; } setX(o, val) { o.#x = val; }
^ ^
TypeError: Write of private field #x to an object which did not contain the field TypeError: Write of private field #x to an object which did not contain the field
at X.setX (*%(basename)s:9:23) at X.setX (*%(basename)s:7:23)
at *%(basename)s:12:9 at *%(basename)s:10:9
\ No newline at end of file \ No newline at end of file
// Copyright 2019 the V8 project authors. All rights reserved. // Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-private-fields
class A { class A {
fn() { fn() {
......
*%(basename)s:10: SyntaxError: Undefined private field #b: must be declared in an enclosing class *%(basename)s:8: SyntaxError: Undefined private field #b: must be declared in an enclosing class
getA() { return this.#b; } getA() { return this.#b; }
^ ^
SyntaxError: Undefined private field #b: must be declared in an enclosing class SyntaxError: Undefined private field #b: must be declared in an enclosing class
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-public-fields --harmony-static-fields
//
// TODO(gsathya): Remove 'Function' from stack trace. // TODO(gsathya): Remove 'Function' from stack trace.
class X { class X {
......
*%(basename)s:10: ReferenceError: foo is not defined *%(basename)s:8: ReferenceError: foo is not defined
static x = foo(); static x = foo();
^ ^
ReferenceError: foo is not defined ReferenceError: foo is not defined
at Function.<static_fields_initializer> (*%(basename)s:10:14) at Function.<static_fields_initializer> (*%(basename)s:8:14)
at *%(basename)s:1:1 at *%(basename)s:1:1
\ No newline at end of file
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-public-fields
class X { class X {
x = foo(); x = foo();
......
*%(basename)s:8: ReferenceError: foo is not defined *%(basename)s:6: ReferenceError: foo is not defined
x = foo(); x = foo();
^ ^
ReferenceError: foo is not defined ReferenceError: foo is not defined
at X.<instance_members_initializer> (*%(basename)s:8:7) at X.<instance_members_initializer> (*%(basename)s:6:7)
at new X (*%(basename)s:7:1) at new X (*%(basename)s:5:1)
at *%(basename)s:11:1 at *%(basename)s:9:1
\ No newline at end of file \ No newline at end of file
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-class-fields
class Foo { class Foo {
#x = 1; #x = 1;
destructureX() { destructureX() {
......
*%(basename)s:10: SyntaxError: Unexpected identifier *%(basename)s:8: SyntaxError: Unexpected identifier
const { #x: x } = this; const { #x: x } = this;
^^ ^^
SyntaxError: Unexpected identifier SyntaxError: Unexpected identifier
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-private-fields
{ {
class X { class X {
#x = 1; #x = 1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-private-fields --allow-natives-syntax // Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js'); load('test/mjsunit/test-async.js');
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-private-fields --allow-natives-syntax // Flags: --allow-natives-syntax
"use strict"; "use strict";
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-private-fields --allow-natives-syntax // Flags: --allow-natives-syntax
"use strict"; "use strict";
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-public-fields
"use strict"; "use strict";
{ {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-public-fields --harmony-static-fields
"use strict"; "use strict";
{ {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-class-fields
assertThrows(() => eval(` assertThrows(() => eval(`
class Foo { class Foo {
#x = 1; #x = 1;
......
...@@ -44,10 +44,6 @@ from testrunner.outproc import test262 ...@@ -44,10 +44,6 @@ from testrunner.outproc import test262
# TODO(littledan): move the flag mapping into the status file # TODO(littledan): move the flag mapping into the status file
FEATURE_FLAGS = { FEATURE_FLAGS = {
'class-fields-public': '--harmony-public-fields',
'class-static-fields-public': '--harmony-class-fields',
'class-fields-private': '--harmony-private-fields',
'class-static-fields-private': '--harmony-private-fields',
'numeric-separator-literal': '--harmony-numeric-separator', 'numeric-separator-literal': '--harmony-numeric-separator',
'Intl.DateTimeFormat-datetimestyle': '--harmony-intl-datetime-style', 'Intl.DateTimeFormat-datetimestyle': '--harmony-intl-datetime-style',
'Intl.Locale': '--harmony-locale', 'Intl.Locale': '--harmony-locale',
......
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