Commit fb9ad89f authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpreter]: Add ignition blacklist to mjsunit.status and test262.status.

Adds a blacklist of tests which are currently unsupported or broken in Ignition to
the mjsunit and test262 test status.

Also removes --ignition-script-filter flag, and adds a
--ignition_fallback_on_eval_and_catch flag which fallsback to fullcodegen for
functions which call eval or contain a catch block.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1420963009

Cr-Commit-Position: refs/heads/master@{#31864}
parent 7b556cd2
......@@ -691,24 +691,6 @@ static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
}
// Checks whether top level functions should be passed by {raw_filter}.
// TODO(rmcilroy): Remove filtering once ignition can handle test262 harness.
static bool TopLevelFunctionPassesFilter(const char* raw_filter) {
Vector<const char> filter = CStrVector(raw_filter);
return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*');
}
// Checks whether the passed {raw_filter} is a prefix of the given scripts name.
// TODO(rmcilroy): Remove filtering once ignition can handle test262 harness.
static bool ScriptPassesFilter(const char* raw_filter, Handle<Script> script) {
Vector<const char> filter = CStrVector(raw_filter);
if (!script->name()->IsString()) return filter.length() == 0;
String* name = String::cast(script->name());
return name->IsUtf8EqualTo(filter, true);
}
static bool CompileUnoptimizedCode(CompilationInfo* info) {
DCHECK(AllowCompilation::IsAllowed(info->isolate()));
if (!Compiler::Analyze(info->parse_info()) ||
......@@ -721,15 +703,37 @@ static bool CompileUnoptimizedCode(CompilationInfo* info) {
}
// TODO(rmcilroy): Remove this temporary work-around when ignition supports
// catch and eval.
static bool IgnitionShouldFallbackToFullCodeGen(Scope* scope) {
if (!FLAG_ignition_fallback_on_eval_and_catch) return false;
if (scope->is_eval_scope() || scope->is_catch_scope() ||
scope->calls_eval()) {
return true;
}
for (auto inner_scope : *scope->inner_scopes()) {
if (IgnitionShouldFallbackToFullCodeGen(inner_scope)) return true;
}
return false;
}
static bool GenerateBytecode(CompilationInfo* info) {
DCHECK(AllowCompilation::IsAllowed(info->isolate()));
if (!Compiler::Analyze(info->parse_info()) ||
!interpreter::Interpreter::MakeBytecode(info)) {
bool success = false;
if (Compiler::Analyze(info->parse_info())) {
if (IgnitionShouldFallbackToFullCodeGen(info->scope())) {
success = FullCodeGenerator::MakeCode(info);
} else {
success = interpreter::Interpreter::MakeBytecode(info);
}
}
if (!success) {
Isolate* isolate = info->isolate();
if (!isolate->has_pending_exception()) isolate->StackOverflow();
return false;
}
return true;
return success;
}
......@@ -747,8 +751,7 @@ MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon(
MaybeDisableOptimization(shared, lit->dont_optimize_reason());
if (FLAG_ignition && !shared->HasBuiltinFunctionId() &&
info->closure()->PassesFilter(FLAG_ignition_filter) &&
ScriptPassesFilter(FLAG_ignition_script_filter, info->script())) {
info->closure()->PassesFilter(FLAG_ignition_filter)) {
// Compile bytecode for the interpreter.
if (!GenerateBytecode(info)) return MaybeHandle<Code>();
} else {
......@@ -1173,6 +1176,13 @@ void Compiler::CompileForLiveEdit(Handle<Script> script) {
}
// Checks whether top level functions should be passed by {raw_filter}.
static bool TopLevelFunctionPassesFilter(const char* raw_filter) {
Vector<const char> filter = CStrVector(raw_filter);
return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*');
}
static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
Isolate* isolate = info->isolate();
PostponeInterruptsScope postpone(isolate);
......@@ -1236,8 +1246,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
HistogramTimerScope timer(rate);
// Compile the code.
if (FLAG_ignition && TopLevelFunctionPassesFilter(FLAG_ignition_filter) &&
ScriptPassesFilter(FLAG_ignition_script_filter, script)) {
if (FLAG_ignition && TopLevelFunctionPassesFilter(FLAG_ignition_filter)) {
if (!GenerateBytecode(info)) {
return Handle<SharedFunctionInfo>::null();
}
......
......@@ -290,10 +290,11 @@ DEFINE_BOOL(string_slices, true, "use string slices")
DEFINE_BOOL(ignition, false, "use ignition interpreter")
DEFINE_IMPLICATION(ignition, vector_stores)
DEFINE_STRING(ignition_filter, "~~", "filter for ignition interpreter")
DEFINE_STRING(ignition_script_filter, "",
"script filter for ignition interpreter")
DEFINE_BOOL(ignition_fake_try_catch, false,
"enable fake try-catch-finally blocks in ignition for testing")
DEFINE_BOOL(ignition_fallback_on_eval_and_catch, false,
"fallback to full-codegen for functions which contain eval, catch"
"and es6 blocks")
DEFINE_BOOL(print_bytecode, false,
"print bytecode generated by ignition interpreter")
DEFINE_BOOL(trace_ignition_codegen, false,
......
This diff is collapsed.
......@@ -670,4 +670,103 @@
'built-ins/encodeURI/S15.1.3.3_A2.3_T1': [SKIP],
'built-ins/encodeURIComponent/S15.1.3.4_A2.3_T1': [SKIP],
}], # 'arch == arm or arch == mipsel or arch == mips or arch == arm64'
['ignition == True ', {
'annexB/B.2.3.*': [SKIP],
'built-ins/Array/prototype/reduce/*': [SKIP],
'built-ins/Array/prototype/reduceRight/*': [SKIP],
'built-ins/decodeURI*': [SKIP],
'built-ins/GeneratorPrototype/*': [SKIP],
'built-ins/Map/*': [SKIP],
'built-ins/MapIteratorPrototype/*': [SKIP],
'built-ins/Set/*': [SKIP],
'built-ins/SetIteratorPrototype/*': [SKIP],
'built-ins/WeakMap/*': [SKIP],
'built-ins/WeakSet/*': [SKIP],
'language/computed-property-names/class/*': [SKIP],
'language/computed-property-names/to-name-side-effects/*': [SKIP],
'language/directive-prologue/*': [SKIP],
'language/expressions/arrow-function/*': [SKIP],
'language/expressions/class/*': [SKIP],
'language/expressions/generators/*': [SKIP],
'language/expressions/object/method-definition/yield*': [SKIP],
'language/expressions/object/method-definition/generator*': [SKIP],
'language/expressions/yield/*': [SKIP],
'language/function-code/*': [SKIP],
'language/statements/class/*': [SKIP],
'language/statements/const/*': [SKIP],
'language/statements/for-in/const*': [SKIP],
'language/statements/for-in/let*': [SKIP],
'language/statements/for-of/*': [SKIP],
'language/statements/generators/*': [SKIP],
'language/statements/let/*': [SKIP],
'language/statements/try/*': [SKIP],
'language/statements/with/*': [SKIP],
'built-ins/Array/prototype/concat/Array.prototype.concat_non-array': [SKIP],
'built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1': [SKIP],
'built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2': [SKIP],
'built-ins/Array/prototype/toString/S15.4.4.2_A1_T2': [SKIP],
'built-ins/Array/prototype/toString/S15.4.4.2_A1_T3': [SKIP],
'built-ins/Array/prototype/toString/S15.4.4.2_A1_T4': [SKIP],
'built-ins/Date/15.9.1.15-1': [SKIP],
'built-ins/Date/prototype/toISOString/15.9.5.43-0-13': [SKIP],
'built-ins/Object/defineProperty/15.2.3.6-4-625gs': [SKIP],
'built-ins/Object/prototype/hasOwnProperty/S15.2.4.5_A12': [SKIP],
'built-ins/Object/prototype/isPrototypeOf/S15.2.4.6_A12': [SKIP],
'built-ins/Object/prototype/propertyIsEnumerable/S15.2.4.7_A12': [SKIP],
'built-ins/Object/prototype/toLocaleString/S15.2.4.3_A12': [SKIP],
'built-ins/Object/prototype/toString/15.2.4.2-1-1': [SKIP],
'built-ins/Object/prototype/toString/15.2.4.2-1-2': [SKIP],
'built-ins/Object/prototype/toString/S15.2.4.2_A12': [SKIP],
'built-ins/Object/prototype/valueOf/S15.2.4.4_A12': [SKIP],
'built-ins/Object/prototype/valueOf/S15.2.4.4_A14': [SKIP],
'built-ins/Object/prototype/valueOf/S15.2.4.4_A15': [SKIP],
'built-ins/Promise/all/ctx-ctor': [SKIP],
'built-ins/Promise/race/ctx-ctor': [SKIP],
'built-ins/Promise/reject/ctx-ctor': [SKIP],
'built-ins/Promise/resolve/ctx-ctor': [SKIP],
'built-ins/String/prototype/codePointAt/this-is-undefined-throws': [SKIP],
'built-ins/String/prototype/concat/S15.5.4.6_A2': [SKIP],
'built-ins/String/prototype/endsWith/this-is-undefined-throws': [SKIP],
'built-ins/String/prototype/includes/this-is-undefined-throws': [SKIP],
'built-ins/String/prototype/repeat/this-is-undefined-throws': [SKIP],
'built-ins/String/prototype/startsWith/this-is-undefined-throws': [SKIP],
'built-ins/String/prototype/trim/15.5.4.20-1-1': [SKIP],
'built-ins/String/S15.5.5.1_A4_T1': [SKIP],
'language/block-scope/leave/x-after-break-to-label': [SKIP],
'language/computed-property-names/object/accessor/getter-super': [SKIP],
'language/computed-property-names/object/accessor/setter-super': [SKIP],
'language/computed-property-names/object/method/super': [SKIP],
'language/expressions/delete/11.4.1-4.a-5': [SKIP],
'language/expressions/delete/11.4.1-4.a-6': [SKIP],
'language/expressions/object/method-definition/name-super-prop-body': [SKIP],
'language/expressions/object/prop-def-id-eval-error': [SKIP],
'language/expressions/tagged-template/call-expression-context-no-strict': [SKIP],
'language/expressions/tagged-template/call-expression-context-strict': [SKIP],
'language/expressions/template-literal/evaluation-order': [SKIP],
'language/expressions/this/11.1.1-1gs': [SKIP],
'language/identifier-resolution/S10.2.2_A1_T5': [SKIP],
'language/identifier-resolution/S10.2.2_A1_T6': [SKIP],
'language/identifier-resolution/S10.2.2_A1_T7': [SKIP],
'language/identifier-resolution/S10.2.2_A1_T8': [SKIP],
'language/identifier-resolution/S10.2.2_A1_T9': [SKIP],
'language/object-literal/concise-generator': [SKIP],
'language/object-literal/getter': [SKIP],
'language/object-literal/method': [SKIP],
'language/object-literal/setter': [SKIP],
'language/rest-parameters/with-new-target': [SKIP],
'language/statements/do-while/S12.6.1_A4_T5': [SKIP],
'language/statements/function/S13.2.2_A18_T2': [SKIP],
'language/statements/function/S13.2.2_A19_T1': [SKIP],
'language/statements/function/S13.2.2_A19_T2': [SKIP],
'language/statements/function/S13.2.2_A19_T3': [SKIP],
'language/statements/function/S13.2.2_A19_T4': [SKIP],
'language/statements/function/S13.2.2_A19_T5': [SKIP],
'language/statements/function/S13.2.2_A19_T6': [SKIP],
'language/statements/function/S13.2.2_A19_T7': [SKIP],
'language/statements/function/S13.2.2_A19_T8': [SKIP],
'language/statements/while/S12.6.2_A4_T5': [SKIP],
}], # ignition == True
]
......@@ -103,7 +103,6 @@ class Test262TestSuite(testsuite.TestSuite):
self.harness = [os.path.join(self.harnesspath, f)
for f in TEST_262_HARNESS_FILES]
self.harness += [os.path.join(self.root, "harness-adapt.js")]
self.ignition_script_filter = "--ignition-script-filter=" + self.testroot
self.ParseTestRecord = None
def ListTests(self, context):
......@@ -125,13 +124,7 @@ class Test262TestSuite(testsuite.TestSuite):
return tests
def GetFlagsForTestCase(self, testcase, context):
# TODO(rmcilroy) Remove ignition filter modification once ignition can
# support the test262 test harness code.
flags = testcase.flags
if '--ignition' in flags:
flags += [self.ignition_script_filter, "--ignition-fake-try-catch"]
return (flags + context.mode_flags + self.harness +
return (testcase.flags + context.mode_flags + self.harness +
self.GetIncludesForTest(testcase) + ["--harmony"] +
[os.path.join(self.testroot, testcase.path + ".js")])
......
......@@ -388,6 +388,7 @@ def Execute(arch, mode, args, options, suites, workspace):
"asan": options.asan,
"deopt_fuzzer": True,
"gc_stress": False,
"ignition": False,
"isolates": options.isolates,
"mode": mode,
"no_i18n": False,
......
......@@ -235,6 +235,8 @@ def BuildOptions():
result.add_option("--extra-flags",
help="Additional flags to pass to each test command",
default="")
result.add_option("--ignition", help="Skip tests which don't run in ignition",
default=False, action="store_true")
result.add_option("--isolates", help="Whether to test isolates",
default=False, action="store_true")
result.add_option("-j", help="The number of parallel tasks to run",
......@@ -681,6 +683,7 @@ def Execute(arch, mode, args, options, suites):
"asan": options.asan,
"deopt_fuzzer": False,
"gc_stress": options.gc_stress,
"ignition": options.ignition,
"isolates": options.isolates,
"mode": MODES[mode]["status_mode"],
"no_i18n": options.no_i18n,
......
......@@ -41,7 +41,9 @@ ALL_VARIANT_FLAGS = {
"turbofan": [["--turbo"]],
"turbofan_opt": [["--turbo", "--always-opt"]],
"nocrankshaft": [["--nocrankshaft"]],
"ignition": [["--ignition", "--ignition-filter=*"]],
"ignition": [["--ignition", "--ignition-filter=*",
"--ignition-fake-try-catch",
"--ignition-fallback-on-eval-and-catch"]],
}
# FAST_VARIANTS implies no --always-opt.
......@@ -50,7 +52,9 @@ FAST_VARIANT_FLAGS = {
"stress": [["--stress-opt"]],
"turbofan": [["--turbo"]],
"nocrankshaft": [["--nocrankshaft"]],
"ignition": [["--ignition", "--ignition-filter=*"]],
"ignition": [["--ignition", "--ignition-filter=*",
"--ignition-fake-try-catch",
"--ignition-fallback-on-eval-and-catch"]],
}
ALL_VARIANTS = set(["default", "stress", "turbofan", "turbofan_opt",
......
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