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

Issue 8359034: Refactor and clean up array allocation across platforms. (Closed)

Created:
9 years, 2 months ago by Yang
Modified:
9 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Refactor and clean up array allocation across platforms. Committed: http://code.google.com/p/v8/source/detail?r=9747

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -85 lines) Patch
M src/arm/builtins-arm.cc View 9 chunks +19 lines, -39 lines 2 comments Download
M src/ia32/builtins-ia32.cc View 5 chunks +2 lines, -9 lines 0 comments Download
M src/x64/builtins-x64.cc View 10 chunks +21 lines, -37 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Yang
Please take a look. This is a first step for some experiment later.
9 years, 2 months ago (2011-10-21 15:31:10 UTC) #1
Sven Panne
lgtm
9 years, 2 months ago (2011-10-24 07:25:02 UTC) #2
Kevin Millikin (Chromium)
9 years, 2 months ago (2011-10-24 08:00:38 UTC) #3
Couple of quick comments to improve it.

http://codereview.chromium.org/8359034/diff/1/src/arm/builtins-arm.cc
File src/arm/builtins-arm.cc (right):

http://codereview.chromium.org/8359034/diff/1/src/arm/builtins-arm.cc#newcode99
src/arm/builtins-arm.cc:99: int initial_capacity =
JSArray::kPreallocatedArrayElements;
Drive by:

Make this a const, and make the asserts that use it into STATIC_ASSERT where
possible.

http://codereview.chromium.org/8359034/diff/1/src/arm/builtins-arm.cc#newcode185
src/arm/builtins-arm.cc:185: __ b(ne, &not_empty);
Drive by:

You can replace all this with:

if (FLAG_debug_code) {
  __ tst(array_size, array_size);
  __ Assert(ne, "array size is unexpectedly 0");
}

Powered by Google App Engine
This is Rietveld 408576698