Chromium Code Reviews| 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 part of resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 AnalyzableElement get analyzedElement; | 8 AnalyzableElement get analyzedElement; |
| 9 Iterable<Node> get superUses; | 9 Iterable<Node> get superUses; |
| 10 | 10 |
| (...skipping 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2463 visit(node.returnType); | 2463 visit(node.returnType); |
| 2464 String name; | 2464 String name; |
| 2465 if (node.name == null) { | 2465 if (node.name == null) { |
| 2466 name = ""; | 2466 name = ""; |
| 2467 } else { | 2467 } else { |
| 2468 name = node.name.asIdentifier().source; | 2468 name = node.name.asIdentifier().source; |
| 2469 } | 2469 } |
| 2470 LocalFunctionElementX function = new LocalFunctionElementX( | 2470 LocalFunctionElementX function = new LocalFunctionElementX( |
| 2471 name, node, ElementKind.FUNCTION, Modifiers.EMPTY, | 2471 name, node, ElementKind.FUNCTION, Modifiers.EMPTY, |
| 2472 enclosingElement); | 2472 enclosingElement); |
| 2473 function.functionSignatureCache = | |
| 2474 SignatureResolver.analyze(compiler, node.parameters, node.returnType, | |
| 2475 function, registry, createRealParameters: true); | |
| 2476 ResolverTask.processAsyncMarker(compiler, function); | 2473 ResolverTask.processAsyncMarker(compiler, function); |
| 2474 function.functionSignatureCache = SignatureResolver.analyze( | |
| 2475 compiler, | |
| 2476 node.parameters, | |
| 2477 node.returnType, | |
| 2478 function, | |
| 2479 registry, | |
| 2480 createRealParameters: true, | |
| 2481 asyncMarker: | |
| 2482 inFunctionDeclaration ? AsyncMarker.SYNC : function.asyncMarker); | |
|
floitsch
2015/02/04 15:44:57
What does 'inFunctionDeclaration' do?
Why does it
Johnni Winther
2015/02/05 08:48:32
[inFunctionDeclaration] is `true` if [function] is
| |
| 2477 checkLocalDefinitionName(node, function); | 2483 checkLocalDefinitionName(node, function); |
| 2478 registry.defineFunction(node, function); | 2484 registry.defineFunction(node, function); |
| 2479 if (doAddToScope) { | 2485 if (doAddToScope) { |
| 2480 addToScope(function); | 2486 addToScope(function); |
| 2481 } | 2487 } |
| 2482 Scope oldScope = scope; // The scope is modified by [setupFunction]. | 2488 Scope oldScope = scope; // The scope is modified by [setupFunction]. |
| 2483 setupFunction(node, function); | 2489 setupFunction(node, function); |
| 2484 | 2490 |
| 2485 Element previousEnclosingElement = enclosingElement; | 2491 Element previousEnclosingElement = enclosingElement; |
| 2486 enclosingElement = function; | 2492 enclosingElement = function; |
| (...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5026 } | 5032 } |
| 5027 | 5033 |
| 5028 /// The result for the resolution of the `assert` method. | 5034 /// The result for the resolution of the `assert` method. |
| 5029 class AssertResult implements ResolutionResult { | 5035 class AssertResult implements ResolutionResult { |
| 5030 const AssertResult(); | 5036 const AssertResult(); |
| 5031 | 5037 |
| 5032 Element get element => null; | 5038 Element get element => null; |
| 5033 | 5039 |
| 5034 String toString() => 'AssertResult()'; | 5040 String toString() => 'AssertResult()'; |
| 5035 } | 5041 } |
| OLD | NEW |