Chromium Code Reviews| Index: lib/compiler/implementation/ssa/nodes.dart |
| diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart |
| index f657bfcc4bbc28b8987838ea9aa22b6a44f0942a..f98fb57b73453cc7a94c06d6bb642971e383ad93 100644 |
| --- a/lib/compiler/implementation/ssa/nodes.dart |
| +++ b/lib/compiler/implementation/ssa/nodes.dart |
| @@ -1321,10 +1321,16 @@ class HLocalSet extends HFieldSet { |
| } |
| class HForeign extends HInstruction { |
| + final bool _isStatement; |
|
Lasse Reichstein Nielsen
2012/06/27 08:10:16
Just make this non-private and final. No need to w
floitsch
2012/06/27 12:04:43
Done.
|
| final DartString code; |
| final HType foreignType; |
| HForeign(this.code, DartString declaredType, List<HInstruction> inputs) |
| : foreignType = computeTypeFromDeclaredType(declaredType), |
| + _isStatement = false, |
| + super(inputs); |
| + HForeign.statement(this.code, List<HInstruction> inputs) |
| + : foreignType = HType.UNKNOWN, |
| + _isStatement = true, |
| super(inputs); |
| accept(HVisitor visitor) => visitor.visitForeign(this); |
| @@ -1339,9 +1345,7 @@ class HForeign extends HInstruction { |
| HType get guaranteedType() => foreignType; |
| - // Be conservative and treat all [HForeign] as statements, even |
| - // though some are just expressions. |
| - bool isStatement() => true; |
| + bool isStatement() => _isStatement; |
| } |
| class HForeignNew extends HForeign { |