d1e9b884ae
This fixes how arguments of a call to {fround} are being parsed. It now accepts a single "AssignmentExpression" only instead of an "Expression" which could potentially be a whole comma-separated list of expressions. R=clemensh@chromium.org TEST=mjsunit/regress/regress-crbug-1006592 BUG=chromium:1006592 Change-Id: Ifaf0c2b048e4ec18429cc6039c0e7dcdecc1d0bb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1815255 Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#63926}
22 lines
489 B
JavaScript
22 lines
489 B
JavaScript
// Copyright 2019 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: --allow-natives-syntax
|
|
|
|
function Module(stdlib) {
|
|
"use asm";
|
|
var fround = stdlib.Math.fround;
|
|
function f(a, b) {
|
|
a = +a;
|
|
b = +b;
|
|
return fround(a, b);
|
|
}
|
|
return { f: f };
|
|
}
|
|
|
|
var m = Module(this);
|
|
assertEquals(23, m.f(23));
|
|
assertEquals(42, m.f(42, 65));
|
|
assertFalse(%IsAsmWasmCode(Module));
|