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

Unified Diff: frog/type.dart

Issue 8746005: Fix a bunch of issues with 'hidden' DOM types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed dead code 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 side-by-side diff with in-line comments
Download patch
Index: frog/type.dart
diff --git a/frog/type.dart b/frog/type.dart
index 7dbafd4a225a0e40ee1a53b3a998d33f844249d6..3319c96f5fad2a5f21ef00e5a42539ef84996d35 100644
--- a/frog/type.dart
+++ b/frog/type.dart
@@ -3,7 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
class Type extends Element {
- bool isTested;
+ bool isTested = false;
+ bool isChecked = false;
/**
* For core types (int, String, etc) this is the generated type assertion
@@ -13,13 +14,13 @@ class Type extends Element {
Member _typeMember;
- /** Stubs used to call into this method dynamically. Lazy initialized. */
+ /** Stubs used to call into this method dynamically. */
Map<String, VarMember> varStubs;
/** Cache of [MemberSet]s that have been resolved. */
Map<String, MemberSet> _resolvedMembers;
- Type(String name): isTested = false, _resolvedMembers = {}, super(name, null);
+ Type(String name): _resolvedMembers = {}, varStubs = {}, super(name, null);
void markUsed() {}
abstract void genMethod(Member method);
@@ -734,9 +735,8 @@ class DefinedType extends Type {
}
bool get isHiddenNativeType() =>
- library == world.dom || // Legacy, remove after DOM is updated.
- (definition.nativeType != null &&
- definition.nativeType.isConstructorHidden);
+ (definition != null && definition.nativeType != null
+ && definition.nativeType.isConstructorHidden);
// TODO(jmesserly): this is a workaround for generic types not filling in
// "Dynamic" as their type arguments.
@@ -1184,7 +1184,6 @@ class DefinedType extends Type {
assert(isFunction);
var name = _getCallStubName('call', args);
- if (varStubs == null) varStubs = {};
var stub = varStubs[name];
if (stub == null) {
stub = new VarFunctionStub(name, args);
« frog/lib/corelib.dart ('K') | « frog/member.dart ('k') | frog/value.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698