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
|
|
|
|
2017-10-05 13:38:38 +00:00
|
|
|
// NOTE: This is in its own file because it calls %DisallowCodegenFromStrings,
|
2017-01-24 05:00:35 +00:00
|
|
|
// which messes with the isolate's state.
|
|
|
|
(function testAsmWithWasmOff() {
|
2017-10-05 13:38:38 +00:00
|
|
|
%DisallowCodegenFromStrings(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
|
|
|
})();
|