I'll clean up the test a bit and commit.
http://codereview.chromium.org/7514040/diff/8001/test/mjsunit/math-floor.js File test/mjsunit/math-floor.js (right): http://codereview.chromium.org/7514040/diff/8001/test/mjsunit/math-floor.js#newcode55 test/mjsunit/math-floor.js:55: // handled by other ops that take unboxed doubles. See cr7514040. No need to cross reference the code review in the test. The casual reader doesn't know what it is, and normally the commit message includes it anyway. http://codereview.chromium.org/7514040/diff/8001/test/mjsunit/math-floor.js#newcode156 test/mjsunit/math-floor.js:156: // It seems that %OptimizeFunctionOnNextCall doesn't always work! Here It should always work (or else that's a bug). I think what's happening here is that (a) the call to Math.floor in the loop is invariant, so it gets lifted out; (b) the optimized floorsum correctly deoptimizes on the negative zero; then, (c) the function is optimized a second time via OSR because it contains a long running loop, but (d) the call to Math.floor in the loop is prevented from being hoisted out of the loop because it hasn't been computed at OSR entry, and so (e) there we hit the bug. You can see that by passing the flags --trace-deopt --trace-osr. This comment should just say something like 'use a high trip count to get the loop optimized via OSR'. http://codereview.chromium.org/7514040/diff/8001/test/mjsunit/math-round.js File test/mjsunit/math-round.js (right): http://codereview.chromium.org/7514040/diff/8001/test/mjsunit/math-round.js#newcode1 test/mjsunit/math-round.js:1: // Copyright 2010, 2011 the V8 project authors. All rights reserved. We just update the copyright date to 2011, not a range of dates. http://codereview.chromium.org/7514040/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
