|
[turbofan] Unify Math.floor / Math.ceil optimization.
Provide an intrinsic %MathFloor / %_MathFloor that is used to optimize
both Math.ceil and Math.floor, and use the JS inlining mechanism to
inline Math.ceil into TurboFan code. Although we need to touch code
outside of TurboFan to make this work, this does not affect the way we
handle Math.ceil and/or Math.floor in CrankShaft, because for CrankShaft
the old-style builtin function id based inlining still kicks in first.
Once this solution is stabilized, we can use it for Math.floor as well.
And once that is settled, we can establish it as the unified way to
inline builtins, and get rid of the specialized builtin function id
based inlining at some point.
Note that "builtin" applies to basically every piece of internal
JavaScript/intrinsics based code, so this also applies to the yet to be
defined JavaScript based code stubs and handlers.
BUG= v8:3953
LOG=n
R=yangguo@chromium.org,svenpanne@chromium.org
Committed: https://crrev.com/022ea7e05779f07b9327bcc2d4709fc80b2aeecb
Cr-Commit-Position: refs/heads/master@{#27086}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+181 lines, -245 lines) |
Patch |
|
M |
src/compiler/arm/code-generator-arm.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm/instruction-codes-arm.h
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm/instruction-selector-arm.cc
|
View
|
|
3 chunks |
+17 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm64/code-generator-arm64.cc
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm64/instruction-codes-arm64.h
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/arm64/instruction-selector-arm64.cc
|
View
|
|
3 chunks |
+17 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/compiler/ia32/code-generator-ia32.cc
|
View
|
|
1 chunk |
+4 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/compiler/ia32/instruction-codes-ia32.h
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/ia32/instruction-selector-ia32.cc
|
View
|
|
4 chunks |
+20 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/compiler/instruction-selector.cc
|
View
|
|
2 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-builtin-reducer.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/js-builtin-reducer.cc
|
View
|
|
2 chunks |
+3 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-intrinsic-lowering.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-intrinsic-lowering.cc
|
View
|
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/machine-operator.h
|
View
|
|
2 chunks |
+8 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/compiler/machine-operator.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/opcodes.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/raw-machine-assembler.h
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/simplified-lowering.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/typer.cc
|
View
|
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/compiler/verifier.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/x64/code-generator-x64.cc
|
View
|
|
1 chunk |
+4 lines, -15 lines |
0 comments
|
Download
|
|
M |
src/compiler/x64/instruction-codes-x64.h
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/x64/instruction-selector-x64.cc
|
View
|
|
4 chunks |
+19 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/assembler-ia32.h
|
View
|
|
2 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/math.js
|
View
|
|
2 chunks |
+2 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
|
2 chunks |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/runtime/runtime-maths.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/x64/assembler-x64.h
|
View
|
|
2 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/x64/assembler-x64.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/compiler/test-run-machops.cc
|
View
|
|
3 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/js-builtin-reducer-unittest.cc
|
View
|
|
2 chunks |
+2 lines, -38 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/machine-operator-unittest.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-test-utils.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/node-test-utils.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
tools/check-name-clashes.py
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 8 (1 generated)
|