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

Side by Side Diff: frog/gen.dart

Issue 8485002: more negative test fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/frogsh ('k') | frog/member.dart » ('j') | no next file with comments »
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 /** 5 /**
6 * Top level generator object for writing code and keeping track of 6 * Top level generator object for writing code and keeping track of
7 * dependencies. 7 * dependencies.
8 * 8 *
9 * Should have two compilation models, but only one implemented so far. 9 * Should have two compilation models, but only one implemented so far.
10 * 10 *
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 } 109 }
110 // Type check functions for builtin JS types 110 // Type check functions for builtin JS types
111 if (type.typeCheckCode != null) { 111 if (type.typeCheckCode != null) {
112 writer.writeln(type.typeCheckCode); 112 writer.writeln(type.typeCheckCode);
113 } 113 }
114 } 114 }
115 } 115 }
116 116
117 genMethod(Member meth, [MethodGenerator enclosingMethod=null]) { 117 genMethod(Member meth, [MethodGenerator enclosingMethod=null]) {
118 if (!meth.isGenerated && meth.declaringType.isClass 118 if (!meth.isGenerated && !meth.isAbstract && meth.definition != null) {
119 && meth.definition != null && !meth.isAbstract) {
120 new MethodGenerator(meth, enclosingMethod).run(); 119 new MethodGenerator(meth, enclosingMethod).run();
121 } 120 }
122 } 121 }
123 122
124 _maybeIsTest(Type onType, Type checkType) { 123 _maybeIsTest(Type onType, Type checkType) {
125 if (!checkType.isTested) return; 124 if (!checkType.isTested) return;
126 125
127 var value = 'false'; 126 var value = 'false';
128 if (onType.isSubtypeOf(checkType)) { 127 if (onType.isSubtypeOf(checkType)) {
129 value = 'function(){return this;}'; 128 value = 'function(){return this;}';
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 result.add(new Value(world.varType, '\$$i', false, /*needsTemp:*/false)); 2170 result.add(new Value(world.varType, '\$$i', false, /*needsTemp:*/false));
2172 } 2171 }
2173 for (int i = bareCount; i < length; i++) { 2172 for (int i = bareCount; i < length; i++) {
2174 var name = getName(i); 2173 var name = getName(i);
2175 if (name == null) name = '\$$i'; 2174 if (name == null) name = '\$$i';
2176 result.add(new Value(world.varType, name, false, /*needsTemp:*/false)); 2175 result.add(new Value(world.varType, name, false, /*needsTemp:*/false));
2177 } 2176 }
2178 return new Arguments(nodes, result); 2177 return new Arguments(nodes, result);
2179 } 2178 }
2180 } 2179 }
OLDNEW
« no previous file with comments | « frog/frogsh ('k') | frog/member.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698