| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface HVisitor<R> { | 5 interface HVisitor<R> { |
| 6 R visitAdd(HAdd node); | 6 R visitAdd(HAdd node); |
| 7 R visitBitAnd(HBitAnd node); | 7 R visitBitAnd(HBitAnd node); |
| 8 R visitBitNot(HBitNot node); | 8 R visitBitNot(HBitNot node); |
| 9 R visitBitOr(HBitOr node); | 9 R visitBitOr(HBitOr node); |
| 10 R visitBitXor(HBitXor node); | 10 R visitBitXor(HBitXor node); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 visitControlFlow(HControlFlow node) => visitInstruction(node); | 247 visitControlFlow(HControlFlow node) => visitInstruction(node); |
| 248 visitRelational(HRelational node) => visitInvokeBinary(node); | 248 visitRelational(HRelational node) => visitInvokeBinary(node); |
| 249 | 249 |
| 250 visitAdd(HAdd node) => visitBinaryArithmetic(node); | 250 visitAdd(HAdd node) => visitBinaryArithmetic(node); |
| 251 visitBitAnd(HBitAnd node) => visitBinaryBitOp(node); | 251 visitBitAnd(HBitAnd node) => visitBinaryBitOp(node); |
| 252 visitBitNot(HBitNot node) => visitInvokeUnary(node); | 252 visitBitNot(HBitNot node) => visitInvokeUnary(node); |
| 253 visitBitOr(HBitOr node) => visitBinaryBitOp(node); | 253 visitBitOr(HBitOr node) => visitBinaryBitOp(node); |
| 254 visitBitXor(HBitXor node) => visitBinaryBitOp(node); | 254 visitBitXor(HBitXor node) => visitBinaryBitOp(node); |
| 255 visitBoolify(HBoolify node) => visitInstruction(node); | 255 visitBoolify(HBoolify node) => visitInstruction(node); |
| 256 visitBoundsCheck(HBoundsCheck node) => visitCheck(node); | 256 visitBoundsCheck(HBoundsCheck node) => visitCheck(node); |
| 257 visitBreak(HBreak node) => visitGoto(node); | 257 visitBreak(HBreak node) => visitJump(node); |
| 258 visitContinue(HContinue node) => visitGoto(node); | 258 visitContinue(HContinue node) => visitJump(node); |
| 259 visitCheck(HCheck node) => visitInstruction(node); | 259 visitCheck(HCheck node) => visitInstruction(node); |
| 260 visitConstant(HConstant node) => visitInstruction(node); | 260 visitConstant(HConstant node) => visitInstruction(node); |
| 261 visitDivide(HDivide node) => visitBinaryArithmetic(node); | 261 visitDivide(HDivide node) => visitBinaryArithmetic(node); |
| 262 visitEquals(HEquals node) => visitRelational(node); | 262 visitEquals(HEquals node) => visitRelational(node); |
| 263 visitExit(HExit node) => visitControlFlow(node); | 263 visitExit(HExit node) => visitControlFlow(node); |
| 264 visitFieldGet(HFieldGet node) => visitInstruction(node); | 264 visitFieldGet(HFieldGet node) => visitInstruction(node); |
| 265 visitFieldSet(HFieldSet node) => visitInstruction(node); | 265 visitFieldSet(HFieldSet node) => visitInstruction(node); |
| 266 visitForeign(HForeign node) => visitInstruction(node); | 266 visitForeign(HForeign node) => visitInstruction(node); |
| 267 visitForeignNew(HForeignNew node) => visitForeign(node); | 267 visitForeignNew(HForeignNew node) => visitForeign(node); |
| 268 visitGoto(HGoto node) => visitControlFlow(node); | 268 visitGoto(HGoto node) => visitControlFlow(node); |
| 269 visitGreater(HGreater node) => visitRelational(node); | 269 visitGreater(HGreater node) => visitRelational(node); |
| 270 visitGreaterEqual(HGreaterEqual node) => visitRelational(node); | 270 visitGreaterEqual(HGreaterEqual node) => visitRelational(node); |
| 271 visitIdentity(HIdentity node) => visitRelational(node); | 271 visitIdentity(HIdentity node) => visitRelational(node); |
| 272 visitIf(HIf node) => visitConditionalBranch(node); | 272 visitIf(HIf node) => visitConditionalBranch(node); |
| 273 visitIndex(HIndex node) => visitInvokeStatic(node); | 273 visitIndex(HIndex node) => visitInvokeStatic(node); |
| 274 visitIndexAssign(HIndexAssign node) => visitInvokeStatic(node); | 274 visitIndexAssign(HIndexAssign node) => visitInvokeStatic(node); |
| 275 visitIntegerCheck(HIntegerCheck node) => visitCheck(node); | 275 visitIntegerCheck(HIntegerCheck node) => visitCheck(node); |
| 276 visitInvokeClosure(HInvokeClosure node) | 276 visitInvokeClosure(HInvokeClosure node) |
| 277 => visitInvokeDynamic(node); | 277 => visitInvokeDynamic(node); |
| 278 visitInvokeDynamicMethod(HInvokeDynamicMethod node) | 278 visitInvokeDynamicMethod(HInvokeDynamicMethod node) |
| 279 => visitInvokeDynamic(node); | 279 => visitInvokeDynamic(node); |
| 280 visitInvokeDynamicGetter(HInvokeDynamicGetter node) | 280 visitInvokeDynamicGetter(HInvokeDynamicGetter node) |
| 281 => visitInvokeDynamicField(node); | 281 => visitInvokeDynamicField(node); |
| 282 visitInvokeDynamicSetter(HInvokeDynamicSetter node) | 282 visitInvokeDynamicSetter(HInvokeDynamicSetter node) |
| 283 => visitInvokeDynamicField(node); | 283 => visitInvokeDynamicField(node); |
| 284 visitInvokeInterceptor(HInvokeInterceptor node) | 284 visitInvokeInterceptor(HInvokeInterceptor node) |
| 285 => visitInvokeStatic(node); | 285 => visitInvokeStatic(node); |
| 286 visitInvokeStatic(HInvokeStatic node) => visitInvoke(node); | 286 visitInvokeStatic(HInvokeStatic node) => visitInvoke(node); |
| 287 visitInvokeSuper(HInvokeSuper node) => visitInvoke(node); | 287 visitInvokeSuper(HInvokeSuper node) => visitInvoke(node); |
| 288 visitJump(HJump node) => visitControlFlow(node); |
| 288 visitLess(HLess node) => visitRelational(node); | 289 visitLess(HLess node) => visitRelational(node); |
| 289 visitLessEqual(HLessEqual node) => visitRelational(node); | 290 visitLessEqual(HLessEqual node) => visitRelational(node); |
| 290 visitLiteralList(HLiteralList node) => visitInstruction(node); | 291 visitLiteralList(HLiteralList node) => visitInstruction(node); |
| 291 visitLoopBranch(HLoopBranch node) => visitConditionalBranch(node); | 292 visitLoopBranch(HLoopBranch node) => visitConditionalBranch(node); |
| 292 visitModulo(HModulo node) => visitBinaryArithmetic(node); | 293 visitModulo(HModulo node) => visitBinaryArithmetic(node); |
| 293 visitNegate(HNegate node) => visitInvokeUnary(node); | 294 visitNegate(HNegate node) => visitInvokeUnary(node); |
| 294 visitNot(HNot node) => visitInstruction(node); | 295 visitNot(HNot node) => visitInstruction(node); |
| 295 visitPhi(HPhi node) => visitInstruction(node); | 296 visitPhi(HPhi node) => visitInstruction(node); |
| 296 visitMultiply(HMultiply node) => visitBinaryArithmetic(node); | 297 visitMultiply(HMultiply node) => visitBinaryArithmetic(node); |
| 297 visitParameterValue(HParameterValue node) => visitInstruction(node); | 298 visitParameterValue(HParameterValue node) => visitInstruction(node); |
| (...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 toString() => 'exit'; | 1655 toString() => 'exit'; |
| 1655 accept(HVisitor visitor) => visitor.visitExit(this); | 1656 accept(HVisitor visitor) => visitor.visitExit(this); |
| 1656 } | 1657 } |
| 1657 | 1658 |
| 1658 class HGoto extends HControlFlow { | 1659 class HGoto extends HControlFlow { |
| 1659 HGoto() : super(const <HInstruction>[]); | 1660 HGoto() : super(const <HInstruction>[]); |
| 1660 toString() => 'goto'; | 1661 toString() => 'goto'; |
| 1661 accept(HVisitor visitor) => visitor.visitGoto(this); | 1662 accept(HVisitor visitor) => visitor.visitGoto(this); |
| 1662 } | 1663 } |
| 1663 | 1664 |
| 1664 class HBreak extends HGoto { | 1665 abstract class HJump extends HControlFlow { |
| 1665 final TargetElement target; | 1666 final TargetElement target; |
| 1666 final LabelElement label; | 1667 final LabelElement label; |
| 1667 HBreak(this.target) : label = null; | 1668 HJump(this.target) : label = null, super(const <HInstruction>[]); |
| 1668 HBreak.toLabel(LabelElement label) : label = label, target = label.target; | 1669 HJump.toLabel(LabelElement label) |
| 1670 : label = label, target = label.target, super(const <HInstruction>[]); |
| 1671 } |
| 1672 |
| 1673 class HBreak extends HJump { |
| 1674 HBreak(TargetElement target) : super(target); |
| 1675 HBreak.toLabel(LabelElement label) : super.toLabel(label); |
| 1669 toString() => (label !== null) ? 'break ${label.labelName}' : 'break'; | 1676 toString() => (label !== null) ? 'break ${label.labelName}' : 'break'; |
| 1670 accept(HVisitor visitor) => visitor.visitBreak(this); | 1677 accept(HVisitor visitor) => visitor.visitBreak(this); |
| 1671 } | 1678 } |
| 1672 | 1679 |
| 1673 class HContinue extends HGoto { | 1680 class HContinue extends HJump { |
| 1674 final TargetElement target; | 1681 HContinue(TargetElement target) : super(target); |
| 1675 final LabelElement label; | 1682 HContinue.toLabel(LabelElement label) : super.toLabel(label); |
| 1676 HContinue(this.target) : label = null; | |
| 1677 HContinue.toLabel(LabelElement label) : label = label, target = label.target; | |
| 1678 toString() => (label !== null) ? 'continue ${label.labelName}' : 'continue'; | 1683 toString() => (label !== null) ? 'continue ${label.labelName}' : 'continue'; |
| 1679 accept(HVisitor visitor) => visitor.visitContinue(this); | 1684 accept(HVisitor visitor) => visitor.visitContinue(this); |
| 1680 } | 1685 } |
| 1681 | 1686 |
| 1682 class HTry extends HControlFlow { | 1687 class HTry extends HControlFlow { |
| 1683 HParameterValue exception; | 1688 HParameterValue exception; |
| 1684 HBasicBlock catchBlock; | 1689 HBasicBlock catchBlock; |
| 1685 HBasicBlock finallyBlock; | 1690 HBasicBlock finallyBlock; |
| 1686 HTry() : super(const <HInstruction>[]); | 1691 HTry() : super(const <HInstruction>[]); |
| 1687 toString() => 'try'; | 1692 toString() => 'try'; |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2490 this.catchBlock, | 2495 this.catchBlock, |
| 2491 this.finallyBlock); | 2496 this.finallyBlock); |
| 2492 | 2497 |
| 2493 HBasicBlock get start() => body.start; | 2498 HBasicBlock get start() => body.start; |
| 2494 HBasicBlock get end() => | 2499 HBasicBlock get end() => |
| 2495 finallyBlock === null ? catchBlock.end : finallyBlock.end; | 2500 finallyBlock === null ? catchBlock.end : finallyBlock.end; |
| 2496 | 2501 |
| 2497 bool accept(HStatementInformationVisitor visitor) => | 2502 bool accept(HStatementInformationVisitor visitor) => |
| 2498 visitor.visitTryInfo(this); | 2503 visitor.visitTryInfo(this); |
| 2499 } | 2504 } |
| OLD | NEW |