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

Issue 2451973003: [builtins] Don't canonicalize results of Math double operations. (Closed)

Created:
4 years, 1 month ago by Benedikt Meurer
Modified:
4 years, 1 month ago
Reviewers:
Yang
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[builtins] Don't canonicalize results of Math double operations. For Math builtins that likely yield double results, i.e. Math.sin, Math.cos and friends, don't bother trying to canonicalize the result to Smi. The rationale behind this is that other parts of V8 use the HeapNumber representation as a hint to assume that certain values should be represented as double (i.e. for the array elements kind and for double field tracking). This way the chance that we make the ideal decision early on is better. For Math.abs we establish the contract that if the input value is a Smi, then we try hard to return a Smi (doesn't work for minimal Smi value), otherwise we preserve the HeapNumberness of the input. Same for the generic Add, Subtract, Multiply, etc. code stubs. R=yangguo@chromium.org Committed: https://crrev.com/9f4f582bbfd806774f5663a87bfe7b804bf11e9b Cr-Commit-Position: refs/heads/master@{#40573}

Patch Set 1 #

Patch Set 2 : Same for the number builtins. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -207 lines) Patch
M src/builtins/builtins-math.cc View 8 chunks +154 lines, -200 lines 0 comments Download
M src/builtins/builtins-number.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (15 generated)
Benedikt Meurer
4 years, 1 month ago (2016-10-26 04:16:00 UTC) #1
Benedikt Meurer
Hey Yang, Here's a unification for the Math builtin canonicalization. This way the builtins more ...
4 years, 1 month ago (2016-10-26 04:17:09 UTC) #4
Yang
On 2016/10/26 04:17:09, Benedikt Meurer wrote: > Hey Yang, > > Here's a unification for ...
4 years, 1 month ago (2016-10-26 04:39:53 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/2451973003/20001
4 years, 1 month ago (2016-10-26 04:40:46 UTC) #15
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/2451973003/20001
4 years, 1 month ago (2016-10-26 05:24:35 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-10-26 05:56:05 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:13:05 UTC) #22
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9f4f582bbfd806774f5663a87bfe7b804bf11e9b
Cr-Commit-Position: refs/heads/master@{#40573}

Powered by Google App Engine
This is Rietveld 408576698