| 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 // The most recently opened block. Has the same value as [current] while | 774 // The most recently opened block. Has the same value as [current] while |
| 775 // the block is open, but unlike [current], it isn't cleared when the current | 775 // the block is open, but unlike [current], it isn't cleared when the current |
| 776 // block is closed. | 776 // block is closed. |
| 777 HBasicBlock lastOpenedBlock; | 777 HBasicBlock lastOpenedBlock; |
| 778 | 778 |
| 779 LibraryElement get currentLibrary() => work.element.getLibrary(); | 779 LibraryElement get currentLibrary() => work.element.getLibrary(); |
| 780 | 780 |
| 781 SsaBuilder(Compiler compiler, WorkItem work) | 781 SsaBuilder(Compiler compiler, WorkItem work) |
| 782 : this.compiler = compiler, | 782 : this.compiler = compiler, |
| 783 this.work = work, | 783 this.work = work, |
| 784 interceptors = compiler.builder.interceptors, | 784 interceptors = compiler.backend.builder.interceptors, |
| 785 methodInterceptionEnabled = true, | 785 methodInterceptionEnabled = true, |
| 786 elements = work.resolutionTree, | 786 elements = work.resolutionTree, |
| 787 graph = new HGraph(), | 787 graph = new HGraph(), |
| 788 stack = new List<HInstruction>(), | 788 stack = new List<HInstruction>(), |
| 789 jumpTargets = new Map<TargetElement, JumpHandler>() { | 789 jumpTargets = new Map<TargetElement, JumpHandler>() { |
| 790 localsHandler = new LocalsHandler(this); | 790 localsHandler = new LocalsHandler(this); |
| 791 } | 791 } |
| 792 | 792 |
| 793 void disableMethodInterception() { | 793 void disableMethodInterception() { |
| 794 assert(methodInterceptionEnabled); | 794 assert(methodInterceptionEnabled); |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 wrapExpressionGraph(conditionExpression), | 1453 wrapExpressionGraph(conditionExpression), |
| 1454 wrapStatementGraph(bodyGraph), | 1454 wrapStatementGraph(bodyGraph), |
| 1455 null, | 1455 null, |
| 1456 loopEntryBlock.loopInformation.target, | 1456 loopEntryBlock.loopInformation.target, |
| 1457 loopEntryBlock.loopInformation.labels); | 1457 loopEntryBlock.loopInformation.labels); |
| 1458 loopEntryBlock.setBlockFlow(loopBlockInfo, current); | 1458 loopEntryBlock.setBlockFlow(loopBlockInfo, current); |
| 1459 loopInfo.loopBlockInformation = loopBlockInfo; | 1459 loopInfo.loopBlockInformation = loopBlockInfo; |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 visitFunctionExpression(FunctionExpression node) { | 1462 visitFunctionExpression(FunctionExpression node) { |
| 1463 ClosureData nestedClosureData = compiler.builder.closureDataCache[node]; | 1463 ClosureData nestedClosureData = compiler.backend.builder.closureDataCache[no
de]; |
| 1464 if (nestedClosureData === null) { | 1464 if (nestedClosureData === null) { |
| 1465 // TODO(floitsch): we can only assume that the reason for not having a | 1465 // TODO(floitsch): we can only assume that the reason for not having a |
| 1466 // closure data here is, because the function is inside an initializer. | 1466 // closure data here is, because the function is inside an initializer. |
| 1467 compiler.unimplemented("Closures inside initializers", node: node); | 1467 compiler.unimplemented("Closures inside initializers", node: node); |
| 1468 } | 1468 } |
| 1469 assert(nestedClosureData !== null); | 1469 assert(nestedClosureData !== null); |
| 1470 assert(nestedClosureData.closureClassElement !== null); | 1470 assert(nestedClosureData.closureClassElement !== null); |
| 1471 ClassElement closureClassElement = | 1471 ClassElement closureClassElement = |
| 1472 nestedClosureData.closureClassElement; | 1472 nestedClosureData.closureClassElement; |
| 1473 FunctionElement callElement = nestedClosureData.callElement; | 1473 FunctionElement callElement = nestedClosureData.callElement; |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3315 <HInstruction>[target, input], | 3315 <HInstruction>[target, input], |
| 3316 HType.STRING)); | 3316 HType.STRING)); |
| 3317 return builder.pop(); | 3317 return builder.pop(); |
| 3318 } | 3318 } |
| 3319 | 3319 |
| 3320 HInstruction result() { | 3320 HInstruction result() { |
| 3321 flushLiterals(); | 3321 flushLiterals(); |
| 3322 return prefix; | 3322 return prefix; |
| 3323 } | 3323 } |
| 3324 } | 3324 } |
| OLD | NEW |