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

Issue 509007: Optimize implementation of Math.floor a little by special casing... (Closed)

Created:
11 years ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Optimize implementation of Math.floor a little by special casing the comparison it uses in the code generator. Use Math.floor for date operations. Committed: http://code.google.com/p/v8/source/detail?r=3508

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -7 lines) Patch
M src/ia32/codegen-ia32.cc View 5 chunks +36 lines, -4 lines 2 comments Download
M src/jump-target.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/macros.py View 1 chunk +1 line, -1 line 0 comments Download
M src/math.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Erik Corry
11 years ago (2009-12-21 14:37:38 UTC) #1
Søren Thygesen Gjesse
11 years ago (2009-12-21 14:59:39 UTC) #2
LGTM

http://codereview.chromium.org/509007/diff/1/3
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/509007/diff/1/3#newcode6130
src/ia32/codegen-ia32.cc:6130: __ mov(scratch.reg(), FieldOperand(lhs.reg(),
HeapNumber::kExponentOffset));
Line longer than 80 chars.

http://codereview.chromium.org/509007/diff/1/3#newcode6132
src/ia32/codegen-ia32.cc:6132: not_a_number.Branch(above_equal, &lhs);  // It's
a negative NaN or -Infinity.
Ditto.

Powered by Google App Engine
This is Rietveld 408576698