| 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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 } | 2165 } |
| 2166 | 2166 |
| 2167 void handleForeignJsHasEquals(Send node) { | 2167 void handleForeignJsHasEquals(Send node) { |
| 2168 List<HInstruction> inputs = <HInstruction>[]; | 2168 List<HInstruction> inputs = <HInstruction>[]; |
| 2169 if (!node.arguments.tail.isEmpty()) { | 2169 if (!node.arguments.tail.isEmpty()) { |
| 2170 compiler.cancel( | 2170 compiler.cancel( |
| 2171 'More than one expression in JS_HAS_EQUALS()', node: node); | 2171 'More than one expression in JS_HAS_EQUALS()', node: node); |
| 2172 } | 2172 } |
| 2173 addGenericSendArgumentsToList(node.arguments, inputs); | 2173 addGenericSendArgumentsToList(node.arguments, inputs); |
| 2174 String name = compiler.namer.instanceMethodName( | 2174 String name = compiler.namer.instanceMethodName( |
| 2175 currentLibrary, Namer.OPERATOR_EQUALS, 1); | 2175 currentLibrary, Elements.OPERATOR_EQUALS, 1); |
| 2176 push(new HForeign(new DartString.literal('!!#.$name'), | 2176 push(new HForeign(new DartString.literal('!!#.$name'), |
| 2177 const LiteralDartString('bool'), | 2177 const LiteralDartString('bool'), |
| 2178 inputs)); | 2178 inputs)); |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 void handleForeignJsCurrentIsolate(Send node) { | 2181 void handleForeignJsCurrentIsolate(Send node) { |
| 2182 if (!node.arguments.isEmpty()) { | 2182 if (!node.arguments.isEmpty()) { |
| 2183 compiler.cancel( | 2183 compiler.cancel( |
| 2184 'Too many arguments to JS_CURRENT_ISOLATE', node: node); | 2184 'Too many arguments to JS_CURRENT_ISOLATE', node: node); |
| 2185 } | 2185 } |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3462 void visitNodeList(NodeList node) { | 3462 void visitNodeList(NodeList node) { |
| 3463 node.visitChildren(this); | 3463 node.visitChildren(this); |
| 3464 } | 3464 } |
| 3465 | 3465 |
| 3466 HInstruction concat(HInstruction left, HInstruction right) { | 3466 HInstruction concat(HInstruction left, HInstruction right) { |
| 3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); | 3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); |
| 3468 builder.add(instruction); | 3468 builder.add(instruction); |
| 3469 return instruction; | 3469 return instruction; |
| 3470 } | 3470 } |
| 3471 } | 3471 } |
| OLD | NEW |