summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/wasm/asm-with-wasm-off.js
blob: 52d4098be01ca63442493d14ca263a91fafd453a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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.

// Flags: --validate-asm --allow-natives-syntax

// NOTE: This is in it's own file because it calls %DisallowCodegenFromStrings,
// which messes with the isolate's state.
(function testAsmWithWasmOff() {
  % DisallowCodegenFromStrings();
  function Module() {
    'use asm';
    function foo() {
      return 0;
    }
    return {foo: foo};
  }
  Module();
  assertTrue(% IsAsmWasmCode(Module));
})();