| 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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 if (code is StringNode) { | 2511 if (code is StringNode) { |
| 2512 StringNode codeString = code; | 2512 StringNode codeString = code; |
| 2513 if (!codeString.isInterpolation) { | 2513 if (!codeString.isInterpolation) { |
| 2514 // codeString may not be an interpolation, but may be a juxtaposition. | 2514 // codeString may not be an interpolation, but may be a juxtaposition. |
| 2515 push(new HForeign(codeString.dartString, | 2515 push(new HForeign(codeString.dartString, |
| 2516 typeString.dartString, | 2516 typeString.dartString, |
| 2517 inputs)); | 2517 inputs)); |
| 2518 return; | 2518 return; |
| 2519 } | 2519 } |
| 2520 } | 2520 } |
| 2521 compiler.cancel('JS code must be a string literal', node: literal); | 2521 compiler.cancel('JS code must be a string literal', node: code); |
| 2522 } | 2522 } |
| 2523 | 2523 |
| 2524 void handleForeignUnintercepted(Send node) { | 2524 void handleForeignUnintercepted(Send node) { |
| 2525 Link<Node> link = node.arguments; | 2525 Link<Node> link = node.arguments; |
| 2526 if (!link.tail.isEmpty()) { | 2526 if (!link.tail.isEmpty()) { |
| 2527 compiler.cancel( | 2527 compiler.cancel( |
| 2528 'More than one expression in UNINTERCEPTED()', node: node); | 2528 'More than one expression in UNINTERCEPTED()', node: node); |
| 2529 } | 2529 } |
| 2530 Expression expression = link.head; | 2530 Expression expression = link.head; |
| 2531 disableMethodInterception(); | 2531 disableMethodInterception(); |
| (...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4378 new HSubGraphBlockInformation(elseBranch.graph)); | 4378 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4379 | 4379 |
| 4380 HBasicBlock conditionStartBlock = conditionBranch.block; | 4380 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4381 conditionStartBlock.setBlockFlow(info, joinBlock); | 4381 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4382 SubGraph conditionGraph = conditionBranch.graph; | 4382 SubGraph conditionGraph = conditionBranch.graph; |
| 4383 HIf branch = conditionGraph.end.last; | 4383 HIf branch = conditionGraph.end.last; |
| 4384 assert(branch is HIf); | 4384 assert(branch is HIf); |
| 4385 branch.blockInformation = conditionStartBlock.blockFlow; | 4385 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4386 } | 4386 } |
| 4387 } | 4387 } |
| OLD | NEW |