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

Issue 1828253002: [builtins] Provide Math.floor as TurboFan builtin. (Closed)

Created:
4 years, 9 months ago by Benedikt Meurer
Modified:
4 years, 8 months ago
Reviewers:
epertoso
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[builtins] Provide Math.floor as TurboFan builtin. This way we avoid the second deoptimization for the Math.floor and Math.ceil builtins when -0 is involved. We still deoptimize the inlined Crankshaft version in various cases, that's a separate issue. The algorithm used for implement CodeStubAssembler::Float64Floor is vaguely based on the fast math version used in the libm of various BSDs, but had to be reengineered to match the EcmaScript specification. R=epertoso@chromium.org BUG=v8:2890, v8:4059 LOG=n Committed: https://crrev.com/36ead519c8a5b5174f82b2074dca802f3af8c153 Cr-Commit-Position: refs/heads/master@{#35083}

Patch Set 1 #

Patch Set 2 : Introduce ChangeFloat64ToTagged. #

Total comments: 4

Patch Set 3 : REBASE. Address feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -74 lines) Patch
M src/bootstrapper.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/builtins.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/builtins.cc View 1 2 3 chunks +58 lines, -2 lines 0 comments Download
M src/code-stubs.cc View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M src/compiler/code-stub-assembler.h View 1 2 3 chunks +6 lines, -0 lines 0 comments Download
M src/compiler/code-stub-assembler.cc View 1 2 2 chunks +166 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.cc View 2 chunks +15 lines, -0 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/compiler/js-intrinsic-lowering.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M src/compiler/typer.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/contexts.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/counters.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/crankshaft/hydrogen.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/crankshaft/hydrogen.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M src/js/i18n.js View 1 2 3 chunks +1 line, -3 lines 0 comments Download
M src/js/math.js View 7 chunks +4 lines, -12 lines 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, -10 lines 0 comments Download
M test/cctest/compiler/test-code-stub-assembler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M test/unittests/compiler/js-intrinsic-lowering-unittest.cc View 1 chunk +0 lines, -18 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Benedikt Meurer
4 years, 9 months ago (2016-03-24 13:29:55 UTC) #1
Benedikt Meurer
Hey Enrico, Another builtin. Please take a look. Thanks, Benedikt
4 years, 9 months ago (2016-03-24 13:35:34 UTC) #2
epertoso
lgtm https://codereview.chromium.org/1828253002/diff/40001/src/compiler/code-stub-assembler.cc File src/compiler/code-stub-assembler.cc (right): https://codereview.chromium.org/1828253002/diff/40001/src/compiler/code-stub-assembler.cc#newcode659 src/compiler/code-stub-assembler.cc:659: { Goto(&if_valueisheapnumber); } nit: remove the braces for ...
4 years, 8 months ago (2016-03-28 09:55:08 UTC) #4
Benedikt Meurer
https://codereview.chromium.org/1828253002/diff/40001/src/compiler/code-stub-assembler.cc File src/compiler/code-stub-assembler.cc (right): https://codereview.chromium.org/1828253002/diff/40001/src/compiler/code-stub-assembler.cc#newcode659 src/compiler/code-stub-assembler.cc:659: { Goto(&if_valueisheapnumber); } On 2016/03/28 09:55:08, epertoso wrote: > ...
4 years, 8 months ago (2016-03-28 17:00:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828253002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828253002/60001
4 years, 8 months ago (2016-03-28 17:05:51 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 8 months ago (2016-03-28 17:30:14 UTC) #9
commit-bot: I haz the power
4 years, 8 months ago (2016-03-28 17:31:56 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/36ead519c8a5b5174f82b2074dca802f3af8c153
Cr-Commit-Position: refs/heads/master@{#35083}

Powered by Google App Engine
This is Rietveld 408576698