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

Unified Diff: src/compiler.cc

Issue 2229723002: [wasm] Support validation of asm.js modules with != 3 args. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips and more Created 4 years, 4 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/x87/builtins-x87.cc ('k') | src/objects.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 54ea359c6598631674cb232499c4defd9409ba21..4a7e2750216d18a6da91a921627edfd3bbd7a8b1 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -476,7 +476,8 @@ int CodeAndMetadataSize(CompilationInfo* info) {
bool GenerateUnoptimizedCode(CompilationInfo* info) {
bool success;
EnsureFeedbackMetadata(info);
- if (FLAG_validate_asm && info->scope()->asm_module()) {
+ if (FLAG_validate_asm && info->scope()->asm_module() &&
+ !info->shared_info()->is_asm_wasm_broken()) {
MaybeHandle<FixedArray> wasm_data;
wasm_data = AsmJs::ConvertAsmToWasm(info->parse_info());
if (!wasm_data.is_null()) {
@@ -1436,7 +1437,9 @@ bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
// TODO(4280): For now we play it safe and remove the bytecode array when we
// switch to baseline code. We might consider keeping around the bytecode so
// that it can be used as the "source of truth" eventually.
- if (!FLAG_ignition_preserve_bytecode) shared->ClearBytecodeArray();
+ if (shared->HasBytecodeArray()) {
+ if (!FLAG_ignition_preserve_bytecode) shared->ClearBytecodeArray();
+ }
// The scope info might not have been set if a lazily compiled
// function is inlined before being called for the first time.
« no previous file with comments | « src/builtins/x87/builtins-x87.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698