| 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 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 enableMethodInterception(); | 2438 enableMethodInterception(); |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 void handleForeignJsHasEquals(Send node) { | 2441 void handleForeignJsHasEquals(Send node) { |
| 2442 List<HInstruction> inputs = <HInstruction>[]; | 2442 List<HInstruction> inputs = <HInstruction>[]; |
| 2443 if (!node.arguments.tail.isEmpty()) { | 2443 if (!node.arguments.tail.isEmpty()) { |
| 2444 compiler.cancel( | 2444 compiler.cancel( |
| 2445 'More than one expression in JS_HAS_EQUALS()', node: node); | 2445 'More than one expression in JS_HAS_EQUALS()', node: node); |
| 2446 } | 2446 } |
| 2447 addGenericSendArgumentsToList(node.arguments, inputs); | 2447 addGenericSendArgumentsToList(node.arguments, inputs); |
| 2448 String name = | 2448 String name = backend.namer.publicInstanceMethodNameByArity( |
| 2449 backend.namer.instanceMethodNameByArity(Elements.OPERATOR_EQUALS, 1); | 2449 Elements.OPERATOR_EQUALS, 1); |
| 2450 push(new HForeign(new DartString.literal('!!#.$name'), | 2450 push(new HForeign(new DartString.literal('!!#.$name'), |
| 2451 const LiteralDartString('bool'), | 2451 const LiteralDartString('bool'), |
| 2452 inputs)); | 2452 inputs)); |
| 2453 } | 2453 } |
| 2454 | 2454 |
| 2455 void handleForeignJsCurrentIsolate(Send node) { | 2455 void handleForeignJsCurrentIsolate(Send node) { |
| 2456 if (!node.arguments.isEmpty()) { | 2456 if (!node.arguments.isEmpty()) { |
| 2457 compiler.cancel( | 2457 compiler.cancel( |
| 2458 'Too many arguments to JS_CURRENT_ISOLATE', node: node); | 2458 'Too many arguments to JS_CURRENT_ISOLATE', node: node); |
| 2459 } | 2459 } |
| (...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4227 new HSubGraphBlockInformation(elseBranch.graph)); | 4227 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4228 | 4228 |
| 4229 HBasicBlock conditionStartBlock = conditionBranch.block; | 4229 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4230 conditionStartBlock.setBlockFlow(info, joinBlock); | 4230 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4231 SubGraph conditionGraph = conditionBranch.graph; | 4231 SubGraph conditionGraph = conditionBranch.graph; |
| 4232 HIf branch = conditionGraph.end.last; | 4232 HIf branch = conditionGraph.end.last; |
| 4233 assert(branch is HIf); | 4233 assert(branch is HIf); |
| 4234 branch.blockInformation = conditionStartBlock.blockFlow; | 4234 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4235 } | 4235 } |
| 4236 } | 4236 } |
| OLD | NEW |