ee498c1c16
If "use asm" is used inside a "function*" or async function, it should bail out. Drive-by: Minor cleanup in {Runtime_InstantiateAsmJs}. R=ecmziegler@chromium.org Bug: chromium:1065852 Change-Id: Ice48126b803a30c4b4ff7b5ae22df85a3f36198a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2126920 Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66939}
15 lines
332 B
JavaScript
15 lines
332 B
JavaScript
// Copyright 2020 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.
|
|
|
|
function* asm() {
|
|
"use asm";
|
|
function x(v) {
|
|
v = v | 0;
|
|
}
|
|
return x;
|
|
}
|
|
|
|
// 'function*' creates a generator with an implicit 'next' method.
|
|
asm().next();
|