| OLD | NEW |
| 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 interface TreeElements { | 5 interface TreeElements { |
| 6 Element operator[](Node node); | 6 Element operator[](Node node); |
| 7 Selector getSelector(Send send); | 7 Selector getSelector(Send send); |
| 8 Type getType(TypeAnnotation annotation); | 8 Type getType(TypeAnnotation annotation); |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 !link.isEmpty(); | 432 !link.isEmpty(); |
| 433 link = link.tail) { | 433 link = link.tail) { |
| 434 parameterTypes.addLast(link.head.computeType(compiler)); | 434 parameterTypes.addLast(link.head.computeType(compiler)); |
| 435 // TODO(karlklose): optional parameters. | 435 // TODO(karlklose): optional parameters. |
| 436 } | 436 } |
| 437 return new FunctionType(signature.returnType, | 437 return new FunctionType(signature.returnType, |
| 438 parameterTypes.toLink(), | 438 parameterTypes.toLink(), |
| 439 element); | 439 element); |
| 440 } | 440 } |
| 441 | 441 |
| 442 void resolveMetadataAnnotation(MetadataAnnotation annotation) { | 442 void resolveMetadataAnnotation(PartialMetadataAnnotation annotation) { |
| 443 compiler.withCurrentElement(annotation.annotatedElement, () => measure(() { | 443 compiler.withCurrentElement(annotation.annotatedElement, () => measure(() { |
| 444 assert(annotation.resolutionState == STATE_NOT_STARTED); | 444 assert(annotation.resolutionState == STATE_NOT_STARTED); |
| 445 annotation.resolutionState = STATE_STARTED; | 445 annotation.resolutionState = STATE_STARTED; |
| 446 | 446 |
| 447 Node node = annotation.parseNode(compiler); | 447 Node node = annotation.parseNode(compiler); |
| 448 ResolverVisitor visitor = | 448 ResolverVisitor visitor = |
| 449 new ResolverVisitor(compiler, annotation.annotatedElement); | 449 new ResolverVisitor(compiler, annotation.annotatedElement); |
| 450 node.accept(visitor); | 450 node.accept(visitor); |
| 451 annotation.value = compiler.constantHandler.compileNodeWithDefinitions( | 451 annotation.value = compiler.constantHandler.compileNodeWithDefinitions( |
| 452 node, visitor.mapping); | 452 node, visitor.mapping); |
| (...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2606 TopScope(LibraryElement library) : super(null, library); | 2606 TopScope(LibraryElement library) : super(null, library); |
| 2607 Element lookup(SourceString name) { | 2607 Element lookup(SourceString name) { |
| 2608 return library.find(name); | 2608 return library.find(name); |
| 2609 } | 2609 } |
| 2610 | 2610 |
| 2611 Element add(Element newElement) { | 2611 Element add(Element newElement) { |
| 2612 throw "Cannot add an element in the top scope"; | 2612 throw "Cannot add an element in the top scope"; |
| 2613 } | 2613 } |
| 2614 String toString() => '$element'; | 2614 String toString() => '$element'; |
| 2615 } | 2615 } |
| OLD | NEW |