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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 abstract class HVisitor<R> { | 7 abstract class HVisitor<R> { |
| 8 R visitAdd(HAdd node); | 8 R visitAdd(HAdd node); |
| 9 R visitBailoutTarget(HBailoutTarget node); | 9 R visitBailoutTarget(HBailoutTarget node); |
| 10 R visitBitAnd(HBitAnd node); | 10 R visitBitAnd(HBitAnd node); |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 void disable() { | 1211 void disable() { |
| 1212 isEnabled = false; | 1212 isEnabled = false; |
| 1213 instructionType = guarded.instructionType; | 1213 instructionType = guarded.instructionType; |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 bool isControlFlow() => true; | 1216 bool isControlFlow() => true; |
| 1217 bool isJsStatement() => isEnabled; | 1217 bool isJsStatement() => isEnabled; |
| 1218 bool canThrow() => isEnabled; | 1218 bool canThrow() => isEnabled; |
| 1219 // A [HTypeGuard] cannot be moved anywhere in the graph. | |
|
kasperl
2013/02/26 17:36:48
I would add a newline before the comment and exten
ngeoffray
2013/02/27 08:06:54
Done.
| |
| 1220 bool isPure() => false; | |
| 1219 | 1221 |
| 1220 accept(HVisitor visitor) => visitor.visitTypeGuard(this); | 1222 accept(HVisitor visitor) => visitor.visitTypeGuard(this); |
| 1221 int typeCode() => HInstruction.TYPE_GUARD_TYPECODE; | 1223 int typeCode() => HInstruction.TYPE_GUARD_TYPECODE; |
| 1222 bool typeEquals(other) => other is HTypeGuard; | 1224 bool typeEquals(other) => other is HTypeGuard; |
| 1223 bool dataEquals(HTypeGuard other) => guardedType == other.guardedType; | 1225 bool dataEquals(HTypeGuard other) => guardedType == other.guardedType; |
| 1224 } | 1226 } |
| 1225 | 1227 |
| 1226 class HBoundsCheck extends HCheck { | 1228 class HBoundsCheck extends HCheck { |
| 1227 static const int ALWAYS_FALSE = 0; | 1229 static const int ALWAYS_FALSE = 0; |
| 1228 static const int FULL_CHECK = 1; | 1230 static const int FULL_CHECK = 1; |
| (...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2556 HBasicBlock get start => expression.start; | 2558 HBasicBlock get start => expression.start; |
| 2557 HBasicBlock get end { | 2559 HBasicBlock get end { |
| 2558 // We don't create a switch block if there are no cases. | 2560 // We don't create a switch block if there are no cases. |
| 2559 assert(!statements.isEmpty); | 2561 assert(!statements.isEmpty); |
| 2560 return statements.last.end; | 2562 return statements.last.end; |
| 2561 } | 2563 } |
| 2562 | 2564 |
| 2563 bool accept(HStatementInformationVisitor visitor) => | 2565 bool accept(HStatementInformationVisitor visitor) => |
| 2564 visitor.visitSwitchInfo(this); | 2566 visitor.visitSwitchInfo(this); |
| 2565 } | 2567 } |
| OLD | NEW |