Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: src/compiler.cc

Issue 2057403003: Hooking up asm-wasm conversion. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « src/builtins.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698