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

Issue 8344079: Shave 39% from snapshot size. (Closed)

Created:
9 years, 2 months ago by Erik Corry
Modified:
9 years, 2 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Shave 39% from snapshot size. Committed: http://code.google.com/p/v8/source/detail?r=9722

Patch Set 1 #

Total comments: 10

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -107 lines) Patch
M src/arm/builtins-arm.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M src/arm/deoptimizer-arm.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M src/assembler.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/assembler.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/heap.h View 1 5 chunks +13 lines, -13 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 7 chunks +18 lines, -16 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/mips/builtins-mips.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M src/mksnapshot.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/serialize.h View 1 9 chunks +35 lines, -26 lines 0 comments Download
M src/serialize.cc View 1 14 chunks +102 lines, -34 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
9 years, 2 months ago (2011-10-20 09:24:12 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/8344079/diff/1/src/heap.h File src/heap.h (right): http://codereview.chromium.org/8344079/diff/1/src/heap.h#newcode67 src/heap.h:67: V(Map, global_property_cell_map, GlobalPropertyCellMap) \ Is this ordering change ...
9 years, 2 months ago (2011-10-20 10:06:54 UTC) #2
Erik Corry
9 years, 2 months ago (2011-10-20 11:01:42 UTC) #3
http://codereview.chromium.org/8344079/diff/1/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/8344079/diff/1/src/heap.h#newcode67
src/heap.h:67: V(Map, global_property_cell_map, GlobalPropertyCellMap)          
           \
On 2011/10/20 10:06:54, Lasse Reichstein wrote:
> Is this ordering change just due to "popularity", or is there another reason?
> (In 64-bit code, we generate shorter code for accessing the first 32 elements,
> in 32-bit code it's the first 64, so this changes which elements that is).

It's due to popularity in the snapshot.  The first 32 are encoded in just one
byte.

http://codereview.chromium.org/8344079/diff/1/src/serialize.cc
File src/serialize.cc (right):

http://codereview.chromium.org/8344079/diff/1/src/serialize.cc#newcode923
src/serialize.cc:923: *current++ = isolate->heap()->roots_address()[root_id];
On 2011/10/20 10:06:54, Lasse Reichstein wrote:
> The name roots_address suggests that it returns an Address. Could it be called
> roots_array_start or _origin instead?

Done.

http://codereview.chromium.org/8344079/diff/1/src/serialize.cc#newcode1325
src/serialize.cc:1325: root_index < 0x20 &&
On 2011/10/20 10:06:54, Lasse Reichstein wrote:
> Name the constants.

Done.

http://codereview.chromium.org/8344079/diff/1/src/serialize.cc#newcode1435
src/serialize.cc:1435: if (repeat_count > kMaxRepeats) {
On 2011/10/20 10:06:54, Lasse Reichstein wrote:
> A generic repeat takes five bytes. Up to 4*kMaxRepeats, it's smaller to do
> repeated constant repeats.

No, a generic repeat takes 2 bytes if the repeat count is less than 128.

http://codereview.chromium.org/8344079/diff/1/src/serialize.h
File src/serialize.h (right):

http://codereview.chromium.org/8344079/diff/1/src/serialize.h#newcode488
src/serialize.h:488: void set_root_index_wave_front(int value) {
root_index_wave_front_ = value; }
On 2011/10/20 10:06:54, Lasse Reichstein wrote:
> Assert that the wave-front moves forward?

Done.

Powered by Google App Engine
This is Rietveld 408576698