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

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

Issue 740273003: Incremental compiler: support optional arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add TODO for a follow-up CL. Created 6 years 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 FunctionSignature parameters = member.functionSignature; 357 FunctionSignature parameters = member.functionSignature;
358 bool needsStubs = !parameters.optionalParameters.isEmpty; 358 bool needsStubs = !parameters.optionalParameters.isEmpty;
359 bool canTearOff = false; 359 bool canTearOff = false;
360 bool isClosure = false; 360 bool isClosure = false;
361 bool isNotApplyTarget = !member.isFunction || 361 bool isNotApplyTarget = !member.isFunction ||
362 member.isConstructor || 362 member.isConstructor ||
363 member.isAccessor; 363 member.isAccessor;
364 String tearOffName; 364 String tearOffName;
365 365
366 final bool canBeReflected = backend.isAccessibleByReflection(member); 366
367 final bool canBeReflected = backend.isAccessibleByReflection(member) ||
368 // During incremental compilation, we have to assume that reflection
369 // *might* get enabled.
370 compiler.hasIncrementalSupport;
367 371
368 if (isNotApplyTarget) { 372 if (isNotApplyTarget) {
369 canTearOff = false; 373 canTearOff = false;
370 } else if (member.isInstanceMember) { 374 } else if (member.isInstanceMember) {
371 if (member.enclosingClass.isClosure) { 375 if (member.enclosingClass.isClosure) {
372 canTearOff = false; 376 canTearOff = false;
373 isClosure = true; 377 isClosure = true;
374 } else { 378 } else {
375 // Careful with operators. 379 // Careful with operators.
376 canTearOff = 380 canTearOff =
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 assert(code != null); 637 assert(code != null);
634 assert(needsStubs != null); 638 assert(needsStubs != null);
635 assert(canTearOff != null); 639 assert(canTearOff != null);
636 assert(isClosure != null); 640 assert(isClosure != null);
637 assert(tearOffName != null || !canTearOff); 641 assert(tearOffName != null || !canTearOff);
638 assert(canBeReflected != null); 642 assert(canBeReflected != null);
639 assert(canBeApplied != null); 643 assert(canBeApplied != null);
640 assert(needStructuredInfo != null); 644 assert(needStructuredInfo != null);
641 } 645 }
642 } 646 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698