Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 55880814e81ca14aa94c8c00eccc2151c00d6e64..72cdc038ebfdb39e96573e6f49433dd84a292bc7 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -6,6 +6,8 @@ |
#include <algorithm> |
+#include "src/asmjs/asm-js.h" |
+#include "src/asmjs/typing-asm.h" |
#include "src/ast/ast-numbering.h" |
#include "src/ast/prettyprinter.h" |
#include "src/ast/scopeinfo.h" |
@@ -30,7 +32,6 @@ |
#include "src/parsing/scanner-character-streams.h" |
#include "src/runtime-profiler.h" |
#include "src/snapshot/code-serializer.h" |
-#include "src/typing-asm.h" |
#include "src/vm-state-inl.h" |
namespace v8 { |
@@ -477,14 +478,12 @@ bool GenerateUnoptimizedCode(CompilationInfo* info) { |
bool success; |
EnsureFeedbackMetadata(info); |
if (FLAG_validate_asm && info->scope()->asm_module()) { |
- AsmTyper typer(info->isolate(), info->zone(), *(info->script()), |
- info->literal()); |
- if (FLAG_enable_simd_asmjs) { |
- typer.set_allow_simd(true); |
- } |
- if (!typer.Validate()) { |
- DCHECK(!info->isolate()->has_pending_exception()); |
- PrintF("Validation of asm.js module failed: %s", typer.error_message()); |
+ MaybeHandle<FixedArray> wasm_data; |
+ wasm_data = AsmJs::ConvertAsmToWasm(info->parse_info()); |
+ if (!wasm_data.is_null()) { |
+ info->shared_info()->set_asm_wasm_data(*wasm_data.ToHandleChecked()); |
+ info->SetCode(info->isolate()->builtins()->InstantiateAsmJs()); |
+ return true; |
} |
} |
if (FLAG_ignition && UseIgnition(info)) { |