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 #library('elements'); | 5 #library('elements'); |
| 6 | 6 |
| 7 #import('../tree/tree.dart'); | 7 #import('../tree/tree.dart'); |
| 8 #import('../scanner/scannerlib.dart'); | 8 #import('../scanner/scannerlib.dart'); |
| 9 #import('../leg.dart'); // TODO(karlklose): we only need type. | 9 #import('../leg.dart'); // TODO(karlklose): we only need type. |
| 10 #import('../util/util.dart'); | 10 #import('../util/util.dart'); |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 534 function(link.head); | 534 function(link.head); |
| 535 } | 535 } |
| 536 } | 536 } |
| 537 | 537 |
| 538 int get parameterCount() => requiredParameterCount + optionalParameterCount; | 538 int get parameterCount() => requiredParameterCount + optionalParameterCount; |
| 539 } | 539 } |
| 540 | 540 |
| 541 class FunctionElement extends Element { | 541 class FunctionElement extends Element { |
| 542 FunctionExpression cachedNode; | 542 FunctionExpression cachedNode; |
| 543 Type type; | 543 Type type; |
| 544 bool calledInLoop = false; | |
|
ngeoffray
2012/06/12 09:17:40
This doesn't belong here. An element is something
Mads Ager (google)
2012/06/12 11:01:56
Thanks Nicolas! That makes a lot of sense. I'll co
| |
| 544 final Modifiers modifiers; | 545 final Modifiers modifiers; |
| 545 | 546 |
| 546 FunctionSignature functionSignature; | 547 FunctionSignature functionSignature; |
| 547 | 548 |
| 548 /** | 549 /** |
| 549 * If this is an interface constructor, [defaultImplementation] will | 550 * If this is an interface constructor, [defaultImplementation] will |
| 550 * changed by the resolver to point to the default | 551 * changed by the resolver to point to the default |
| 551 * implementation. Otherwise, [:defaultImplementation === this:]. | 552 * implementation. Otherwise, [:defaultImplementation === this:]. |
| 552 */ | 553 */ |
| 553 FunctionElement defaultImplementation; | 554 FunctionElement defaultImplementation; |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1035 final Node node; | 1036 final Node node; |
| 1036 Type bound; | 1037 Type bound; |
| 1037 Type type; | 1038 Type type; |
| 1038 TypeVariableElement(name, Element enclosing, this.node, this.type, | 1039 TypeVariableElement(name, Element enclosing, this.node, this.type, |
| 1039 [this.bound]) | 1040 [this.bound]) |
| 1040 : super(name, ElementKind.TYPE_VARIABLE, enclosing); | 1041 : super(name, ElementKind.TYPE_VARIABLE, enclosing); |
| 1041 Type computeType(compiler) => type; | 1042 Type computeType(compiler) => type; |
| 1042 Node parseNode(compiler) => node; | 1043 Node parseNode(compiler) => node; |
| 1043 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 1044 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 1044 } | 1045 } |
| OLD | NEW |