v8/test/mjsunit/asm/regress-719866.js
Michael Starzinger 15691758b3 [asm.js] Fix associativity of multiplicative expressions.
R=clemensh@chromium.org
TEST=mjsunit/asm/regress-719866
BUG=chromium:719866

Change-Id: I6cc9f222769aa036275654286c9c6271ef2d1334
Reviewed-on: https://chromium-review.googlesource.com/520945
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45660}
2017-06-01 13:03:03 +00:00

19 lines
394 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.
function Module(stdlib) {
"use asm";
function f(a,b,c) {
a = +a;
b = +b;
c = +c;
var r = 0.0;
r = a / b * c;
return +r;
}
return { f:f }
}
var m = Module(this);
assertEquals(16, m.f(32, 4, 2));