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

Unified Diff: src/compiler.cc

Issue 1972593002: [wasm] Add flag to validate asm.js modules. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Turn off flag. Created 4 years, 7 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/ast/scopes.cc ('k') | src/flag-definitions.h » ('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 6885b55e31e32aa71859b39f334bf6db83f8fc26..fc9e0a66afca9384e4f31a9e80fff39a7b422873 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -30,6 +30,7 @@
#include "src/profiler/cpu-profiler.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 {
@@ -464,6 +465,17 @@ int CodeAndMetadataSize(CompilationInfo* info) {
bool GenerateUnoptimizedCode(CompilationInfo* info) {
bool success;
EnsureFeedbackVector(info);
bradnelson 2016/05/12 09:03:59 I've been thrashing about a bit attempting to craf
+ 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());
bradnelson 2016/05/12 09:03:59 My intention was that in the failure case the Typi
+ PrintF("Validation of asm.js module failed: %s", typer.error_message());
+ }
+ }
if (FLAG_ignition && UseIgnition(info)) {
success = interpreter::Interpreter::MakeBytecode(info);
} else {
« no previous file with comments | « src/ast/scopes.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698