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

Side by Side Diff: frog/type.dart

Issue 8590017: Fix "is Object" to always be true in Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: take2 after syncing Created 9 years, 1 month 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/gen.dart ('k') | frog/value.dart » ('j') | frog/value.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 implements Named, Hashable { 5 class Type implements Named, Hashable {
6 final String name; 6 final String name;
7 bool isTested; 7 bool isTested;
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool get isDouble() => false; 61 bool get isDouble() => false;
62 bool get isVoid() => false; 62 bool get isVoid() => false;
63 63
64 // True for all types in the Dart type system. We track non-nullabiltity 64 // True for all types in the Dart type system. We track non-nullabiltity
65 // as an optimization for booleans to generate better code in checked mode. 65 // as an optimization for booleans to generate better code in checked mode.
66 bool get isNullable() => true; 66 bool get isNullable() => true;
67 67
68 // Strangely Dart treats calls on Function much like calls on var. 68 // Strangely Dart treats calls on Function much like calls on var.
69 bool get isVarOrFunction() => isVar || isFunction; 69 bool get isVarOrFunction() => isVar || isFunction;
70 70
71 bool get isVarOrObject() => isVar || isObject;
72
71 /** Gets the $call method for a function type. */ 73 /** Gets the $call method for a function type. */
72 MethodMember getCallMethod() => null; 74 MethodMember getCallMethod() => null;
73 75
74 /** These types may not be implemented or extended by user code. */ 76 /** These types may not be implemented or extended by user code. */
75 bool get isClosed() => isString || isBool || isNum || isFunction || isVar; 77 bool get isClosed() => isString || isBool || isNum || isFunction || isVar;
76 78
77 bool get isUsed() => false; 79 bool get isUsed() => false;
78 80
79 bool get isGeneric() => false; 81 bool get isGeneric() => false;
80 bool get isNativeType() => false; 82 bool get isNativeType() => false;
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 var name = _getCallStubName('call', args); 1255 var name = _getCallStubName('call', args);
1254 if (varStubs == null) varStubs = {}; 1256 if (varStubs == null) varStubs = {};
1255 var stub = varStubs[name]; 1257 var stub = varStubs[name];
1256 if (stub == null) { 1258 if (stub == null) {
1257 stub = new VarFunctionStub(name, args); 1259 stub = new VarFunctionStub(name, args);
1258 varStubs[name] = stub; 1260 varStubs[name] = stub;
1259 } 1261 }
1260 return stub; 1262 return stub;
1261 } 1263 }
1262 } 1264 }
OLDNEW
« no previous file with comments | « frog/gen.dart ('k') | frog/value.dart » ('j') | frog/value.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698