| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A function element that represents a closure call. The signature is copied | 8 * A function element that represents a closure call. The signature is copied |
| 9 * from the given element. | 9 * from the given element. |
| 10 */ | 10 */ |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 | 1247 |
| 1248 void emitRuntimeTypeSupport(CodeBuffer buffer) { | 1248 void emitRuntimeTypeSupport(CodeBuffer buffer) { |
| 1249 RuntimeTypes rti = backend.rti; | 1249 RuntimeTypes rti = backend.rti; |
| 1250 TypeChecks typeChecks = rti.requiredChecks; | 1250 TypeChecks typeChecks = rti.requiredChecks; |
| 1251 | 1251 |
| 1252 // Add checks to the constructors of instantiated classes. | 1252 // Add checks to the constructors of instantiated classes. |
| 1253 for (ClassElement cls in typeChecks) { | 1253 for (ClassElement cls in typeChecks) { |
| 1254 String holder = namer.isolateAccess(backend.getImplementationClass(cls)); | 1254 String holder = namer.isolateAccess(backend.getImplementationClass(cls)); |
| 1255 for (TypeCheck check in typeChecks[cls]) { | 1255 for (TypeCheck check in typeChecks[cls]) { |
| 1256 ClassElement cls = check.cls; | 1256 ClassElement cls = check.cls; |
| 1257 buffer.write('$holder.${namer.operatorIs(check.cls)}$_=${_}true$N'); |
| 1257 buffer.write('$holder.${namer.operatorIs(cls)}$_=${_}true$N'); | 1258 buffer.write('$holder.${namer.operatorIs(cls)}$_=${_}true$N'); |
| 1258 Substitution substitution = check.substitution; | 1259 Substitution substitution = check.substitution; |
| 1259 if (substitution != null) { | 1260 if (substitution != null) { |
| 1260 String body = substitution.getCode(rti, false); | 1261 String body = substitution.getCode(rti, false); |
| 1261 buffer.write('$holder.${namer.substitutionName(cls)}$_=${_}$body$N'); | 1262 buffer.write('$holder.${namer.substitutionName(cls)}$_=${_}$body$N'); |
| 1262 } | 1263 } |
| 1263 }; | 1264 }; |
| 1264 } | 1265 } |
| 1265 } | 1266 } |
| 1266 | 1267 |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3238 } else { | 3239 } else { |
| 3239 $$[property] = element; | 3240 $$[property] = element; |
| 3240 classes.push(property); | 3241 classes.push(property); |
| 3241 classes.push(element[""]); | 3242 classes.push(element[""]); |
| 3242 } | 3243 } |
| 3243 } | 3244 } |
| 3244 var uri = ".../library" + i + ".dart"; | 3245 var uri = ".../library" + i + ".dart"; |
| 3245 libraries.push([name, uri, classes, functions]); | 3246 libraries.push([name, uri, classes, functions]); |
| 3246 } | 3247 } |
| 3247 })'''; | 3248 })'''; |
| OLD | NEW |