| 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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 HInstruction context = localsHandler.readThis(); | 1464 HInstruction context = localsHandler.readThis(); |
| 1465 add(target); | 1465 add(target); |
| 1466 var inputs = <HInstruction>[target, context]; | 1466 var inputs = <HInstruction>[target, context]; |
| 1467 addStaticSendArgumentsToList(node, element, inputs); | 1467 addStaticSendArgumentsToList(node, element, inputs); |
| 1468 push(new HInvokeSuper(selector, inputs)); | 1468 push(new HInvokeSuper(selector, inputs)); |
| 1469 } | 1469 } |
| 1470 | 1470 |
| 1471 visitStaticSend(Send node) { | 1471 visitStaticSend(Send node) { |
| 1472 Selector selector = elements.getSelector(node); | 1472 Selector selector = elements.getSelector(node); |
| 1473 Element element = elements[node]; | 1473 Element element = elements[node]; |
| 1474 if (element.kind != ElementKind.FUNCTION && |
| 1475 element.kind != ElementKind.GENERATIVE_CONSTRUCTOR) { |
| 1476 compiler.unimplemented( |
| 1477 "SsaBuilder.visitStaticSend static field invocation", |
| 1478 node: node); |
| 1479 } |
| 1474 HStatic target = new HStatic(element); | 1480 HStatic target = new HStatic(element); |
| 1475 add(target); | 1481 add(target); |
| 1476 var inputs = <HInstruction>[]; | 1482 var inputs = <HInstruction>[]; |
| 1477 inputs.add(target); | 1483 inputs.add(target); |
| 1478 addStaticSendArgumentsToList(node, element, inputs); | 1484 addStaticSendArgumentsToList(node, element, inputs); |
| 1479 push(new HInvokeStatic(selector, inputs)); | 1485 push(new HInvokeStatic(selector, inputs)); |
| 1480 } | 1486 } |
| 1481 | 1487 |
| 1482 visitSend(Send node) { | 1488 visitSend(Send node) { |
| 1483 if (node.selector is Operator && methodInterceptionEnabled) { | 1489 if (node.selector is Operator && methodInterceptionEnabled) { |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 } | 1949 } |
| 1944 | 1950 |
| 1945 visitCatchBlock(CatchBlock node) { | 1951 visitCatchBlock(CatchBlock node) { |
| 1946 visit(node.block); | 1952 visit(node.block); |
| 1947 } | 1953 } |
| 1948 | 1954 |
| 1949 visitTypedef(Typedef node) { | 1955 visitTypedef(Typedef node) { |
| 1950 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1956 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1951 } | 1957 } |
| 1952 } | 1958 } |
| OLD | NEW |