|
[stubs] Improve code generation for ToBoolean.
Introduce a proper CodeStubAssembler::BranchIfToBooleanIsTrue helper
method, that branches to if_true/if_false labels depending on whether
the value that is passed would yield true or false when fed to
ToBoolean. Use this helper to implement the bytecode handlers w/o having
to materialize the temporary booleans and essentially branching twice.
The CodeStubAssembler::BranchIfToBooleanIsTrue helper favors the most
likely case of a Boolean constant now.
Also migrate the ToBooleanStub to a ToBoolean TurboFan builtin, that
also uses the helper method under the hood.
Remove the now obsolete Oddball::to_boolean field.
R=hpayer@chromium.org, rmcilroy@chromium.org, yangguo@chromium.org
Committed: https://crrev.com/0abba43524eb618ae9733a28d424b395722ea33b
Cr-Commit-Position: refs/heads/master@{#37849}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+187 lines, -224 lines) |
Patch |
|
M |
include/v8.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/builtins/builtins.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/builtins/builtins.cc
|
View
|
1
2
|
1 chunk |
+17 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/code-factory.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/code-stub-assembler.h
|
View
|
1
2
|
2 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/code-stub-assembler.cc
|
View
|
1
2
|
1 chunk |
+73 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.h
|
View
|
1
2
|
2 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.cc
|
View
|
|
1 chunk |
+0 lines, -124 lines |
0 comments
|
Download
|
|
M |
src/factory.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/factory.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/heap/heap.cc
|
View
|
1
2
|
1 chunk |
+18 lines, -20 lines |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter.h
|
View
|
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter.cc
|
View
|
1
2
|
7 chunks |
+58 lines, -44 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
Total messages: 18 (10 generated)
|