Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Issue 2151163002: [stubs] Improve code generation for ToBoolean. (Closed)

Created:
4 years, 5 months ago by Benedikt Meurer
Modified:
4 years, 5 months ago
CC:
v8-reviews_googlegroups.com, oth, Hannes Payer (out of office), ulan
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[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}

Patch Set 1 #

Patch Set 2 : Slightly improve ToBoolean code generation for HeapNumber case. #

Patch Set 3 : REBASE. Fix redness. #

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

Messages

Total messages: 18 (10 generated)
Benedikt Meurer
4 years, 5 months ago (2016-07-15 05:07:30 UTC) #1
Benedikt Meurer
Yang: PTAL overall. Ross: PTAL at interpreter and overall. Hannes/Ulan: Please rubberstamp heap.cc
4 years, 5 months ago (2016-07-15 05:08:30 UTC) #5
ulan
heap lgtm
4 years, 5 months ago (2016-07-15 09:41:33 UTC) #10
rmcilroy
Nice, LGTM (modulo red bots). Thanks!
4 years, 5 months ago (2016-07-15 09:44:33 UTC) #11
Yang
On 2016/07/15 09:44:33, rmcilroy wrote: > Nice, LGTM (modulo red bots). Thanks! LGTM
4 years, 5 months ago (2016-07-15 11:24:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2151163002/40001
4 years, 5 months ago (2016-07-19 05:32:38 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-19 06:13:41 UTC) #16
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 06:16:25 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0abba43524eb618ae9733a28d424b395722ea33b
Cr-Commit-Position: refs/heads/master@{#37849}

Powered by Google App Engine
This is Rietveld 408576698