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

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

Issue 10832136: Skeleton typedef type implementation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased and updated cf. comments 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 boolClass = lookupSpecialClass(const SourceString('bool')); 329 boolClass = lookupSpecialClass(const SourceString('bool'));
330 numClass = lookupSpecialClass(const SourceString('num')); 330 numClass = lookupSpecialClass(const SourceString('num'));
331 intClass = lookupSpecialClass(const SourceString('int')); 331 intClass = lookupSpecialClass(const SourceString('int'));
332 doubleClass = lookupSpecialClass(const SourceString('double')); 332 doubleClass = lookupSpecialClass(const SourceString('double'));
333 stringClass = lookupSpecialClass(const SourceString('String')); 333 stringClass = lookupSpecialClass(const SourceString('String'));
334 functionClass = lookupSpecialClass(const SourceString('Function')); 334 functionClass = lookupSpecialClass(const SourceString('Function'));
335 listClass = lookupSpecialClass(const SourceString('List')); 335 listClass = lookupSpecialClass(const SourceString('List'));
336 closureClass = lookupSpecialClass(const SourceString('Closure')); 336 closureClass = lookupSpecialClass(const SourceString('Closure'));
337 dynamicClass = lookupSpecialClass(const SourceString('Dynamic')); 337 dynamicClass = lookupSpecialClass(const SourceString('Dynamic'));
338 nullClass = lookupSpecialClass(const SourceString('Null')); 338 nullClass = lookupSpecialClass(const SourceString('Null'));
339 types = new Types(dynamicClass); 339 types = new Types(this, dynamicClass);
340 if (!coreLibValid) { 340 if (!coreLibValid) {
341 cancel('core library does not contain required classes'); 341 cancel('core library does not contain required classes');
342 } 342 }
343 343
344 jsIndexingBehaviorInterface = 344 jsIndexingBehaviorInterface =
345 findHelper(const SourceString('JavaScriptIndexingBehavior')); 345 findHelper(const SourceString('JavaScriptIndexingBehavior'));
346 } 346 }
347 347
348 void scanBuiltinLibraries() { 348 void scanBuiltinLibraries() {
349 coreImplLibrary = scanBuiltinLibrary('coreimpl'); 349 coreImplLibrary = scanBuiltinLibrary('coreimpl');
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 return withCurrentElement(element, 784 return withCurrentElement(element,
785 () => resolver.resolveSignature(element)); 785 () => resolver.resolveSignature(element));
786 } 786 }
787 787
788 FunctionSignature resolveFunctionExpression(Element element, 788 FunctionSignature resolveFunctionExpression(Element element,
789 FunctionExpression node) { 789 FunctionExpression node) {
790 return withCurrentElement(element, 790 return withCurrentElement(element,
791 () => resolver.resolveFunctionExpression(element, node)); 791 () => resolver.resolveFunctionExpression(element, node));
792 } 792 }
793 793
794 FunctionSignature resolveTypedef(TypedefElement element) { 794 void resolveTypedef(TypedefElement element) {
795 return withCurrentElement(element, 795 withCurrentElement(element,
796 () => resolver.resolveTypedef(element)); 796 () => resolver.resolveTypedef(element));
797 } 797 }
798 798
799 FunctionType computeFunctionType(Element element, 799 FunctionType computeFunctionType(Element element,
800 FunctionSignature signature) { 800 FunctionSignature signature) {
801 return withCurrentElement(element, 801 return withCurrentElement(element,
802 () => resolver.computeFunctionType(element, signature)); 802 () => resolver.computeFunctionType(element, signature));
803 } 803 }
804 804
805 Constant compileVariable(VariableElement element) { 805 Constant compileVariable(VariableElement element) {
806 return withCurrentElement(element, () { 806 return withCurrentElement(element, () {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 final endOffset = end.charOffset + end.slowCharCount; 955 final endOffset = end.charOffset + end.slowCharCount;
956 956
957 // [begin] and [end] might be the same for the same empty token. This 957 // [begin] and [end] might be the same for the same empty token. This
958 // happens for instance when scanning '$$'. 958 // happens for instance when scanning '$$'.
959 assert(endOffset >= beginOffset); 959 assert(endOffset >= beginOffset);
960 return f(beginOffset, endOffset); 960 return f(beginOffset, endOffset);
961 } 961 }
962 962
963 String toString() => 'SourceSpan($uri, $begin, $end)'; 963 String toString() => 'SourceSpan($uri, $begin, $end)';
964 } 964 }
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