v8/test/mjsunit/regress/regress-crbug-1006592.js
Michael Starzinger d1e9b884ae [asm.js] Fix parsing of float coercion arguments.
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}
2019-09-23 12:26:26 +00:00

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));