| 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 import '../closure.dart'; | 5 import '../closure.dart'; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../common_elements.dart' show CommonElements; | 7 import '../common_elements.dart' show CommonElements; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 R visitBitAnd(HBitAnd node); | 31 R visitBitAnd(HBitAnd node); |
| 32 R visitBitNot(HBitNot node); | 32 R visitBitNot(HBitNot node); |
| 33 R visitBitOr(HBitOr node); | 33 R visitBitOr(HBitOr node); |
| 34 R visitBitXor(HBitXor node); | 34 R visitBitXor(HBitXor node); |
| 35 R visitBoolify(HBoolify node); | 35 R visitBoolify(HBoolify node); |
| 36 R visitBoundsCheck(HBoundsCheck node); | 36 R visitBoundsCheck(HBoundsCheck node); |
| 37 R visitBreak(HBreak node); | 37 R visitBreak(HBreak node); |
| 38 R visitConstant(HConstant node); | 38 R visitConstant(HConstant node); |
| 39 R visitContinue(HContinue node); | 39 R visitContinue(HContinue node); |
| 40 R visitCreate(HCreate node); | 40 R visitCreate(HCreate node); |
| 41 R visitCreateBox(HCreateBox node); |
| 41 R visitDivide(HDivide node); | 42 R visitDivide(HDivide node); |
| 42 R visitExit(HExit node); | 43 R visitExit(HExit node); |
| 43 R visitExitTry(HExitTry node); | 44 R visitExitTry(HExitTry node); |
| 44 R visitFieldGet(HFieldGet node); | 45 R visitFieldGet(HFieldGet node); |
| 45 R visitFieldSet(HFieldSet node); | 46 R visitFieldSet(HFieldSet node); |
| 46 R visitForeignCode(HForeignCode node); | 47 R visitForeignCode(HForeignCode node); |
| 47 R visitGetLength(HGetLength node); | 48 R visitGetLength(HGetLength node); |
| 48 R visitGoto(HGoto node); | 49 R visitGoto(HGoto node); |
| 49 R visitGreater(HGreater node); | 50 R visitGreater(HGreater node); |
| 50 R visitGreaterEqual(HGreaterEqual node); | 51 R visitGreaterEqual(HGreaterEqual node); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 visitBitNot(HBitNot node) => visitInvokeUnary(node); | 389 visitBitNot(HBitNot node) => visitInvokeUnary(node); |
| 389 visitBitOr(HBitOr node) => visitBinaryBitOp(node); | 390 visitBitOr(HBitOr node) => visitBinaryBitOp(node); |
| 390 visitBitXor(HBitXor node) => visitBinaryBitOp(node); | 391 visitBitXor(HBitXor node) => visitBinaryBitOp(node); |
| 391 visitBoolify(HBoolify node) => visitInstruction(node); | 392 visitBoolify(HBoolify node) => visitInstruction(node); |
| 392 visitBoundsCheck(HBoundsCheck node) => visitCheck(node); | 393 visitBoundsCheck(HBoundsCheck node) => visitCheck(node); |
| 393 visitBreak(HBreak node) => visitJump(node); | 394 visitBreak(HBreak node) => visitJump(node); |
| 394 visitContinue(HContinue node) => visitJump(node); | 395 visitContinue(HContinue node) => visitJump(node); |
| 395 visitCheck(HCheck node) => visitInstruction(node); | 396 visitCheck(HCheck node) => visitInstruction(node); |
| 396 visitConstant(HConstant node) => visitInstruction(node); | 397 visitConstant(HConstant node) => visitInstruction(node); |
| 397 visitCreate(HCreate node) => visitInstruction(node); | 398 visitCreate(HCreate node) => visitInstruction(node); |
| 399 visitCreateBox(HCreateBox node) => visitInstruction(node); |
| 398 visitDivide(HDivide node) => visitBinaryArithmetic(node); | 400 visitDivide(HDivide node) => visitBinaryArithmetic(node); |
| 399 visitExit(HExit node) => visitControlFlow(node); | 401 visitExit(HExit node) => visitControlFlow(node); |
| 400 visitExitTry(HExitTry node) => visitControlFlow(node); | 402 visitExitTry(HExitTry node) => visitControlFlow(node); |
| 401 visitFieldGet(HFieldGet node) => visitFieldAccess(node); | 403 visitFieldGet(HFieldGet node) => visitFieldAccess(node); |
| 402 visitFieldSet(HFieldSet node) => visitFieldAccess(node); | 404 visitFieldSet(HFieldSet node) => visitFieldAccess(node); |
| 403 visitForeignCode(HForeignCode node) => visitInstruction(node); | 405 visitForeignCode(HForeignCode node) => visitInstruction(node); |
| 404 visitGetLength(HGetLength node) => visitInstruction(node); | 406 visitGetLength(HGetLength node) => visitInstruction(node); |
| 405 visitGoto(HGoto node) => visitControlFlow(node); | 407 visitGoto(HGoto node) => visitControlFlow(node); |
| 406 visitGreater(HGreater node) => visitRelational(node); | 408 visitGreater(HGreater node) => visitRelational(node); |
| 407 visitGreaterEqual(HGreaterEqual node) => visitRelational(node); | 409 visitGreaterEqual(HGreaterEqual node) => visitRelational(node); |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 HInstruction get rtiInput { | 1644 HInstruction get rtiInput { |
| 1643 assert(hasRtiInput); | 1645 assert(hasRtiInput); |
| 1644 return inputs.last; | 1646 return inputs.last; |
| 1645 } | 1647 } |
| 1646 | 1648 |
| 1647 accept(HVisitor visitor) => visitor.visitCreate(this); | 1649 accept(HVisitor visitor) => visitor.visitCreate(this); |
| 1648 | 1650 |
| 1649 String toString() => 'HCreate($element, ${instantiatedTypes})'; | 1651 String toString() => 'HCreate($element, ${instantiatedTypes})'; |
| 1650 } | 1652 } |
| 1651 | 1653 |
| 1654 // Allocates a box to hold mutated captured variables. |
| 1655 class HCreateBox extends HInstruction { |
| 1656 HCreateBox(TypeMask type) : super(<HInstruction>[], type); |
| 1657 |
| 1658 bool get isAllocation => true; |
| 1659 |
| 1660 accept(HVisitor visitor) => visitor.visitCreateBox(this); |
| 1661 |
| 1662 String toString() => 'HCreateBox()'; |
| 1663 } |
| 1664 |
| 1652 abstract class HInvoke extends HInstruction { | 1665 abstract class HInvoke extends HInstruction { |
| 1653 /** | 1666 /** |
| 1654 * The first argument must be the target: either an [HStatic] node, or | 1667 * The first argument must be the target: either an [HStatic] node, or |
| 1655 * the receiver of a method-call. The remaining inputs are the arguments | 1668 * the receiver of a method-call. The remaining inputs are the arguments |
| 1656 * to the invocation. | 1669 * to the invocation. |
| 1657 */ | 1670 */ |
| 1658 HInvoke(List<HInstruction> inputs, type) : super(inputs, type) { | 1671 HInvoke(List<HInstruction> inputs, type) : super(inputs, type) { |
| 1659 sideEffects.setAllSideEffects(); | 1672 sideEffects.setAllSideEffects(); |
| 1660 sideEffects.setDependsOnSomething(); | 1673 sideEffects.setDependsOnSomething(); |
| 1661 } | 1674 } |
| (...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3531 // ignore: MISSING_RETURN | 3544 // ignore: MISSING_RETURN |
| 3532 String get kindAsString { | 3545 String get kindAsString { |
| 3533 switch (kind) { | 3546 switch (kind) { |
| 3534 case TypeInfoExpressionKind.COMPLETE: | 3547 case TypeInfoExpressionKind.COMPLETE: |
| 3535 return 'COMPLETE'; | 3548 return 'COMPLETE'; |
| 3536 case TypeInfoExpressionKind.INSTANCE: | 3549 case TypeInfoExpressionKind.INSTANCE: |
| 3537 return 'INSTANCE'; | 3550 return 'INSTANCE'; |
| 3538 } | 3551 } |
| 3539 } | 3552 } |
| 3540 } | 3553 } |
| OLD | NEW |