2017-01-24 05:00:35 +00:00
|
|
|
// Copyright 2017 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.
|
|
|
|
|
2017-10-05 13:38:38 +00:00
|
|
|
// Flags: --noexpose-wasm --validate-asm --allow-natives-syntax
|
2017-01-24 05:00:35 +00:00
|
|
|
|
2020-01-10 17:20:50 +00:00
|
|
|
// NOTE: This is in its own file because it calls %DisallowWasmCodegen, which
|
|
|
|
// messes with the isolate's state.
|
2017-01-24 05:00:35 +00:00
|
|
|
(function testAsmWithWasmOff() {
|
2020-01-10 17:20:50 +00:00
|
|
|
%DisallowWasmCodegen(true);
|
2017-01-24 05:00:35 +00:00
|
|
|
function Module() {
|
|
|
|
'use asm';
|
|
|
|
function foo() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return {foo: foo};
|
|
|
|
}
|
|
|
|
Module();
|
2017-02-28 10:00:46 +00:00
|
|
|
assertTrue(%IsAsmWasmCode(Module));
|
2017-01-24 05:00:35 +00:00
|
|
|
})();
|