| 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 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2398 class HInterceptor extends HInstruction { | 2398 class HInterceptor extends HInstruction { |
| 2399 final Set<ClassElement> interceptedClasses; | 2399 final Set<ClassElement> interceptedClasses; |
| 2400 HInterceptor(this.interceptedClasses, HInstruction receiver) | 2400 HInterceptor(this.interceptedClasses, HInstruction receiver) |
| 2401 : super(<HInstruction>[receiver]); | 2401 : super(<HInstruction>[receiver]); |
| 2402 String toString() => 'interceptor on $interceptedClasses'; | 2402 String toString() => 'interceptor on $interceptedClasses'; |
| 2403 accept(HVisitor visitor) => visitor.visitInterceptor(this); | 2403 accept(HVisitor visitor) => visitor.visitInterceptor(this); |
| 2404 HInstruction get receiver => inputs[0]; | 2404 HInstruction get receiver => inputs[0]; |
| 2405 | 2405 |
| 2406 void prepareGvn(HTypeMap types) { | 2406 void prepareGvn(HTypeMap types) { |
| 2407 clearAllSideEffects(); | 2407 clearAllSideEffects(); |
| 2408 setUseGvn(); |
| 2408 } | 2409 } |
| 2409 | 2410 |
| 2410 int typeCode() => HInstruction.INTERCEPTOR_TYPECODE; | 2411 int typeCode() => HInstruction.INTERCEPTOR_TYPECODE; |
| 2412 bool typeEquals(other) => other is HInterceptor; |
| 2411 } | 2413 } |
| 2412 | 2414 |
| 2413 /** An [HLazyStatic] is a static that is initialized lazily at first read. */ | 2415 /** An [HLazyStatic] is a static that is initialized lazily at first read. */ |
| 2414 class HLazyStatic extends HStatic { | 2416 class HLazyStatic extends HStatic { |
| 2415 HLazyStatic(Element element) : super(element); | 2417 HLazyStatic(Element element) : super(element); |
| 2416 | 2418 |
| 2417 void prepareGvn(HTypeMap types) { | 2419 void prepareGvn(HTypeMap types) { |
| 2418 // TODO(4931): The first access has side-effects, but we afterwards we | 2420 // TODO(4931): The first access has side-effects, but we afterwards we |
| 2419 // should be able to GVN. | 2421 // should be able to GVN. |
| 2420 setAllSideEffects(); | 2422 setAllSideEffects(); |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2958 HBasicBlock get start => expression.start; | 2960 HBasicBlock get start => expression.start; |
| 2959 HBasicBlock get end { | 2961 HBasicBlock get end { |
| 2960 // We don't create a switch block if there are no cases. | 2962 // We don't create a switch block if there are no cases. |
| 2961 assert(!statements.isEmpty); | 2963 assert(!statements.isEmpty); |
| 2962 return statements.last.end; | 2964 return statements.last.end; |
| 2963 } | 2965 } |
| 2964 | 2966 |
| 2965 bool accept(HStatementInformationVisitor visitor) => | 2967 bool accept(HStatementInformationVisitor visitor) => |
| 2966 visitor.visitSwitchInfo(this); | 2968 visitor.visitSwitchInfo(this); |
| 2967 } | 2969 } |
| OLD | NEW |