e5f5ac7d2b
Make use of %IsAsmWasmCode in place of Wasm.instantiateModuleFromAsm, in order to reduce the surface area of the Wasm object, and to focus on testing asm.js coming in via the parser. Ignore extra CONST_LEGACY assignment introduced by the parser when modules have the form: (function Foo(a, b, c) {..}); This requires both a validator and AsmWasmBuilder change. Move stdlib use collection to import time, to reject modules that import a function, even if not used. BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203 LOG=N R=jpp@chromium.org,titzer@chromium.org Review-Url: https://codereview.chromium.org/2264913002 Cr-Commit-Position: refs/heads/master@{#38806}
26 lines
578 B
JavaScript
26 lines
578 B
JavaScript
// 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: --allow-natives-syntax --validate-asm
|
|
|
|
function __f_7() {
|
|
%DeoptimizeFunction(__f_5);
|
|
}
|
|
function __f_8(global, env) {
|
|
"use asm";
|
|
var __f_7 = env.__f_7;
|
|
function __f_9(i4, i5) {
|
|
i4 = i4 | 0;
|
|
i5 = i5 | 0;
|
|
__f_7();
|
|
}
|
|
return {'__f_9': __f_9}
|
|
}
|
|
function __f_5() {
|
|
var __v_5 = __f_8({}, {'__f_7': __f_7});
|
|
assertTrue(%IsAsmWasmCode(__f_8));
|
|
__v_5.__f_9(0, 0, 0);
|
|
}
|
|
__f_5();
|