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

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

Issue 10918047: First corelib cleanup patch after unification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bogus comment. Created 8 years, 3 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) 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 const bool REPORT_EXCESS_RESOLUTION = false; 10 const bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 // error" or "not implemented yet", so the vicinity is good 819 // error" or "not implemented yet", so the vicinity is good
820 // enough for now. 820 // enough for now.
821 element = element.enclosingElement; 821 element = element.enclosingElement;
822 // TODO(ahe): I plan to overhaul this infrastructure anyways. 822 // TODO(ahe): I plan to overhaul this infrastructure anyways.
823 } 823 }
824 if (element === null) { 824 if (element === null) {
825 element = currentElement; 825 element = currentElement;
826 } 826 }
827 Token position = element.position(); 827 Token position = element.position();
828 Uri uri = element.getCompilationUnit().script.uri; 828 Uri uri = element.getCompilationUnit().script.uri;
829
830 // TODO(ager,johnniwinther): The patch support should be
831 // reworked to allow us to get rid of this.
832 if (element.isPatched) {
833 position = element.patch.position();
834 uri = element.patch.getCompilationUnit().script.uri;
835 }
836
829 return (position === null) 837 return (position === null)
830 ? new SourceSpan(uri, 0, 0) 838 ? new SourceSpan(uri, 0, 0)
831 : spanFromTokens(position, position, uri); 839 : spanFromTokens(position, position, uri);
832 } 840 }
833 841
834 Script readScript(Uri uri, [ScriptTag node]) { 842 Script readScript(Uri uri, [ScriptTag node]) {
835 unimplemented('Compiler.readScript'); 843 unimplemented('Compiler.readScript');
836 } 844 }
837 845
838 String get legDirectory { 846 String get legDirectory {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 final endOffset = end.charOffset + end.slowCharCount; 916 final endOffset = end.charOffset + end.slowCharCount;
909 917
910 // [begin] and [end] might be the same for the same empty token. This 918 // [begin] and [end] might be the same for the same empty token. This
911 // happens for instance when scanning '$$'. 919 // happens for instance when scanning '$$'.
912 assert(endOffset >= beginOffset); 920 assert(endOffset >= beginOffset);
913 return f(beginOffset, endOffset); 921 return f(beginOffset, endOffset);
914 } 922 }
915 923
916 String toString() => 'SourceSpan($uri, $begin, $end)'; 924 String toString() => 'SourceSpan($uri, $begin, $end)';
917 } 925 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698