| 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 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 class HInvokeDynamicSetter extends HInvokeDynamicField { | 1250 class HInvokeDynamicSetter extends HInvokeDynamicField { |
| 1251 HInvokeDynamicSetter(selector, element, receiver, value) | 1251 HInvokeDynamicSetter(selector, element, receiver, value) |
| 1252 : super(selector, element, [receiver, value]); | 1252 : super(selector, element, [receiver, value]); |
| 1253 toString() => 'invoke dynamic setter: $selector'; | 1253 toString() => 'invoke dynamic setter: $selector'; |
| 1254 accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this); | 1254 accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this); |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 class HInvokeStatic extends HInvoke { | 1257 class HInvokeStatic extends HInvoke { |
| 1258 static final int INVOKE_INTERCEPTOR_TYPECODE = 4; |
| 1258 static final int INVOKE_STATIC_TYPECODE = 30; | 1259 static final int INVOKE_STATIC_TYPECODE = 30; |
| 1259 | 1260 |
| 1260 /** The first input must be the target. */ | 1261 /** The first input must be the target. */ |
| 1261 HInvokeStatic(inputs, [HType knownType = HType.UNKNOWN]) : super(inputs) { | 1262 HInvokeStatic(inputs, [HType knownType = HType.UNKNOWN]) : super(inputs) { |
| 1262 guaranteedType = knownType; | 1263 guaranteedType = knownType; |
| 1263 } | 1264 } |
| 1264 | 1265 |
| 1265 toString() => 'invoke static: ${element.name}'; | 1266 toString() => 'invoke static: ${element.name}'; |
| 1266 accept(HVisitor visitor) => visitor.visitInvokeStatic(this); | 1267 accept(HVisitor visitor) => visitor.visitInvokeStatic(this); |
| 1267 int typeCode() => INVOKE_STATIC_TYPECODE; | 1268 int typeCode() => INVOKE_STATIC_TYPECODE; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 void prepareGvn(HTypeMap types) { | 1347 void prepareGvn(HTypeMap types) { |
| 1347 if (isLengthGetterOnStringOrArray(types)) { | 1348 if (isLengthGetterOnStringOrArray(types)) { |
| 1348 setUseGvn(); | 1349 setUseGvn(); |
| 1349 clearAllSideEffects(); | 1350 clearAllSideEffects(); |
| 1350 setDependsOnSomething(); | 1351 setDependsOnSomething(); |
| 1351 } else { | 1352 } else { |
| 1352 setAllSideEffects(); | 1353 setAllSideEffects(); |
| 1353 } | 1354 } |
| 1354 } | 1355 } |
| 1355 | 1356 |
| 1356 int typeCode() => 4; | 1357 int typeCode() => HInvokeStatic.INVOKE_INTERCEPTOR_TYPECODE; |
| 1357 bool typeEquals(other) => other is HInvokeInterceptor; | 1358 bool typeEquals(other) => other is HInvokeInterceptor; |
| 1358 bool dataEquals(HInvokeInterceptor other) { | 1359 bool dataEquals(HInvokeInterceptor other) { |
| 1359 return getter == other.getter && name == other.name; | 1360 return getter == other.getter && name == other.name; |
| 1360 } | 1361 } |
| 1361 } | 1362 } |
| 1362 | 1363 |
| 1363 abstract class HFieldAccess extends HInstruction { | 1364 abstract class HFieldAccess extends HInstruction { |
| 1364 final Element element; | 1365 final Element element; |
| 1365 final SourceString fieldName; | 1366 final SourceString fieldName; |
| 1366 final LibraryElement library; | 1367 final LibraryElement library; |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2786 HBasicBlock get start => expression.start; | 2787 HBasicBlock get start => expression.start; |
| 2787 HBasicBlock get end { | 2788 HBasicBlock get end { |
| 2788 // We don't create a switch block if there are no cases. | 2789 // We don't create a switch block if there are no cases. |
| 2789 assert(!statements.isEmpty()); | 2790 assert(!statements.isEmpty()); |
| 2790 return statements.last().end; | 2791 return statements.last().end; |
| 2791 } | 2792 } |
| 2792 | 2793 |
| 2793 bool accept(HStatementInformationVisitor visitor) => | 2794 bool accept(HStatementInformationVisitor visitor) => |
| 2794 visitor.visitSwitchInfo(this); | 2795 visitor.visitSwitchInfo(this); |
| 2795 } | 2796 } |
| OLD | NEW |