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

Issue 870007: Implement a custom call compiler for Array.pop. (Closed)

Created:
10 years, 9 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Implement a custom call compiler for Array.pop. Committed: http://code.google.com/p/v8/source/detail?r=4118

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressing Mad's and Lasse's comments #

Patch Set 3 : Forgotten indentation #

Patch Set 4 : Ultimate version #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -3 lines) Patch
M src/arm/stub-cache-arm.cc View 1 chunk +49 lines, -0 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 4 chunks +90 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 chunk +11 lines, -1 line 0 comments Download
M src/stub-cache.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 chunk +55 lines, -0 lines 0 comments Download
A test/mjsunit/array-pop.js View 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
antonm
Mads, may you have a look?
10 years, 9 months ago (2010-03-12 10:28:03 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/870007/diff/1/2 File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/870007/diff/1/2#newcode1344 src/ia32/stub-cache-ia32.cc:1344: Immediate(Factory::fixed_array_map())); Indentation one space off? http://codereview.chromium.org/870007/diff/1/2#newcode1357 src/ia32/stub-cache-ia32.cc:1357: __ ...
10 years, 9 months ago (2010-03-12 10:57:35 UTC) #2
antonm
Thanks a lot for review, Mads. Doing stubs for other platforms and submitting. http://codereview.chromium.org/870007/diff/1/2 File ...
10 years, 9 months ago (2010-03-12 12:05:48 UTC) #3
Lasse Reichstein
drive-by comments. http://codereview.chromium.org/870007/diff/1/2 File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/870007/diff/1/2#newcode1350 src/ia32/stub-cache-ia32.cc:1350: __ j(negative, &empty_array, not_taken); not_taken is the ...
10 years, 9 months ago (2010-03-12 12:31:37 UTC) #4
antonm
10 years, 9 months ago (2010-03-12 12:43:56 UTC) #5
Thanks a lot for comments, Lasse.

http://codereview.chromium.org/870007/diff/1/2
File src/ia32/stub-cache-ia32.cc (right):

http://codereview.chromium.org/870007/diff/1/2#newcode1350
src/ia32/stub-cache-ia32.cc:1350: __ j(negative, &empty_array, not_taken);
On 2010/03/12 12:31:37, Lasse Reichstein wrote:
> not_taken is the default for forward jumps, but the implementation still emits
> the hint. 
> Either remove the hint here (defaulting to no_hint) or change
> j(Condition,Label*,Hint) to not emit not_taken hints for forward jumps and
taken
> hints for backwards jumps.

Fixed.  I just wanted to be consistent with the rest of the code, but yes, I
schedule my jumps that way :)

Let me change ArrayPush impl as well.

http://codereview.chromium.org/870007/diff/1/2#newcode1352
src/ia32/stub-cache-ia32.cc:1352: // Get the last element.
On 2010/03/12 12:31:37, Lasse Reichstein wrote:
> Ensure that using times_half_pointer_size turns a smi into a pointer index,
> e.g.,
> STATIC_ASSERT(kSmiTagSize == 1);
> STATIC_ASSERT(kSmiTag == 0);

Done.

http://codereview.chromium.org/870007/diff/1/2#newcode1357
src/ia32/stub-cache-ia32.cc:1357: __ j(equal, &call_builtin, not_taken);
On 2010/03/12 12:31:37, Lasse Reichstein wrote:
> Remove not_taken here too..

Sure.

http://codereview.chromium.org/870007/diff/1/2#newcode1376
src/ia32/stub-cache-ia32.cc:1376: argc + 1,
On 2010/03/12 12:31:37, Lasse Reichstein wrote:
> Indentation.

Done.

Powered by Google App Engine
This is Rietveld 408576698