Commit e9435eb9 authored by adamk's avatar adamk Committed by Commit bot

Remove broken source/code caching support for Modules in d8

The busted logic caused us to go down the SCRIPT path internally,
causing us to fail the test262 tests that attempt to induce parse
errors at the top level.

R=littledan@chromium.org
BUG=v8:4985

Review-Url: https://codereview.chromium.org/2008743002
Cr-Commit-Position: refs/heads/master@{#36563}
parent 7245dabd
......@@ -338,7 +338,9 @@ MaybeLocal<Script> Shell::CompileString(
ScriptCompiler::CompileOptions compile_options, SourceType source_type) {
Local<Context> context(isolate->GetCurrentContext());
ScriptOrigin origin(name);
if (compile_options == ScriptCompiler::kNoCompileOptions) {
// TODO(adamk): Make use of compile options for Modules.
if (compile_options == ScriptCompiler::kNoCompileOptions ||
source_type == MODULE) {
ScriptCompiler::Source script_source(source, origin);
return source_type == SCRIPT
? ScriptCompiler::Compile(context, &script_source,
......@@ -358,11 +360,9 @@ MaybeLocal<Script> Shell::CompileString(
DCHECK(false); // A new compile option?
}
if (data == NULL) compile_options = ScriptCompiler::kNoCompileOptions;
DCHECK_EQ(SCRIPT, source_type);
MaybeLocal<Script> result =
source_type == SCRIPT
? ScriptCompiler::Compile(context, &cached_source, compile_options)
: ScriptCompiler::CompileModule(context, &cached_source,
compile_options);
ScriptCompiler::Compile(context, &cached_source, compile_options);
CHECK(data == NULL || !data->rejected);
return result;
}
......
......@@ -298,10 +298,6 @@
'built-ins/Function/prototype/toString/setter-object': [FAIL],
'built-ins/Function/prototype/toString/unicode': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=4985
'language/reserved-words/await-module': [SKIP],
'language/module-code/strict-mode': [SKIP],
######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation
......
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