Commit cc1249b7 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[compiler] Bytecode preparation fails for asm.js modules.

This handles the case where preparation of bytecode might fail inside
Compiler::EnsureBytecode due to the underlying function being a fully
validated asm.js module. We simply bailout of bytecode preparation.

R=bradnelson@chromium.org
TEST=mjsunit/regress/regress-crbug-644111
BUG=chromium:644111

Review-Url: https://codereview.chromium.org/2309853002
Cr-Commit-Position: refs/heads/master@{#39187}
parent 8af781ea
......@@ -1336,6 +1336,7 @@ bool Compiler::EnsureBytecode(CompilationInfo* info) {
if (!info->shared_info()->HasBytecodeArray()) {
Handle<Code> original_code(info->shared_info()->code());
if (GetUnoptimizedCode(info).is_null()) return false;
if (info->shared_info()->HasAsmWasmData()) return false;
DCHECK(info->shared_info()->is_compiled());
if (original_code->kind() == Code::FUNCTION) {
// Generating bytecode will install the {InterpreterEntryTrampoline} as
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --ignition-staging --turbo --validate-asm --always-opt
function Module() {
"use asm";
return {};
}
var m = Module();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment