diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index 8313bfb4fa..8d0d1a5dc7 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -273,6 +273,7 @@ 'wasm/asm-wasm-stdlib': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el] or ignition == True', SKIP]], 'wasm/asm-wasm-literals': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el] or ignition == True', SKIP]], 'wasm/asm-wasm-copy': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el]', SKIP]], + 'wasm/asm-wasm-deopt': [PASS, ['arch in [arm, arm64, mips, mipsel, mips64, mips64el]', SKIP]], # TODO(branelson): Figure out why ignition + asm->wasm fails embenchen. 'wasm/embenchen/*': [PASS, ['ignition == True', SKIP]], diff --git a/test/mjsunit/wasm/asm-wasm-deopt.js b/test/mjsunit/wasm/asm-wasm-deopt.js new file mode 100644 index 0000000000..4b16b71239 --- /dev/null +++ b/test/mjsunit/wasm/asm-wasm-deopt.js @@ -0,0 +1,29 @@ +// 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: --expose-wasm +// Flags: --allow-natives-syntax + +(function TestDeoptimizeArgMismatch() { + function deopt() { + %DeoptimizeFunction(test); + } + function Module(global, env, buffer) { + "use asm"; + var deopt = env.deopt; + function _main(i4, i5) { + i4 = i4 | 0; + i5 = i5 | 0; + deopt(); + return i5 | 0; + } + return {'_main': _main} + } + function test() { + var wasm = Wasm.instantiateModuleFromAsm( + Module.toString(), {'deopt': deopt}); + wasm._main(0, 0, 0); + } + test(); +})();