Commit 5f18a2e6 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by Commit Bot

[flags] Remove --harmony-private-methods

It's shipped since M84.

Bug: v8:8330
Change-Id: Ia643948c0de83fc9a8faf7307b7fd86a1e117dc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2511034
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71166}
parent 73f8a710
......@@ -280,7 +280,6 @@ DEFINE_IMPLICATION(harmony_weak_refs_with_cleanup_some, harmony_weak_refs)
#define HARMONY_SHIPPING_BASE(V) \
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_atomics, "harmony atomics") \
V(harmony_private_methods, "harmony private methods in class literals") \
V(harmony_weak_refs, "harmony weak references") \
V(harmony_string_replaceall, "harmony String.prototype.replaceAll") \
V(harmony_logical_assignment, "harmony logical assignment") \
......
......@@ -4229,7 +4229,6 @@ void Genesis::InitializeCallSiteBuiltins() {
#define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
void Genesis::InitializeGlobal_##id() {}
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_methods)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_sequence)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_top_level_await)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_logical_assignment)
......
......@@ -32,7 +32,6 @@ UnoptimizedCompileFlags::UnoptimizedCompileFlags(Isolate* isolate,
set_might_always_opt(FLAG_always_opt || FLAG_prepare_always_opt);
set_allow_natives_syntax(FLAG_allow_natives_syntax);
set_allow_lazy_compile(FLAG_lazy);
set_allow_harmony_private_methods(FLAG_harmony_private_methods);
set_collect_source_positions(!FLAG_enable_lazy_source_positions ||
isolate->NeedsDetailedOptimizedCodeLineInfo());
set_allow_harmony_top_level_await(FLAG_harmony_top_level_await);
......
......@@ -60,7 +60,6 @@ class Zone;
V(might_always_opt, bool, 1, _) \
V(allow_natives_syntax, bool, 1, _) \
V(allow_lazy_compile, bool, 1, _) \
V(allow_harmony_private_methods, bool, 1, _) \
V(is_oneshot_iife, bool, 1, _) \
V(collect_source_positions, bool, 1, _) \
V(allow_harmony_top_level_await, bool, 1, _) \
......
......@@ -2161,13 +2161,6 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseProperty(
prop_info->kind = ParsePropertyKind::kNotSet;
return impl()->FailureExpression();
}
if (V8_UNLIKELY(!flags().allow_harmony_private_methods() &&
(IsAccessor(prop_info->kind) ||
prop_info->kind == ParsePropertyKind::kMethod))) {
ReportUnexpectedToken(Next());
prop_info->kind = ParsePropertyKind::kNotSet;
return impl()->FailureExpression();
}
break;
case Token::STRING:
......
......@@ -3047,9 +3047,6 @@ void Parser::DeclarePrivateClassMember(ClassScope* scope,
ClassLiteralProperty* property,
ClassLiteralProperty::Kind kind,
bool is_static, ClassInfo* class_info) {
DCHECK_IMPLIES(kind != ClassLiteralProperty::Kind::FIELD,
flags().allow_harmony_private_methods());
if (kind == ClassLiteralProperty::Kind::FIELD) {
if (is_static) {
class_info->static_fields->Add(property, zone());
......
......@@ -5,7 +5,6 @@
---
wrap: no
test function name: test
private methods: yes
---
snippet: "
......
......@@ -4,7 +4,6 @@
---
wrap: yes
private methods: yes
---
snippet: "
......
......@@ -5,7 +5,6 @@
---
wrap: no
test function name: test
private methods: yes
---
snippet: "
......
......@@ -5,7 +5,6 @@
---
wrap: no
test function name: test
private methods: yes
---
snippet: "
......
......@@ -4,7 +4,6 @@
---
wrap: yes
private methods: yes
---
snippet: "
......
......@@ -5,7 +5,6 @@
---
wrap: no
test function name: test
private methods: yes
---
snippet: "
......
......@@ -4,7 +4,6 @@
---
wrap: yes
private methods: yes
---
snippet: "
......
......@@ -46,7 +46,6 @@ class ProgramOptions final {
print_callee_(false),
oneshot_opt_(false),
async_iteration_(false),
private_methods_(false),
top_level_await_(false),
verbose_(false) {}
......@@ -70,7 +69,6 @@ class ProgramOptions final {
bool print_callee() const { return print_callee_; }
bool oneshot_opt() const { return oneshot_opt_; }
bool async_iteration() const { return async_iteration_; }
bool private_methods() const { return private_methods_; }
bool top_level_await() const { return top_level_await_; }
bool verbose() const { return verbose_; }
bool suppress_runtime_errors() const { return baseline() && !verbose_; }
......@@ -91,7 +89,6 @@ class ProgramOptions final {
bool print_callee_;
bool oneshot_opt_;
bool async_iteration_;
bool private_methods_;
bool top_level_await_;
bool verbose_;
std::vector<std::string> input_filenames_;
......@@ -197,8 +194,6 @@ ProgramOptions ProgramOptions::FromCommandLine(int argc, char** argv) {
options.oneshot_opt_ = false;
} else if (strcmp(argv[i], "--async-iteration") == 0) {
options.async_iteration_ = true;
} else if (strcmp(argv[i], "--private-methods") == 0) {
options.private_methods_ = true;
} else if (strcmp(argv[i], "--harmony-top-level-await") == 0) {
options.top_level_await_ = true;
} else if (strcmp(argv[i], "--verbose") == 0) {
......@@ -321,8 +316,6 @@ void ProgramOptions::UpdateFromHeader(std::istream* stream) {
oneshot_opt_ = ParseBoolean(line.c_str() + strlen(kOneshotOpt));
} else if (line.compare(0, 17, "async iteration: ") == 0) {
async_iteration_ = ParseBoolean(line.c_str() + 17);
} else if (line.compare(0, 17, "private methods: ") == 0) {
private_methods_ = ParseBoolean(line.c_str() + 17);
} else if (line.compare(0, 17, "top level await: ") == 0) {
top_level_await_ = ParseBoolean(line.c_str() + 17);
} else if (line == "---") {
......@@ -348,7 +341,6 @@ void ProgramOptions::PrintHeader(std::ostream* stream) const {
if (print_callee_) *stream << "\nprint callee: yes";
if (oneshot_opt_) *stream << "\noneshot opt: yes";
if (async_iteration_) *stream << "\nasync iteration: yes";
if (private_methods_) *stream << "\nprivate methods: yes";
if (top_level_await_) *stream << "\ntop level await: yes";
*stream << "\n\n";
......@@ -458,7 +450,6 @@ void GenerateExpectationsFile(std::ostream* stream,
printer.set_test_function_name(options.test_function_name());
}
if (options.private_methods()) i::FLAG_harmony_private_methods = true;
if (options.top_level_await()) i::FLAG_harmony_top_level_await = true;
*stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n";
......@@ -467,7 +458,6 @@ void GenerateExpectationsFile(std::ostream* stream,
printer.PrintExpectation(stream, snippet);
}
i::FLAG_harmony_private_methods = false;
i::FLAG_harmony_top_level_await = false;
}
......@@ -528,7 +518,6 @@ void PrintUsage(const char* exec_path) {
" --test-function-name=foo "
"Specify the name of the test function.\n"
" --top-level Process top level code, not the top-level function.\n"
" --private-methods Enable harmony_private_methods flag.\n"
" --top-level-await Enable await at the module level.\n"
" --output=file.name\n"
" Specify the output file. If not specified, output goes to "
......
......@@ -2797,8 +2797,6 @@ TEST(PrivateClassFieldAccess) {
}
TEST(PrivateMethodDeclaration) {
bool old_methods_flag = i::FLAG_harmony_private_methods;
i::FLAG_harmony_private_methods = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
......@@ -2827,12 +2825,9 @@ TEST(PrivateMethodDeclaration) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PrivateMethodDeclaration.golden")));
i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(PrivateMethodAccess) {
bool old_methods_flag = i::FLAG_harmony_private_methods;
i::FLAG_harmony_private_methods = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
printer.set_wrap(false);
......@@ -2873,12 +2868,9 @@ TEST(PrivateMethodAccess) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PrivateMethodAccess.golden")));
i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(PrivateAccessorAccess) {
bool old_methods_flag = i::FLAG_harmony_private_methods;
i::FLAG_harmony_private_methods = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
printer.set_wrap(false);
......@@ -2928,12 +2920,9 @@ TEST(PrivateAccessorAccess) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PrivateAccessorAccess.golden")));
i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(StaticPrivateMethodDeclaration) {
bool old_methods_flag = i::FLAG_harmony_private_methods;
i::FLAG_harmony_private_methods = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
......@@ -2972,12 +2961,9 @@ TEST(StaticPrivateMethodDeclaration) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("StaticPrivateMethodDeclaration.golden")));
i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(StaticPrivateMethodAccess) {
bool old_methods_flag = i::FLAG_harmony_private_methods;
i::FLAG_harmony_private_methods = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
printer.set_wrap(false);
......@@ -3052,12 +3038,9 @@ TEST(StaticPrivateMethodAccess) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("StaticPrivateMethodAccess.golden")));
i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(PrivateAccessorDeclaration) {
bool old_methods_flag = i::FLAG_harmony_private_methods;
i::FLAG_harmony_private_methods = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
......@@ -3111,7 +3094,6 @@ TEST(PrivateAccessorDeclaration) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PrivateAccessorDeclaration.golden")));
i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(StaticClassFields) {
......
......@@ -4859,7 +4859,6 @@ TEST(GetPrivateFields) {
}
TEST(GetPrivateMethodsAndAccessors) {
i::FLAG_harmony_private_methods = true;
LocalContext env;
v8::Isolate* v8_isolate = CcTest::isolate();
v8::HandleScope scope(v8_isolate);
......@@ -4996,7 +4995,6 @@ TEST(GetPrivateMethodsAndAccessors) {
}
TEST(GetPrivateStaticMethodsAndAccessors) {
i::FLAG_harmony_private_methods = true;
LocalContext env;
v8::Isolate* v8_isolate = CcTest::isolate();
v8::HandleScope scope(v8_isolate);
......@@ -5047,7 +5045,6 @@ TEST(GetPrivateStaticMethodsAndAccessors) {
}
TEST(GetPrivateStaticAndInstanceMethodsAndAccessors) {
i::FLAG_harmony_private_methods = true;
LocalContext env;
v8::Isolate* v8_isolate = CcTest::isolate();
v8::HandleScope scope(v8_isolate);
......
......@@ -1619,7 +1619,6 @@ const char* ReadString(unsigned* start) {
enum ParserFlag {
kAllowLazy,
kAllowNatives,
kAllowHarmonyPrivateMethods,
kAllowHarmonyLogicalAssignment,
};
......@@ -1631,7 +1630,6 @@ enum ParserSyncTestResult {
void SetGlobalFlags(base::EnumSet<ParserFlag> flags) {
i::FLAG_allow_natives_syntax = flags.contains(kAllowNatives);
i::FLAG_harmony_private_methods = flags.contains(kAllowHarmonyPrivateMethods);
i::FLAG_harmony_logical_assignment =
flags.contains(kAllowHarmonyLogicalAssignment);
}
......@@ -1639,8 +1637,6 @@ void SetGlobalFlags(base::EnumSet<ParserFlag> flags) {
void SetParserFlags(i::UnoptimizedCompileFlags* compile_flags,
base::EnumSet<ParserFlag> flags) {
compile_flags->set_allow_natives_syntax(flags.contains(kAllowNatives));
compile_flags->set_allow_harmony_private_methods(
flags.contains(kAllowHarmonyPrivateMethods));
compile_flags->set_allow_harmony_logical_assignment(
flags.contains(kAllowHarmonyLogicalAssignment));
}
......@@ -5697,11 +5693,7 @@ TEST(PrivateMethodsNoErrors) {
};
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods, arraysize(private_methods));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
TEST(PrivateMethodsAndFieldsNoErrors) {
......@@ -5755,13 +5747,7 @@ TEST(PrivateMethodsAndFieldsNoErrors) {
};
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods_and_fields[] = {
kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods_and_fields,
arraysize(private_methods_and_fields));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
TEST(PrivateMethodsErrors) {
......@@ -5830,10 +5816,6 @@ TEST(PrivateMethodsErrors) {
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
private_methods, arraysize(private_methods));
}
// Test that private members parse in class bodies nested in object literals
......@@ -5856,9 +5838,7 @@ TEST(PrivateMembersNestedInObjectLiteralsNoErrors) {
};
// clang-format on
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods, arraysize(private_methods));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
// Test that private members parse in class bodies nested in classes
......@@ -5883,9 +5863,7 @@ TEST(PrivateMembersInNestedClassNoErrors) {
};
// clang-format on
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods, arraysize(private_methods));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
// Test that private members do not parse outside class bodies
......@@ -5915,10 +5893,6 @@ TEST(PrivateMembersInNonClassErrors) {
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
private_methods, arraysize(private_methods));
}
// Test that nested private members parse
......@@ -5941,9 +5915,7 @@ TEST(PrivateMembersNestedNoErrors) {
};
// clang-format on
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods, arraysize(private_methods));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
// Test that acessing undeclared private members result in early errors
......@@ -5964,10 +5936,6 @@ TEST(PrivateMembersEarlyErrors) {
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
private_methods, arraysize(private_methods));
}
// Test that acessing wrong kind private members do not error early.
......@@ -6032,9 +6000,7 @@ TEST(PrivateMembersWrongAccessNoEarlyErrors) {
};
// clang-format on
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods, arraysize(private_methods));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
TEST(PrivateStaticClassMethodsAndAccessorsNoErrors) {
......@@ -6057,11 +6023,7 @@ TEST(PrivateStaticClassMethodsAndAccessorsNoErrors) {
};
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
private_methods, arraysize(private_methods));
RunParserSyncTest(context_data, class_body_data, kSuccess);
}
TEST(PrivateStaticClassMethodsAndAccessorsDuplicateErrors) {
......@@ -6095,10 +6057,6 @@ TEST(PrivateStaticClassMethodsAndAccessorsDuplicateErrors) {
// clang-format on
RunParserSyncTest(context_data, class_body_data, kError);
static const ParserFlag private_methods[] = {kAllowHarmonyPrivateMethods};
RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
private_methods, arraysize(private_methods));
}
TEST(PrivateClassFieldsNoErrors) {
......@@ -6279,15 +6237,9 @@ TEST(PrivateClassFieldsErrors) {
"#constructor = function() {}",
"# a = 0",
"#a() { }",
"get #a() { }",
"#get a() { }",
"set #a() { }",
"#set a() { }",
"*#a() { }",
"#*a() { }",
"async #a() { }",
"async *#a() { }",
"async #*a() { }",
"#0 = 0;",
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
let {session, contextGroup, Protocol} = InspectorTest.start(
'Test empty inner classes with private instance methods in the outer class');
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --harmony-private-methods
let {session, contextGroup, Protocol} = InspectorTest.start("Check private methods in object preview.");
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
let { session, contextGroup, Protocol } = InspectorTest.start(
"Test static private class methods"
);
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --harmony-private-methods
let {session, contextGroup, Protocol} = InspectorTest.start("Check static private methods in object preview.");
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
let { session, contextGroup, Protocol } = InspectorTest.start(
"Test static private class methods"
);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
let { session, contextGroup, Protocol } = InspectorTest.start(
"Test accessing unused private methods at runtime"
);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
let { session, contextGroup, Protocol } = InspectorTest.start(
"Test private class methods"
);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
set #foo(val) {}
constructor() {
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:10: TypeError: '#foo' was defined without a getter
*%(basename)s:8: TypeError: '#foo' was defined without a getter
this.#foo++;
^
TypeError: '#foo' was defined without a getter
at new C (*%(basename)s:10:5)
at *%(basename)s:14:1
at new C (*%(basename)s:8:5)
at *%(basename)s:12:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
set #a(val) {}
setA(obj, val) { obj.#a = val; }
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:9: TypeError: Object must be an instance of class C
*%(basename)s:7: TypeError: Object must be an instance of class C
setA(obj, val) { obj.#a = val; }
^
TypeError: Object must be an instance of class C
at C.setA (*%(basename)s:9:24)
at new C (*%(basename)s:15:10)
at *%(basename)s:19:1
\ No newline at end of file
at C.setA (*%(basename)s:7:24)
at new C (*%(basename)s:13:10)
at *%(basename)s:17:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
set #a(val) {}
constructor() {
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:10: TypeError: '#a' was defined without a getter
*%(basename)s:8: TypeError: '#a' was defined without a getter
const a = this.#a;
^
TypeError: '#a' was defined without a getter
at new C (*%(basename)s:10:15)
at *%(basename)s:13:1
at new C (*%(basename)s:8:15)
at *%(basename)s:11:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
get #a() {}
constructor() {
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:10: TypeError: '#a' was defined without a setter
*%(basename)s:8: TypeError: '#a' was defined without a setter
this.#a = 1;
^
TypeError: '#a' was defined without a setter
at new C (*%(basename)s:10:13)
at *%(basename)s:13:1
at new C (*%(basename)s:8:13)
at *%(basename)s:11:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
get #foo() {}
constructor() {
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:10: TypeError: '#foo' was defined without a setter
*%(basename)s:8: TypeError: '#foo' was defined without a setter
this.#foo++;
^
TypeError: '#foo' was defined without a setter
at new C (*%(basename)s:10:5)
at *%(basename)s:14:1
at new C (*%(basename)s:8:5)
at *%(basename)s:12:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
get #a() {}
getA(obj) { return obj.#a; }
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:9: TypeError: Object must be an instance of class C
*%(basename)s:7: TypeError: Object must be an instance of class C
getA(obj) { return obj.#a; }
^
TypeError: Object must be an instance of class C
at C.getA (*%(basename)s:9:26)
at new C (*%(basename)s:15:10)
at *%(basename)s:19:1
at C.getA (*%(basename)s:7:26)
at new C (*%(basename)s:13:10)
at *%(basename)s:17:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
get #a() {}
constructor() {
......
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:10: TypeError: '#a' was defined without a setter
*%(basename)s:8: TypeError: '#a' was defined without a setter
this.#a = 1;
^
TypeError: '#a' was defined without a setter
at new C (*%(basename)s:10:13)
at *%(basename)s:13:1
\ No newline at end of file
at new C (*%(basename)s:8:13)
at *%(basename)s:11:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
const C = class {
#a() {}
test(obj) { obj.#a(); }
......
# Copyright 2020 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:9: TypeError: Object must be an instance of class anonymous
*%(basename)s:7: TypeError: Object must be an instance of class anonymous
test(obj) { obj.#a(); }
^
TypeError: Object must be an instance of class anonymous
at C.test (*%(basename)s:9:19)
at *%(basename)s:11:9
at C.test (*%(basename)s:7:19)
at *%(basename)s:9:9
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
#a() {}
test(obj) { obj.#a(); }
......
# Copyright 2020 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:9: TypeError: Object must be an instance of class C
*%(basename)s:7: TypeError: Object must be an instance of class C
test(obj) { obj.#a(); }
^
TypeError: Object must be an instance of class C
at C.test (*%(basename)s:9:19)
at *%(basename)s:11:9
\ No newline at end of file
at C.test (*%(basename)s:7:19)
at *%(basename)s:9:9
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
class C {
#a() {}
constructor() {
......
*%(basename)s:10: TypeError: Private method '#a' is not writable
*%(basename)s:8: TypeError: Private method '#a' is not writable
this.#a = 1;
^
TypeError: Private method '#a' is not writable
at new C (*%(basename)s:10:13)
at *%(basename)s:13:1
\ No newline at end of file
at new C (*%(basename)s:8:13)
at *%(basename)s:11:1
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
"use strict";
// Complementary private accessors.
......
......@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
// This tests that empty inner classes don't assign private brands of outer
// classes in their instances after scope chain deserialization.
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
"use strict";
// Basic private method test
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-private-methods
"use strict";
// Static private methods
......
......@@ -57,8 +57,6 @@ FEATURE_FLAGS = {
'regexp-match-indices': '--harmony-regexp-match-indices',
# https://github.com/tc39/test262/pull/2395
'regexp-named-groups': '--harmony-regexp-match-indices',
'class-methods-private': '--harmony-private-methods',
'class-static-methods-private': '--harmony-private-methods',
'logical-assignment-operators': '--harmony-logical-assignment',
'Atomics.waitAsync': '--harmony-atomics-waitasync',
}
......
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