Chromium Code Reviews| 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 visitBailoutTarget(HBailoutTarget node); | 7 R visitBailoutTarget(HBailoutTarget node); |
| 8 R visitBitAnd(HBitAnd node); | 8 R visitBitAnd(HBitAnd node); |
| 9 R visitBitNot(HBitNot node); | 9 R visitBitNot(HBitNot node); |
| 10 R visitBitOr(HBitOr node); | 10 R visitBitOr(HBitOr node); |
| (...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2113 HStaticStore(this.element, HInstruction value) : super(<HInstruction>[value]); | 2113 HStaticStore(this.element, HInstruction value) : super(<HInstruction>[value]); |
| 2114 toString() => 'static store ${element.name}'; | 2114 toString() => 'static store ${element.name}'; |
| 2115 accept(HVisitor visitor) => visitor.visitStaticStore(this); | 2115 accept(HVisitor visitor) => visitor.visitStaticStore(this); |
| 2116 | 2116 |
| 2117 int typeCode() => 25; | 2117 int typeCode() => 25; |
| 2118 bool typeEquals(other) => other is HStaticStore; | 2118 bool typeEquals(other) => other is HStaticStore; |
| 2119 bool dataEquals(HStaticStore other) => element == other.element; | 2119 bool dataEquals(HStaticStore other) => element == other.element; |
| 2120 } | 2120 } |
| 2121 | 2121 |
| 2122 class HLiteralList extends HInstruction { | 2122 class HLiteralList extends HInstruction { |
| 2123 HLiteralList(inputs) : super(inputs); | 2123 HLiteralList(inputs, this.isConst) : super(inputs); |
|
ngeoffray
2012/02/24 13:24:33
Please add a TODO(floitsch): remove 'isConst' once
ahe
2012/02/27 11:51:12
Done.
| |
| 2124 toString() => 'literal list'; | 2124 toString() => 'literal list'; |
| 2125 accept(HVisitor visitor) => visitor.visitLiteralList(this); | 2125 accept(HVisitor visitor) => visitor.visitLiteralList(this); |
| 2126 HType computeType() => HType.ARRAY; | 2126 HType computeType() => HType.ARRAY; |
| 2127 bool hasExpectedType() => true; | 2127 bool hasExpectedType() => true; |
| 2128 final bool isConst; | |
| 2128 | 2129 |
| 2129 void prepareGvn() { | 2130 void prepareGvn() { |
| 2130 assert(!hasSideEffects()); | 2131 assert(!hasSideEffects()); |
| 2131 } | 2132 } |
| 2132 } | 2133 } |
| 2133 | 2134 |
| 2134 class HIndex extends HInvokeStatic { | 2135 class HIndex extends HInvokeStatic { |
| 2135 HIndex(HStatic target, HInstruction receiver, HInstruction index) | 2136 HIndex(HStatic target, HInstruction receiver, HInstruction index) |
| 2136 : super(Selector.INDEX, <HInstruction>[target, receiver, index]); | 2137 : super(Selector.INDEX, <HInstruction>[target, receiver, index]); |
| 2137 toString() => 'index operator'; | 2138 toString() => 'index operator'; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2252 | 2253 |
| 2253 HInstruction get expression() => inputs[0]; | 2254 HInstruction get expression() => inputs[0]; |
| 2254 | 2255 |
| 2255 HType computeType() => HType.BOOLEAN; | 2256 HType computeType() => HType.BOOLEAN; |
| 2256 bool hasExpectedType() => true; | 2257 bool hasExpectedType() => true; |
| 2257 | 2258 |
| 2258 accept(HVisitor visitor) => visitor.visitIs(this); | 2259 accept(HVisitor visitor) => visitor.visitIs(this); |
| 2259 | 2260 |
| 2260 toString() => "$expression is $typeExpression"; | 2261 toString() => "$expression is $typeExpression"; |
| 2261 } | 2262 } |
| OLD | NEW |