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

Issue 9462003: Changes to shrink the token stream representation from two words to one word. (Closed)

Created:
8 years, 10 months ago by siva
Modified:
8 years, 9 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Changes to shrink the token stream representation from two words to one word. On standalone dartium which has about 50000 tokens in the libraries (core, coreimpl, builtin, io etc.) this reduces the heap size by about 180kb. The size of the standalone snapshot buffer reduces by about 72kb. Also moved the keyword symbol table to the object store so that it does not have to repopulated on every script compilation. Should benefit regular user script load times. Committed: https://code.google.com/p/dart/source/detail?r=4734

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 13

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+318 lines, -44 lines) Patch
M vm/compiler_stats.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M vm/compiler_stats.cc View 1 2 3 4 3 chunks +4 lines, -1 line 0 comments Download
M vm/dart.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M vm/object.h View 1 2 3 4 5 7 chunks +46 lines, -15 lines 0 comments Download
M vm/object.cc View 1 2 3 4 5 7 chunks +106 lines, -4 lines 0 comments Download
M vm/object_store.h View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M vm/object_store.cc View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M vm/parser.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M vm/parser.cc View 1 2 3 4 3 chunks +18 lines, -9 lines 0 comments Download
M vm/raw_object.h View 1 2 3 4 5 4 chunks +20 lines, -8 lines 0 comments Download
M vm/raw_object.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M vm/raw_object_snapshot.cc View 1 2 3 4 2 chunks +50 lines, -3 lines 0 comments Download
M vm/scanner.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M vm/scanner.cc View 1 2 3 4 4 chunks +17 lines, -3 lines 0 comments Download
M vm/snapshot.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M vm/snapshot.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M vm/token.h View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
siva
8 years, 10 months ago (2012-02-24 21:37:05 UTC) #1
hausner
LGTM w/ comments. Additional question: you calculated the space savings by just measuring how much ...
8 years, 10 months ago (2012-02-25 00:41:57 UTC) #2
siva
Thanks for the review, I have addressed the comments, please take another look. The space ...
8 years, 9 months ago (2012-02-28 19:57:31 UTC) #3
hausner
LEBTM. https://chromiumcodereview.appspot.com/9462003/diff/1040/vm/scanner.cc File vm/scanner.cc (right): https://chromiumcodereview.appspot.com/9462003/diff/1040/vm/scanner.cc#newcode263 vm/scanner.cc:263: String& symbol = String::ZoneHandle(); Nice, thank you. On ...
8 years, 9 months ago (2012-02-29 00:22:37 UTC) #4
siva
8 years, 9 months ago (2012-02-29 02:07:55 UTC) #5
Thanks.

https://chromiumcodereview.appspot.com/9462003/diff/10001/vm/object.h
File vm/object.h (right):

https://chromiumcodereview.appspot.com/9462003/diff/10001/vm/object.h#newcode...
vm/object.h:1619: ASSERT(RawTokenStream::kNumberOfEntries == 1);
On 2012/02/29 00:22:37, hausner wrote:
> Seems like a high price to pay for this assertion. This code is executed many
> times. Or is the compiler smart enough (in debug mode) to eliminate the
assert,
> since the condition is a compile time constant? Do we have a compile time
> assertion macro? Or maybe just get rid of the kNumberOfEntries  and its
> enumeration completely?

Done (i.e. got rid of the enum).

Powered by Google App Engine
This is Rietveld 408576698