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

Unified Diff: frog/library.dart

Issue 9110027: Some cleanups to Frog to avoid looking up its builtin types too much (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed dead files Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/gen.dart ('k') | frog/member.dart » ('j') | frog/member.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/library.dart
diff --git a/frog/library.dart b/frog/library.dart
index 7861754c517b2b63ce774d2b7ad483a7b9164fe8..30b7e63ea97762101d1613ae0b2e09bcbd005c43 100644
--- a/frog/library.dart
+++ b/frog/library.dart
@@ -44,6 +44,9 @@ class Library extends Element {
bool get isCore() => this == world.corelib;
bool get isCoreImpl() => this == world.coreimpl;
+ // TODO(jmesserly): we shouldn't be special casing DOM anywhere.
+ bool get isDom() => this == world.dom;
+
SourceSpan get span() => new SourceSpan(baseSource, 0, 0);
String makeFullPath(String filename) {
@@ -122,7 +125,7 @@ class Library extends Element {
DefinedType addType(String name, Node definition, bool isClass) {
if (types.containsKey(name)) {
var existingType = types[name];
- if (isCore && existingType.definition == null) {
+ if ((isCore || isCoreImpl) && existingType.definition == null) {
// TODO(jimhug): Validate compatibility with natives.
existingType.setDefinition(definition);
} else {
« no previous file with comments | « frog/gen.dart ('k') | frog/member.dart » ('j') | frog/member.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698