Chromium Code Reviews| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 class SsaCodeGeneratorTask extends CompilerTask { | 7 class SsaCodeGeneratorTask extends CompilerTask { |
| 8 | 8 |
| 9 final JavaScriptBackend backend; | 9 final JavaScriptBackend backend; |
| 10 | 10 |
| (...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1543 } | 1543 } |
| 1544 // If [JSInvocationMirror._invokeOn] has been called, we must not create a | 1544 // If [JSInvocationMirror._invokeOn] has been called, we must not create a |
| 1545 // typed selector based on the receiver type. | 1545 // typed selector based on the receiver type. |
| 1546 if (backend.compiler.enabledInvokeOn) { | 1546 if (backend.compiler.enabledInvokeOn) { |
| 1547 return selector.asUntyped; | 1547 return selector.asUntyped; |
| 1548 } | 1548 } |
| 1549 HType receiverType = node.getDartReceiver(compiler).instructionType; | 1549 HType receiverType = node.getDartReceiver(compiler).instructionType; |
| 1550 return receiverType.refine(selector, compiler); | 1550 return receiverType.refine(selector, compiler); |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 void registerInvoke(HInvokeDynamic node, Selector selector) { | 1553 void registerInvoke(HInvokeDynamic node, Selector selector) {} |
|
ngeoffray
2013/06/18 12:45:02
I'd get rid of this method.
ahe
2013/06/18 12:55:07
Done.
| |
| 1554 if (node.isInterceptedCall) { | |
| 1555 backend.addInterceptedSelector(selector); | |
| 1556 } | |
| 1557 } | |
| 1558 | 1554 |
| 1559 void registerMethodInvoke(HInvokeDynamic node) { | 1555 void registerMethodInvoke(HInvokeDynamic node) { |
| 1560 Selector selector = getOptimizedSelectorFor(node, node.selector); | 1556 Selector selector = getOptimizedSelectorFor(node, node.selector); |
| 1561 | 1557 |
| 1562 // If we don't know what we're calling or if we are calling a getter, | 1558 // If we don't know what we're calling or if we are calling a getter, |
| 1563 // we need to register that fact that we may be calling a closure | 1559 // we need to register that fact that we may be calling a closure |
| 1564 // with the same arguments. | 1560 // with the same arguments. |
| 1565 Element target = node.element; | 1561 Element target = node.element; |
| 1566 if (target == null || target.isGetter()) { | 1562 if (target == null || target.isGetter()) { |
| 1567 // TODO(kasperl): If we have a typed selector for the call, we | 1563 // TODO(kasperl): If we have a typed selector for the call, we |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3021 if (leftType.canBeNull() && rightType.canBeNull()) { | 3017 if (leftType.canBeNull() && rightType.canBeNull()) { |
| 3022 if (left.isConstantNull() || right.isConstantNull() || | 3018 if (left.isConstantNull() || right.isConstantNull() || |
| 3023 (leftType.isPrimitive(compiler) && leftType == rightType)) { | 3019 (leftType.isPrimitive(compiler) && leftType == rightType)) { |
| 3024 return '=='; | 3020 return '=='; |
| 3025 } | 3021 } |
| 3026 return null; | 3022 return null; |
| 3027 } else { | 3023 } else { |
| 3028 return '==='; | 3024 return '==='; |
| 3029 } | 3025 } |
| 3030 } | 3026 } |
| OLD | NEW |