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

Issue 9413006: Handle imports of dart:core and dart:coreimpl (Closed)

Created:
8 years, 10 months ago by ahe
Modified:
8 years, 10 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org, kasperl, floitsch, Lasse Reichstein Nielsen, karlklose
Visibility:
Public.

Description

Handle imports of dart:core and dart:coreimpl Committed: https://code.google.com/p/dart/source/detail?r=4307

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M dart/frog/leg/compiler.dart View 1 1 chunk +3 lines, -0 lines 0 comments Download
M dart/frog/leg/scanner/scanner_task.dart View 1 1 chunk +8 lines, -1 line 0 comments Download
M dart/tests/language/language-leg.status View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ahe
8 years, 10 months ago (2012-02-16 10:46:59 UTC) #1
ngeoffray
LGTM https://chromiumcodereview.appspot.com/9413006/diff/1/dart/frog/leg/compiler.dart File dart/frog/leg/compiler.dart (right): https://chromiumcodereview.appspot.com/9413006/diff/1/dart/frog/leg/compiler.dart#newcode173 dart/frog/leg/compiler.dart:173: universe.libraries.putIfAbsent('dart:core', () => coreLibrary); Why putIfAbsent and not ...
8 years, 10 months ago (2012-02-16 10:50:49 UTC) #2
ahe
8 years, 10 months ago (2012-02-16 11:23:18 UTC) #3
Hi Nicolas,

Thank you for your comments.

Cheers,
Peter

https://chromiumcodereview.appspot.com/9413006/diff/1/dart/frog/leg/compiler....
File dart/frog/leg/compiler.dart (right):

https://chromiumcodereview.appspot.com/9413006/diff/1/dart/frog/leg/compiler....
dart/frog/leg/compiler.dart:173: universe.libraries.putIfAbsent('dart:core', ()
=> coreLibrary);
On 2012/02/16 10:50:50, ngeoffray wrote:
> Why putIfAbsent and not [] ?

No particular reason. Now that I think about it, it is kinda weird to use
putIfAbsent here, so I'll change it.

https://chromiumcodereview.appspot.com/9413006/diff/1/dart/frog/leg/scanner/s...
File dart/frog/leg/scanner/scanner_task.dart (right):

https://chromiumcodereview.appspot.com/9413006/diff/1/dart/frog/leg/scanner/s...
dart/frog/leg/scanner/scanner_task.dart:46: bool implicitlyImportCoreLibrary =
compiler.coreLibrary !== null;
On 2012/02/16 10:50:50, ngeoffray wrote:
> Is that a check that for making sure core library does not import itself? At
> first glance, it's not obvious, maybe we should abstract that a bit.

I plan to fix this as we add more libraries. I think I need to maintain a
mapping of dart: libraries. When I have that mapping, I should be able to clean
this up.

Powered by Google App Engine
This is Rietveld 408576698