Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Identifiers; | 8 import '../common/names.dart' show Identifiers; |
| 9 import '../common/resolution.dart' show Resolution, ParsingContext; | 9 import '../common/resolution.dart' show Resolution, ParsingContext; |
| 10 import '../compiler.dart' show Compiler; | 10 import '../compiler.dart' show Compiler; |
| (...skipping 3191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3202 | 3202 |
| 3203 bool get isTarget => isBreakTarget || isContinueTarget; | 3203 bool get isTarget => isBreakTarget || isContinueTarget; |
| 3204 | 3204 |
| 3205 String toString() => 'Label:${name}'; | 3205 String toString() => 'Label:${name}'; |
| 3206 } | 3206 } |
| 3207 | 3207 |
| 3208 class JumpTargetX implements JumpTarget { | 3208 class JumpTargetX implements JumpTarget { |
| 3209 final ExecutableElement executableContext; | 3209 final ExecutableElement executableContext; |
| 3210 final Node statement; | 3210 final Node statement; |
| 3211 final int nestingLevel; | 3211 final int nestingLevel; |
| 3212 Link<LabelDefinition> labels = const Link<LabelDefinition>(); | 3212 List<LabelDefinition> labels = <LabelDefinition>[]; |
| 3213 bool isBreakTarget = false; | 3213 bool isBreakTarget = false; |
| 3214 bool isContinueTarget = false; | 3214 bool isContinueTarget = false; |
| 3215 | 3215 |
| 3216 final int hashCode = ElementX.newHashCode(); | 3216 final int hashCode = ElementX.newHashCode(); |
| 3217 | 3217 |
| 3218 JumpTargetX(this.statement, this.nestingLevel, this.executableContext); | 3218 JumpTargetX(this.statement, this.nestingLevel, this.executableContext); |
| 3219 | 3219 |
| 3220 String get name => "target"; | 3220 String get name => "target"; |
| 3221 | 3221 |
| 3222 bool get isTarget => isBreakTarget || isContinueTarget; | 3222 bool get isTarget => isBreakTarget || isContinueTarget; |
| 3223 | 3223 |
| 3224 LabelDefinition addLabel(Label label, String labelName) { | 3224 LabelDefinition addLabel(Label label, String labelName) { |
| 3225 LabelDefinition result = new LabelDefinitionX(label, labelName, this); | 3225 LabelDefinition result = new LabelDefinitionX(label, labelName, this); |
| 3226 labels = labels.prepend(result); | 3226 labels.add(result); |
|
Siggi Cherem (dart-lang)
2016/12/17 00:43:16
It seems the order after this change will be rever
Harry Terkelsen
2016/12/17 00:50:36
The order doesn't matter because they are all labe
| |
| 3227 return result; | 3227 return result; |
| 3228 } | 3228 } |
| 3229 | 3229 |
| 3230 bool get isSwitch => statement is SwitchStatement; | 3230 bool get isSwitch => statement is SwitchStatement; |
| 3231 | 3231 |
| 3232 String toString() => 'Target:$statement'; | 3232 String toString() => 'Target:$statement'; |
| 3233 } | 3233 } |
| 3234 | 3234 |
| 3235 class TypeVariableElementX extends ElementX | 3235 class TypeVariableElementX extends ElementX |
| 3236 with AstElementMixin | 3236 with AstElementMixin |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3414 body = node.asFunctionExpression().body; | 3414 body = node.asFunctionExpression().body; |
| 3415 } | 3415 } |
| 3416 return new ParsedResolvedAst( | 3416 return new ParsedResolvedAst( |
| 3417 declaration, | 3417 declaration, |
| 3418 node, | 3418 node, |
| 3419 body, | 3419 body, |
| 3420 definingElement.treeElements, | 3420 definingElement.treeElements, |
| 3421 definingElement.compilationUnit.script.resourceUri); | 3421 definingElement.compilationUnit.script.resourceUri); |
| 3422 } | 3422 } |
| 3423 } | 3423 } |
| OLD | NEW |