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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 1135653005: dart2js: Cleanups and renames in runtime code that thouches types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 7
8 class OldEmitter implements Emitter { 8 class OldEmitter implements Emitter {
9 final Compiler compiler; 9 final Compiler compiler;
10 final CodeEmitterTask task; 10 final CodeEmitterTask task;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return globalPropertyAccess(element); 269 return globalPropertyAccess(element);
270 } 270 }
271 271
272 @override 272 @override
273 jsAst.Template templateForBuiltin(JsBuiltin builtin) { 273 jsAst.Template templateForBuiltin(JsBuiltin builtin) {
274 switch (builtin) { 274 switch (builtin) {
275 case JsBuiltin.dartObjectConstructor: 275 case JsBuiltin.dartObjectConstructor:
276 return jsAst.js.expressionTemplateYielding( 276 return jsAst.js.expressionTemplateYielding(
277 typeAccess(compiler.objectClass)); 277 typeAccess(compiler.objectClass));
278 278
279 case JsBuiltin.classNameFromIsCheckProperty: 279 case JsBuiltin.isCheckPropertyToJsConstructorName:
280 int isPrefixLength = namer.operatorIsPrefix.length; 280 int isPrefixLength = namer.operatorIsPrefix.length;
281 return jsAst.js.expressionTemplateFor('#.substring($isPrefixLength)'); 281 return jsAst.js.expressionTemplateFor('#.substring($isPrefixLength)');
282 282
283 case JsBuiltin.isFunctionType: 283 case JsBuiltin.isFunctionType:
284 return backend.rti.representationGenerator.templateForIsFunctionType; 284 return backend.rti.representationGenerator.templateForIsFunctionType;
285 285
286 case JsBuiltin.typeName: 286 case JsBuiltin.rawRtiToJsConstructorName:
287 return jsAst.js.expressionTemplateFor("#.$typeNameProperty"); 287 return jsAst.js.expressionTemplateFor("#.$typeNameProperty");
288 288
289 case JsBuiltin.rawRuntimeType: 289 case JsBuiltin.rawRuntimeType:
290 return jsAst.js.expressionTemplateFor("#.constructor"); 290 return jsAst.js.expressionTemplateFor("#.constructor");
291 291
292 case JsBuiltin.createFunctionType: 292 case JsBuiltin.createFunctionTypeRti:
293 return backend.rti.representationGenerator 293 return backend.rti.representationGenerator
294 .templateForCreateFunctionType; 294 .templateForCreateFunctionType;
295 295
296 case JsBuiltin.isSubtype: 296 case JsBuiltin.isSubtype:
297 // TODO(floitsch): move this closer to where is-check properties are 297 // TODO(floitsch): move this closer to where is-check properties are
298 // built. 298 // built.
299 String isPrefix = namer.operatorIsPrefix; 299 String isPrefix = namer.operatorIsPrefix;
300 return jsAst.js.expressionTemplateFor( 300 return jsAst.js.expressionTemplateFor(
301 "('$isPrefix' + #) in #.prototype"); 301 "('$isPrefix' + #) in #.prototype");
302 302
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 1964 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
1965 if (element.isInstanceMember) { 1965 if (element.isInstanceMember) {
1966 cachedClassBuilders.remove(element.enclosingClass); 1966 cachedClassBuilders.remove(element.enclosingClass);
1967 1967
1968 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 1968 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
1969 1969
1970 } 1970 }
1971 } 1971 }
1972 } 1972 }
1973 } 1973 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart ('k') | sdk/lib/_internal/compiler/js_lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698