|
[builtins] Make Math.ceil, Math.trunc and Math.round optimizable.
Migrate Math.ceil, Math.round and Math.trunc to TurboFan code stubs,
similar to what we did with Math.floor, and make these builtins properly
optimizable in TurboFan via appropriate simplified operators NumberCeil,
NumberRound and NumberTrunc, which are intended to be reusable for
ToInteger and ToLength optimizations that will be done in a followup CL.
Also allows us to kill the funky %RoundNumber runtime function, which
was quite heavy.
Improve test coverage for Math.ceil and Math.trunc a lot, especially
making sure that we also properly trigger the TurboFan builtin reducer
case.
R=jarin@chromium.org
BUG= v8:4059
LOG=n
Committed: https://crrev.com/8d20f2fe37e43233a61d2c18e5214831fab4a96b
Cr-Commit-Position: refs/heads/master@{#35135}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+880 lines, -214 lines) |
Patch |
|
M |
src/bootstrapper.cc
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/builtins.h
|
View
|
|
3 chunks |
+10 lines, -1 line |
0 comments
|
Download
|
|
M |
src/builtins.cc
|
View
|
|
5 chunks |
+33 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/code-stub-assembler.h
|
View
|
|
3 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/code-stub-assembler.cc
|
View
|
|
3 chunks |
+170 lines, -77 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-builtin-reducer.h
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/js-builtin-reducer.cc
|
View
|
|
5 chunks |
+32 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/compiler/opcodes.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/raw-machine-assembler.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.cc
|
View
|
|
3 chunks |
+276 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-operator.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-operator.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-operator-reducer.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/simplified-operator-reducer.cc
|
View
|
|
2 chunks |
+10 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/compiler/typer.cc
|
View
|
|
4 chunks |
+42 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/verifier.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/counters.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/js/math.js
|
View
|
|
5 chunks |
+0 lines, -24 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/runtime/runtime-maths.cc
|
View
|
|
1 chunk |
+0 lines, -43 lines |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-code-stub-assembler.cc
|
View
|
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/es6/math-trunc.js
|
View
|
|
1 chunk |
+75 lines, -22 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/math-ceil.js
|
View
|
|
1 chunk |
+78 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/math-floor-part1.js
|
View
|
|
2 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/math-floor-part2.js
|
View
|
|
2 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/math-floor-part3.js
|
View
|
|
2 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/math-floor-part4.js
|
View
|
|
2 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/mirror-script.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Dependent Patchsets:
Total messages: 8 (2 generated)
|