| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 FunctionSignature resolveSignature(FunctionElement element) { | 332 FunctionSignature resolveSignature(FunctionElement element) { |
| 333 return compiler.withCurrentElement(element, () { | 333 return compiler.withCurrentElement(element, () { |
| 334 FunctionExpression node = | 334 FunctionExpression node = |
| 335 compiler.parser.measure(() => element.parseNode(compiler)); | 335 compiler.parser.measure(() => element.parseNode(compiler)); |
| 336 return measure(() => SignatureResolver.analyze( | 336 return measure(() => SignatureResolver.analyze( |
| 337 compiler, node.parameters, node.returnType, element)); | 337 compiler, node.parameters, node.returnType, element)); |
| 338 }); | 338 }); |
| 339 } | 339 } |
| 340 | 340 |
| 341 FunctionSignature resolveFunctionExpression(Element element, |
| 342 FunctionExpression node) { |
| 343 return measure(() => SignatureResolver.analyze( |
| 344 compiler, node.parameters, node.returnType, element)); |
| 345 } |
| 346 |
| 341 FunctionSignature resolveTypedef(TypedefElement element) { | 347 FunctionSignature resolveTypedef(TypedefElement element) { |
| 342 return compiler.withCurrentElement(element, () { | 348 return compiler.withCurrentElement(element, () { |
| 343 Typedef node = | 349 Typedef node = |
| 344 compiler.parser.measure(() => element.parseNode(compiler)); | 350 compiler.parser.measure(() => element.parseNode(compiler)); |
| 345 return measure(() => SignatureResolver.analyze( | 351 return measure(() => SignatureResolver.analyze( |
| 346 compiler, node.formals, node.returnType, element)); | 352 compiler, node.formals, node.returnType, element)); |
| 347 }); | 353 }); |
| 348 } | 354 } |
| 349 | 355 |
| 350 FunctionType computeFunctionType(Element element, | 356 FunctionType computeFunctionType(Element element, |
| (...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2205 | 2211 |
| 2206 TopScope(LibraryElement library) : super(null, library); | 2212 TopScope(LibraryElement library) : super(null, library); |
| 2207 Element lookup(SourceString name) { | 2213 Element lookup(SourceString name) { |
| 2208 return library.find(name); | 2214 return library.find(name); |
| 2209 } | 2215 } |
| 2210 | 2216 |
| 2211 Element add(Element newElement) { | 2217 Element add(Element newElement) { |
| 2212 throw "Cannot add an element in the top scope"; | 2218 throw "Cannot add an element in the top scope"; |
| 2213 } | 2219 } |
| 2214 } | 2220 } |
| OLD | NEW |