| 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 /** | 7 /** |
| 8 * A special element for the extra parameter taken by intercepted | 8 * A special element for the extra parameter taken by intercepted |
| 9 * methods. We need to implement [TypedElement.type] because our | 9 * methods. We need to implement [TypedElement.type] because our |
| 10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
| (...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3201 List<HInstruction> inputs = <HInstruction>[expression, runtimeType]; | 3201 List<HInstruction> inputs = <HInstruction>[expression, runtimeType]; |
| 3202 pushInvokeStatic(null, helper, inputs, backend.boolType); | 3202 pushInvokeStatic(null, helper, inputs, backend.boolType); |
| 3203 HInstruction call = pop(); | 3203 HInstruction call = pop(); |
| 3204 return new HIs.variable(type, expression, call, backend.boolType); | 3204 return new HIs.variable(type, expression, call, backend.boolType); |
| 3205 } else if (RuntimeTypes.hasTypeArguments(type)) { | 3205 } else if (RuntimeTypes.hasTypeArguments(type)) { |
| 3206 ClassElement element = type.element; | 3206 ClassElement element = type.element; |
| 3207 Element helper = backend.getCheckSubtype(); | 3207 Element helper = backend.getCheckSubtype(); |
| 3208 HInstruction representations = | 3208 HInstruction representations = |
| 3209 buildTypeArgumentRepresentations(type); | 3209 buildTypeArgumentRepresentations(type); |
| 3210 add(representations); | 3210 add(representations); |
| 3211 String operator = | 3211 String operator = backend.namer.operatorIs(element); |
| 3212 backend.namer.operatorIs(backend.getImplementationClass(element)); | |
| 3213 HInstruction isFieldName = addConstantString(operator); | 3212 HInstruction isFieldName = addConstantString(operator); |
| 3214 HInstruction asFieldName = compiler.world.hasAnySubtype(element) | 3213 HInstruction asFieldName = compiler.world.hasAnySubtype(element) |
| 3215 ? addConstantString(backend.namer.substitutionName(element)) | 3214 ? addConstantString(backend.namer.substitutionName(element)) |
| 3216 : graph.addConstantNull(compiler); | 3215 : graph.addConstantNull(compiler); |
| 3217 List<HInstruction> inputs = <HInstruction>[expression, | 3216 List<HInstruction> inputs = <HInstruction>[expression, |
| 3218 isFieldName, | 3217 isFieldName, |
| 3219 representations, | 3218 representations, |
| 3220 asFieldName]; | 3219 asFieldName]; |
| 3221 pushInvokeStatic(node, helper, inputs, backend.boolType); | 3220 pushInvokeStatic(node, helper, inputs, backend.boolType); |
| 3222 HInstruction call = pop(); | 3221 HInstruction call = pop(); |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6316 DartType unaliased = type.unalias(builder.compiler); | 6315 DartType unaliased = type.unalias(builder.compiler); |
| 6317 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 6316 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
| 6318 unaliased.accept(this, builder); | 6317 unaliased.accept(this, builder); |
| 6319 } | 6318 } |
| 6320 | 6319 |
| 6321 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 6320 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
| 6322 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); | 6321 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); |
| 6323 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); | 6322 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); |
| 6324 } | 6323 } |
| 6325 } | 6324 } |
| OLD | NEW |