afbfddd75e
R=clemensh@chromium.org Bug: v8:6756 Change-Id: I3b25b89f3ead5c856be5c7ba3c7c236e595ce8de Reviewed-on: https://chromium-review.googlesource.com/695524 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#48333}
21 lines
587 B
JavaScript
21 lines
587 B
JavaScript
// 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: --noexpose-wasm --validate-asm --allow-natives-syntax
|
|
|
|
// NOTE: This is in its own file because it calls %DisallowCodegenFromStrings,
|
|
// which messes with the isolate's state.
|
|
(function testAsmWithWasmOff() {
|
|
%DisallowCodegenFromStrings(true);
|
|
function Module() {
|
|
'use asm';
|
|
function foo() {
|
|
return 0;
|
|
}
|
|
return {foo: foo};
|
|
}
|
|
Module();
|
|
assertTrue(%IsAsmWasmCode(Module));
|
|
})();
|