| 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 class Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2290 isNot = true; | 2290 isNot = true; |
| 2291 } | 2291 } |
| 2292 | 2292 |
| 2293 DartType type = elements.getType(typeAnnotation); | 2293 DartType type = elements.getType(typeAnnotation); |
| 2294 HInstruction typeInfo = null; | 2294 HInstruction typeInfo = null; |
| 2295 if (compiler.codegenWorld.rti.hasTypeArguments(type)) { | 2295 if (compiler.codegenWorld.rti.hasTypeArguments(type)) { |
| 2296 pushInvokeHelper1(interceptors.getGetRuntimeTypeInfo(), expression); | 2296 pushInvokeHelper1(interceptors.getGetRuntimeTypeInfo(), expression); |
| 2297 typeInfo = pop(); | 2297 typeInfo = pop(); |
| 2298 } | 2298 } |
| 2299 if (type.element.isTypeVariable()) { | 2299 if (type.element.isTypeVariable()) { |
| 2300 // TODO(karlklose): We currently answer true to any is check | 2300 // TODO(karlklose): We currently answer true to any is check |
| 2301 // involving a type variable -- both is T and is !T -- until | 2301 // involving a type variable -- both is T and is !T -- until |
| 2302 // we have a proper implementation of reified generics. | 2302 // we have a proper implementation of reified generics. |
| 2303 stack.add(graph.addConstantBool(true, constantSystem)); | 2303 stack.add(graph.addConstantBool(true, constantSystem)); |
| 2304 } else { | 2304 } else { |
| 2305 HInstruction instruction; | 2305 HInstruction instruction; |
| 2306 if (typeInfo !== null) { | 2306 if (typeInfo !== null) { |
| 2307 instruction = new HIs.withTypeInfoCall(type, expression, typeInfo); | 2307 instruction = new HIs.withTypeInfoCall(type, expression, typeInfo); |
| 2308 } else { | 2308 } else { |
| 2309 instruction = new HIs(type, expression); | 2309 instruction = new HIs(type, expression); |
| 2310 } | 2310 } |
| 2311 if (isNot) { | 2311 if (isNot) { |
| (...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4343 new HSubGraphBlockInformation(elseBranch.graph)); | 4343 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4344 | 4344 |
| 4345 HBasicBlock conditionStartBlock = conditionBranch.block; | 4345 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4346 conditionStartBlock.setBlockFlow(info, joinBlock); | 4346 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4347 SubGraph conditionGraph = conditionBranch.graph; | 4347 SubGraph conditionGraph = conditionBranch.graph; |
| 4348 HIf branch = conditionGraph.end.last; | 4348 HIf branch = conditionGraph.end.last; |
| 4349 assert(branch is HIf); | 4349 assert(branch is HIf); |
| 4350 branch.blockInformation = conditionStartBlock.blockFlow; | 4350 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4351 } | 4351 } |
| 4352 } | 4352 } |
| OLD | NEW |