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

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

Issue 891743002: Add support for super aliases to new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// This class should morph into something that makes it easy to build 7 /// This class should morph into something that makes it easy to build
8 /// JavaScript representations of libraries, class-sides, and instance-sides. 8 /// JavaScript representations of libraries, class-sides, and instance-sides.
9 /// Initially, it is just a placeholder for code that is moved from 9 /// Initially, it is just a placeholder for code that is moved from
10 /// [CodeEmitterTask]. 10 /// [CodeEmitterTask].
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 final FunctionElement member = method.element; 278 final FunctionElement member = method.element;
279 String name = method.name; 279 String name = method.name;
280 final FunctionSignature parameters = member.functionSignature; 280 final FunctionSignature parameters = member.functionSignature;
281 jsAst.Expression code = method.code; 281 jsAst.Expression code = method.code;
282 final bool needsStubs = method.needsStubs; 282 final bool needsStubs = method.needsStubs;
283 final bool canTearOff = method.needsTearOff; 283 final bool canTearOff = method.needsTearOff;
284 final String tearOffName = method.tearOffName; 284 final String tearOffName = method.tearOffName;
285 final bool canBeReflected = method.canBeReflected; 285 final bool canBeReflected = method.canBeReflected;
286 final bool canBeApplied = method.canBeApplied; 286 final bool canBeApplied = method.canBeApplied;
287 final bool isClosure = method is InstanceMethod && method.isClosure; 287 final bool isClosure = method is InstanceMethod && method.isClosure;
288 final bool hasSuperAlias = method is InstanceMethod && method.hasSuperAlias; 288 final bool hasSuperAlias = method is InstanceMethod &&
289 method.superAlias != null;
289 290
290 final bool needStructuredInfo = 291 final bool needStructuredInfo =
291 canTearOff || canBeReflected || canBeApplied || hasSuperAlias; 292 canTearOff || canBeReflected || canBeApplied || hasSuperAlias;
292 293
293 emitter.interceptorEmitter.recordMangledNameOfMemberMethod(member, name); 294 emitter.interceptorEmitter.recordMangledNameOfMemberMethod(member, name);
294 295
295 if (!needStructuredInfo) { 296 if (!needStructuredInfo) {
296 compiler.dumpInfoTask.registerElementAst(member, 297 compiler.dumpInfoTask.registerElementAst(member,
297 builder.addProperty(name, code)); 298 builder.addProperty(name, code));
298 for (AdapterStubMethod adapter in method.adapterStubs) { 299 for (AdapterStubMethod adapter in method.adapterStubs) {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 jsAst.ArrayInitializer arrayInit = 462 jsAst.ArrayInitializer arrayInit =
462 new jsAst.ArrayInitializer(expressions.toList()); 463 new jsAst.ArrayInitializer(expressions.toList());
463 compiler.dumpInfoTask.registerElementAst(member, 464 compiler.dumpInfoTask.registerElementAst(member,
464 builder.addProperty(name, arrayInit)); 465 builder.addProperty(name, arrayInit));
465 } 466 }
466 467
467 void addMemberField(Field field, ClassBuilder builder) { 468 void addMemberField(Field field, ClassBuilder builder) {
468 // For now, do nothing. 469 // For now, do nothing.
469 } 470 }
470 } 471 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698