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

Issue 8831008: Tweaks on Math.pow (ia32 and x64). (Closed)

Created:
9 years ago by Yang
Modified:
9 years ago
Reviewers:
ulan
CC:
v8-dev
Visibility:
Public.

Description

Tweaks on Math.pow (ia32 and x64). Committed: http://code.google.com/p/v8/source/detail?r=10203

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -99 lines) Patch
M src/assembler.cc View 1 chunk +1 line, -13 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 7 chunks +28 lines, -40 lines 1 comment Download
M src/runtime.cc View 2 chunks +19 lines, -7 lines 1 comment Download
M src/x64/code-stubs-x64.cc View 9 chunks +23 lines, -39 lines 3 comments Download

Messages

Total messages: 2 (0 generated)
Yang
Please take a look. I removed the double_int_runtime bail out since this would only be ...
9 years ago (2011-12-07 15:07:50 UTC) #1
ulan
9 years ago (2011-12-07 16:03:04 UTC) #2
LGTM with comments.

http://codereview.chromium.org/8831008/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/8831008/diff/1/src/runtime.cc#newcode7444
src/runtime.cc:7444: } else if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) {
This code is almost the same as in power_double_double. Can we reuse it?

http://codereview.chromium.org/8831008/diff/1/src/x64/code-stubs-x64.cc
File src/x64/code-stubs-x64.cc (right):

http://codereview.chromium.org/8831008/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:2208: __ cvtlsi2sd(double_exponent, exponent);
Could you please add a comment explaining why we need the instruction?

1) double_exponent is aliased with double_scratch2, so it gets overwritten.
2) double_exponent might not contain the exponent at all if the exponent is SMI.

http://codereview.chromium.org/8831008/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:2234: };
Redundant semicolon.

Powered by Google App Engine
This is Rietveld 408576698