| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 055777af77db2118a08e06d68cb7e798535dc4e6..48167faa6e74c7aecea54e5065d66045244e5a88 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -32,6 +32,7 @@
|
| #include "src/snapshot/code-serializer.h"
|
| #include "src/typing-asm.h"
|
| #include "src/vm-state-inl.h"
|
| +#include "src/wasm/wasm-js.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -472,14 +473,11 @@ 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());
|
| + Handle<FixedArray> wasm_data;
|
| + if (WasmJs::ConvertAsmToWasm(info->parse_info(), &wasm_data)) {
|
| + info->shared_info()->set_asm_wasm_data(*wasm_data);
|
| + info->SetCode(info->isolate()->builtins()->CompileAsmJs());
|
| + return true;
|
| }
|
| }
|
| if (FLAG_ignition && UseIgnition(info)) {
|
| @@ -728,6 +726,10 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
|
| Isolate* isolate = function->GetIsolate();
|
| Handle<SharedFunctionInfo> shared(function->shared(), isolate);
|
|
|
| + if (shared->HasAsmWasmData()) {
|
| + return MaybeHandle<Code>();
|
| + }
|
| +
|
| Handle<Code> cached_code;
|
| if (GetCodeFromOptimizedCodeMap(function, osr_ast_id)
|
| .ToHandle(&cached_code)) {
|
|
|