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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 16008003: Reapply "Make int a double in argument type checks." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make getInterceptor recursive. Created 7 years, 6 months 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 | « no previous file | sdk/lib/_internal/compiler/implementation/lib/interceptors.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) 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
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');
1258 buffer.write('$holder.${namer.operatorIs(cls)}$_=${_}true$N'); 1257 buffer.write('$holder.${namer.operatorIs(cls)}$_=${_}true$N');
1259 Substitution substitution = check.substitution; 1258 Substitution substitution = check.substitution;
1260 if (substitution != null) { 1259 if (substitution != null) {
1261 String body = substitution.getCode(rti, false); 1260 String body = substitution.getCode(rti, false);
1262 buffer.write('$holder.${namer.substitutionName(cls)}$_=${_}$body$N'); 1261 buffer.write('$holder.${namer.substitutionName(cls)}$_=${_}$body$N');
1263 } 1262 }
1264 }; 1263 };
1265 } 1264 }
1266 } 1265 }
1267 1266
(...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 functions.push(property); 3251 functions.push(property);
3253 } else { 3252 } else {
3254 $$[property] = element; 3253 $$[property] = element;
3255 classes.push(property); 3254 classes.push(property);
3256 classes.push(element[""]); 3255 classes.push(element[""]);
3257 } 3256 }
3258 } 3257 }
3259 libraries.push([name, uri, classes, functions]); 3258 libraries.push([name, uri, classes, functions]);
3260 } 3259 }
3261 })'''; 3260 })''';
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/interceptors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698