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