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

Side by Side Diff: lib/compiler/implementation/compiler.dart

Issue 10834270: Implement call operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify nested loop and add TODO.p Created 8 years, 4 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 | lib/compiler/implementation/elements/elements.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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 final bool REPORT_EXCESS_RESOLUTION = false; 10 final bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 PatchParserTask patchParser; 123 PatchParserTask patchParser;
124 TreeValidatorTask validator; 124 TreeValidatorTask validator;
125 ResolverTask resolver; 125 ResolverTask resolver;
126 TypeCheckerTask checker; 126 TypeCheckerTask checker;
127 ti.TypesTask typesTask; 127 ti.TypesTask typesTask;
128 Backend backend; 128 Backend backend;
129 ConstantHandler constantHandler; 129 ConstantHandler constantHandler;
130 EnqueueTask enqueuer; 130 EnqueueTask enqueuer;
131 131
132 static final SourceString MAIN = const SourceString('main'); 132 static final SourceString MAIN = const SourceString('main');
133 static final SourceString CALL_OPERATOR_NAME = const SourceString('call');
133 static final SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); 134 static final SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod');
134 static final SourceString NO_SUCH_METHOD_EXCEPTION = 135 static final SourceString NO_SUCH_METHOD_EXCEPTION =
135 const SourceString('NoSuchMethodException'); 136 const SourceString('NoSuchMethodException');
136 static final SourceString START_ROOT_ISOLATE = 137 static final SourceString START_ROOT_ISOLATE =
137 const SourceString('startRootIsolate'); 138 const SourceString('startRootIsolate');
138 bool enabledNoSuchMethod = false; 139 bool enabledNoSuchMethod = false;
139 140
140 Stopwatch progress; 141 Stopwatch progress;
141 142
142 static final int PHASE_SCANNING = 0; 143 static final int PHASE_SCANNING = 0;
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 614
614 void processQueue(Enqueuer world, Element main) { 615 void processQueue(Enqueuer world, Element main) {
615 backend.processNativeClasses(world, libraries.getValues()); 616 backend.processNativeClasses(world, libraries.getValues());
616 world.addToWorkList(main); 617 world.addToWorkList(main);
617 progress.reset(); 618 progress.reset();
618 world.forEach((WorkItem work) { 619 world.forEach((WorkItem work) {
619 withCurrentElement(work.element, () => work.run(this, world)); 620 withCurrentElement(work.element, () => work.run(this, world));
620 }); 621 });
621 world.queueIsClosed = true; 622 world.queueIsClosed = true;
622 assert(world.checkNoEnqueuedInvokedInstanceMethods()); 623 assert(world.checkNoEnqueuedInvokedInstanceMethods());
623 world.registerFieldClosureInvocations();
624 } 624 }
625 625
626 void processRecompilationQueue(Enqueuer world) { 626 void processRecompilationQueue(Enqueuer world) {
627 assert(phase == PHASE_RECOMPILING); 627 assert(phase == PHASE_RECOMPILING);
628 while (!world.recompilationCandidates.isEmpty()) { 628 while (!world.recompilationCandidates.isEmpty()) {
629 WorkItem work = world.recompilationCandidates.next(); 629 WorkItem work = world.recompilationCandidates.next();
630 CodeBuffer oldCode = world.universe.generatedCode[work.element]; 630 CodeBuffer oldCode = world.universe.generatedCode[work.element];
631 world.universe.generatedCode.remove(work.element); 631 world.universe.generatedCode.remove(work.element);
632 world.universe.generatedBailoutCode.remove(work.element); 632 world.universe.generatedBailoutCode.remove(work.element);
633 withCurrentElement(work.element, () => work.run(this, world)); 633 withCurrentElement(work.element, () => work.run(this, world));
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 final endOffset = end.charOffset + end.slowCharCount; 946 final endOffset = end.charOffset + end.slowCharCount;
947 947
948 // [begin] and [end] might be the same for the same empty token. This 948 // [begin] and [end] might be the same for the same empty token. This
949 // happens for instance when scanning '$$'. 949 // happens for instance when scanning '$$'.
950 assert(endOffset >= beginOffset); 950 assert(endOffset >= beginOffset);
951 return f(beginOffset, endOffset); 951 return f(beginOffset, endOffset);
952 } 952 }
953 953
954 String toString() => 'SourceSpan($uri, $begin, $end)'; 954 String toString() => 'SourceSpan($uri, $begin, $end)';
955 } 955 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698