0f71a24f3a
R=jkummerow@chromium.org BUG=351624 LOG=N Review URL: https://codereview.chromium.org/199013002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
24 lines
571 B
JavaScript
24 lines
571 B
JavaScript
// Copyright 2014 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
|
|
|
|
var big = 1e10;
|
|
var backup = new Float64Array(1);
|
|
|
|
function mult0(val){
|
|
var prod = val * big;
|
|
backup[0] = prod;
|
|
var rounded = Math.round(prod);
|
|
assertEquals(prod, backup[0]);
|
|
return rounded;
|
|
}
|
|
|
|
var count = 5;
|
|
for (var i = 0; i < count; i++) {
|
|
if (i == count - 1) %OptimizeFunctionOnNextCall(mult0);
|
|
var result = mult0(-1);
|
|
assertEquals(result, -big);
|
|
}
|