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

Side by Side Diff: frog/type.dart

Issue 8775027: Frog now knows about the JS global object, and prevents name collisions with user code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/lib/corelib.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class Type extends Element { 5 class Type extends Element {
6 bool isTested = false; 6 bool isTested = false;
7 bool isChecked = false; 7 bool isChecked = false;
8 8
9 /** 9 /**
10 * For core types (int, String, etc) this is the generated type assertion 10 * For core types (int, String, etc) this is the generated type assertion
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 /** Gets the :call method for a function type. */ 69 /** Gets the :call method for a function type. */
70 MethodMember getCallMethod() => null; 70 MethodMember getCallMethod() => null;
71 71
72 /** These types may not be implemented or extended by user code. */ 72 /** These types may not be implemented or extended by user code. */
73 bool get isClosed() => isString || isBool || isNum || isFunction || isVar; 73 bool get isClosed() => isString || isBool || isNum || isFunction || isVar;
74 74
75 bool get isUsed() => false; 75 bool get isUsed() => false;
76 76
77 bool get isGeneric() => false; 77 bool get isGeneric() => false;
78 78
79 bool get isHiddenNativeType() => false; 79 NativeType get nativeType() => null;
80 bool get isHiddenNativeType() =>
81 (nativeType != null && nativeType.isConstructorHidden);
82 bool get isJsGlobalObject() =>
83 (nativeType != null && nativeType.isJsGlobalObject);
80 84
81 bool get hasTypeParams() => false; 85 bool get hasTypeParams() => false;
82 86
83 String get typeofName() => null; 87 String get typeofName() => null;
84 88
85 Map<String, Member> get members() => null; 89 Map<String, Member> get members() => null;
86 Definition get definition() => null; 90 Definition get definition() => null;
87 FactoryMap get factories() => null; 91 FactoryMap get factories() => null;
88 92
89 // TODO(jmesserly): should try using a const list instead of null to represent 93 // TODO(jmesserly): should try using a const list instead of null to represent
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 setDefinition(definition); 728 setDefinition(definition);
725 } 729 }
726 730
727 void setDefinition(Definition def) { 731 void setDefinition(Definition def) {
728 assert(definition == null); 732 assert(definition == null);
729 definition = def; 733 definition = def;
730 if (definition is TypeDefinition && definition.nativeType != null) { 734 if (definition is TypeDefinition && definition.nativeType != null) {
731 isNative = true; 735 isNative = true;
732 } 736 }
733 if (definition != null && definition.typeParameters != null) { 737 if (definition != null && definition.typeParameters != null) {

error: old chunk mismatch

OLDNEW
« no previous file with comments | « frog/lib/corelib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698