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

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: Fix 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index af71a313fd4b573318df2360fbdd201c05d70386..633859d384d140b57adcc5d72e4e16d18b11751a 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()) {
@@ -1432,7 +1433,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') | src/runtime/runtime-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698