2017-03-21 10:16:54 +01: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.
|
|
|
|
|
2025-04-29 08:03:15 +02:00
|
|
|
// Flags: --validate-asm --allow-natives-syntax
|
2017-03-21 10:16:54 +01:00
|
|
|
|
2020-03-05 10:49:19 -08:00
|
|
|
// NOTE: This is in its own file because it calls %DisallowWasmCodegen, which
|
|
|
|
// messes with the isolate's state.
|
2017-03-21 10:16:54 +01:00
|
|
|
(function testAsmWithWasmOff() {
|
2020-03-05 10:49:19 -08:00
|
|
|
%DisallowWasmCodegen(true);
|
2017-03-21 10:16:54 +01:00
|
|
|
function Module() {
|
|
|
|
'use asm';
|
|
|
|
function foo() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return {foo: foo};
|
|
|
|
}
|
|
|
|
Module();
|
2017-06-06 10:28:14 +02:00
|
|
|
assertTrue(%IsAsmWasmCode(Module));
|
2017-03-21 10:16:54 +01:00
|
|
|
})();
|