| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../common_elements.dart'; | 10 import '../common_elements.dart'; |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 /// gives the locals map permission to also look one scope higher within the | 396 /// gives the locals map permission to also look one scope higher within the |
| 397 /// class for the corresponding local. This can happen in the case of free | 397 /// class for the corresponding local. This can happen in the case of free |
| 398 /// variables involved with a closure class. | 398 /// variables involved with a closure class. |
| 399 // TODO(efortuna, johnniwinther): convey this information without a boolean | 399 // TODO(efortuna, johnniwinther): convey this information without a boolean |
| 400 // parameter. | 400 // parameter. |
| 401 Local getLocalVariable(ir.VariableDeclaration node); | 401 Local getLocalVariable(ir.VariableDeclaration node); |
| 402 | 402 |
| 403 /// Returns the [ir.FunctionNode] that declared [parameter]. | 403 /// Returns the [ir.FunctionNode] that declared [parameter]. |
| 404 ir.FunctionNode getFunctionNodeForParameter(Local parameter); | 404 ir.FunctionNode getFunctionNodeForParameter(Local parameter); |
| 405 | 405 |
| 406 /// Returns the [ir.DartType] of [parameter]. | 406 /// Returns the [DartType] of [local]. |
| 407 ir.DartType getParameterType(Local parameter); | 407 DartType getLocalType(KernelToElementMap elementMap, Local local); |
| 408 | 408 |
| 409 /// Returns the [JumpTarget] for the break statement [node]. | 409 /// Returns the [JumpTarget] for the break statement [node]. |
| 410 JumpTarget getJumpTargetForBreak(ir.BreakStatement node); | 410 JumpTarget getJumpTargetForBreak(ir.BreakStatement node); |
| 411 | 411 |
| 412 /// Returns `true` if [node] should generate a `continue` to its [JumpTarget]. | 412 /// Returns `true` if [node] should generate a `continue` to its [JumpTarget]. |
| 413 bool generateContinueForBreak(ir.BreakStatement node); | 413 bool generateContinueForBreak(ir.BreakStatement node); |
| 414 | 414 |
| 415 /// Returns the [JumpTarget] defined by the labelled statement [node] or | 415 /// Returns the [JumpTarget] defined by the labelled statement [node] or |
| 416 /// `null` if [node] is not a jump target. | 416 /// `null` if [node] is not a jump target. |
| 417 JumpTarget getJumpTargetForLabel(ir.LabeledStatement node); | 417 JumpTarget getJumpTargetForLabel(ir.LabeledStatement node); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 uri = Uri.parse(node.location.file); | 472 uri = Uri.parse(node.location.file); |
| 473 break; | 473 break; |
| 474 } | 474 } |
| 475 node = node.parent; | 475 node = node.parent; |
| 476 } | 476 } |
| 477 if (uri != null) { | 477 if (uri != null) { |
| 478 return new SourceSpan(uri, offset, offset + 1); | 478 return new SourceSpan(uri, offset, offset + 1); |
| 479 } | 479 } |
| 480 return null; | 480 return null; |
| 481 } | 481 } |
| OLD | NEW |