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

Issue 10388242: Minor restructure some of the builtin library processing code (Closed)

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

Description

1. Restructure some of the builtin library processing code. Committed: https://code.google.com/p/dart/source/detail?r=8175

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -93 lines) Patch
M bin/builtin.h View 1 2 3 2 chunks +14 lines, -3 lines 0 comments Download
M bin/builtin.cc View 1 2 3 2 chunks +28 lines, -56 lines 0 comments Download
M bin/builtin_nolib.cc View 1 2 3 2 chunks +20 lines, -24 lines 0 comments Download
M bin/gen_snapshot.cc View 1 2 1 chunk +9 lines, -5 lines 0 comments Download
M bin/main.cc View 1 2 1 chunk +7 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
siva
8 years, 7 months ago (2012-05-23 00:18:47 UTC) #1
hausner
lgtm
8 years, 7 months ago (2012-05-23 00:29:36 UTC) #2
siva
Removed the code to not include dart:io, dart_crypto, dart:utf etc. from this changelist. What is ...
8 years, 6 months ago (2012-05-31 15:17:18 UTC) #3
hausner
LGTM w/c http://codereview.chromium.org/10388242/diff/12001/bin/builtin.cc File bin/builtin.cc (right): http://codereview.chromium.org/10388242/diff/12001/bin/builtin.cc#newcode34 bin/builtin.cc:34: ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary); ...
8 years, 6 months ago (2012-05-31 15:57:11 UTC) #4
siva
8 years, 6 months ago (2012-05-31 20:57:19 UTC) #5
Thanks.

http://codereview.chromium.org/10388242/diff/12001/bin/builtin.cc
File bin/builtin.cc (right):

http://codereview.chromium.org/10388242/diff/12001/bin/builtin.cc#newcode34
bin/builtin.cc:34: ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary);
I have added an assertion to ensure that the size of builtin_libraries table
matches the enum.

I have also added a comment in builtin.h that changes to the enumeration order
must be accompanied by changes to the builtin_libraries table.

On 2012/05/31 15:57:11, hausner wrote:
> This code assumes that kBuiltinLibrary is the first in the enumeration.

http://codereview.chromium.org/10388242/diff/12001/bin/builtin.cc#newcode40
bin/builtin.cc:40: ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary);
Ditto.

On 2012/05/31 15:57:11, hausner wrote:
> ditto.

http://codereview.chromium.org/10388242/diff/12001/bin/builtin.cc#newcode55
bin/builtin.cc:55: ASSERT(id >= kBuiltinLibrary && id < kInvalidLibrary);
Ditto.

On 2012/05/31 15:57:11, hausner wrote:
> ditto.

http://codereview.chromium.org/10388242/diff/12001/bin/builtin_nolib.cc
File bin/builtin_nolib.cc (right):

http://codereview.chromium.org/10388242/diff/12001/bin/builtin_nolib.cc#newco...
bin/builtin_nolib.cc:25: ASSERT(id >= kCryptoLibrary && id < kInvalidLibrary);
On 2012/05/31 15:57:11, hausner wrote:
> Also assumes a certain order in the enum. Add a comment in the enum that there
> is code that depends on the order?

Done.

Powered by Google App Engine
This is Rietveld 408576698