| 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 class Interceptors { | 7 class Interceptors { |
| 8 Compiler compiler; | 8 Compiler compiler; |
| 9 Interceptors(Compiler this.compiler); | 9 Interceptors(Compiler this.compiler); |
| 10 | 10 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 const SourceString('receiver'), ElementKind.VARIABLE, element); | 430 const SourceString('receiver'), ElementKind.VARIABLE, element); |
| 431 HParameterValue value = new HParameterValue(parameter); | 431 HParameterValue value = new HParameterValue(parameter); |
| 432 builder.graph.entry.addAfter( | 432 builder.graph.entry.addAfter( |
| 433 directLocals[closureData.thisElement], value); | 433 directLocals[closureData.thisElement], value); |
| 434 directLocals[closureData.thisElement] = value; | 434 directLocals[closureData.thisElement] = value; |
| 435 HType type = HType.UNKNOWN; | 435 HType type = HType.UNKNOWN; |
| 436 if (cls == builder.backend.jsArrayClass) { | 436 if (cls == builder.backend.jsArrayClass) { |
| 437 type = HType.READABLE_ARRAY; | 437 type = HType.READABLE_ARRAY; |
| 438 } else if (cls == builder.backend.jsStringClass) { | 438 } else if (cls == builder.backend.jsStringClass) { |
| 439 type = HType.STRING; | 439 type = HType.STRING; |
| 440 } else if (cls == builder.backend.jsNumberClass) { |
| 441 type = HType.NUMBER; |
| 442 } else if (cls == builder.backend.jsIntClass) { |
| 443 type = HType.INTEGER; |
| 444 } else if (cls == builder.backend.jsDoubleClass) { |
| 445 type = HType.DOUBLE; |
| 440 } | 446 } |
| 441 value.guaranteedType = type; | 447 value.guaranteedType = type; |
| 442 } | 448 } |
| 443 } | 449 } |
| 444 | 450 |
| 445 bool hasValueForDirectLocal(Element element) { | 451 bool hasValueForDirectLocal(Element element) { |
| 446 assert(element != null); | 452 assert(element != null); |
| 447 assert(isAccessedDirectly(element)); | 453 assert(isAccessedDirectly(element)); |
| 448 return directLocals[element] != null; | 454 return directLocals[element] != null; |
| 449 } | 455 } |
| (...skipping 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4936 new HSubGraphBlockInformation(elseBranch.graph)); | 4942 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4937 | 4943 |
| 4938 HBasicBlock conditionStartBlock = conditionBranch.block; | 4944 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4939 conditionStartBlock.setBlockFlow(info, joinBlock); | 4945 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4940 SubGraph conditionGraph = conditionBranch.graph; | 4946 SubGraph conditionGraph = conditionBranch.graph; |
| 4941 HIf branch = conditionGraph.end.last; | 4947 HIf branch = conditionGraph.end.last; |
| 4942 assert(branch is HIf); | 4948 assert(branch is HIf); |
| 4943 branch.blockInformation = conditionStartBlock.blockFlow; | 4949 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4944 } | 4950 } |
| 4945 } | 4951 } |
| OLD | NEW |