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 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2490 MessageKind.NAMED_FUNCTION_EXPRESSION, | 2490 MessageKind.NAMED_FUNCTION_EXPRESSION, |
| 2491 {'name': node.name}); | 2491 {'name': node.name}); |
| 2492 } | 2492 } |
| 2493 visit(node.returnType); | 2493 visit(node.returnType); |
| 2494 String name; | 2494 String name; |
| 2495 if (node.name == null) { | 2495 if (node.name == null) { |
| 2496 name = ""; | 2496 name = ""; |
| 2497 } else { | 2497 } else { |
| 2498 name = node.name.asIdentifier().source; | 2498 name = node.name.asIdentifier().source; |
| 2499 } | 2499 } |
| 2500 Modifiers modifiers = node.name == null | |
| 2501 ? Modifiers.EMPTY | |
| 2502 : new Modifiers.withFlags(new NodeList.empty(), Modifiers.FLAG_FINAL); | |
| 2500 LocalFunctionElementX function = new LocalFunctionElementX( | 2503 LocalFunctionElementX function = new LocalFunctionElementX( |
| 2501 name, node, ElementKind.FUNCTION, Modifiers.EMPTY, | 2504 name, node, ElementKind.FUNCTION, modifiers, enclosingElement); |
|
Johnni Winther
2015/04/10 11:49:43
The .isFinal property means 'declaratively final'
Siggi Cherem (dart-lang)
2015/04/11 00:12:21
thanks, I was not very keen of this approach, but
| |
| 2502 enclosingElement); | |
| 2503 ResolverTask.processAsyncMarker(compiler, function, registry); | 2505 ResolverTask.processAsyncMarker(compiler, function, registry); |
| 2504 function.functionSignatureCache = SignatureResolver.analyze( | 2506 function.functionSignatureCache = SignatureResolver.analyze( |
| 2505 compiler, | 2507 compiler, |
| 2506 node.parameters, | 2508 node.parameters, |
| 2507 node.returnType, | 2509 node.returnType, |
| 2508 function, | 2510 function, |
| 2509 registry, | 2511 registry, |
| 2510 createRealParameters: true, | 2512 createRealParameters: true, |
| 2511 isFunctionExpression: !inFunctionDeclaration); | 2513 isFunctionExpression: !inFunctionDeclaration); |
| 2512 checkLocalDefinitionName(node, function); | 2514 checkLocalDefinitionName(node, function); |
| (...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5077 } | 5079 } |
| 5078 | 5080 |
| 5079 /// The result for the resolution of the `assert` method. | 5081 /// The result for the resolution of the `assert` method. |
| 5080 class AssertResult implements ResolutionResult { | 5082 class AssertResult implements ResolutionResult { |
| 5081 const AssertResult(); | 5083 const AssertResult(); |
| 5082 | 5084 |
| 5083 Element get element => null; | 5085 Element get element => null; |
| 5084 | 5086 |
| 5085 String toString() => 'AssertResult()'; | 5087 String toString() => 'AssertResult()'; |
| 5086 } | 5088 } |
| OLD | NEW |