Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 14251021: Move invokeOn to InstanceMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 registerGetter(node); 1514 registerGetter(node);
1515 } else if (selector.isSetter()) { 1515 } else if (selector.isSetter()) {
1516 registerSetter(node); 1516 registerSetter(node);
1517 } else { 1517 } else {
1518 registerMethodInvoke(node); 1518 registerMethodInvoke(node);
1519 } 1519 }
1520 backend.registerUseInterceptor(world); 1520 backend.registerUseInterceptor(world);
1521 } 1521 }
1522 1522
1523 Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) { 1523 Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) {
1524 // If [JSInvocationMirror.invokeOn] has been called, we must not create a 1524 // If [JSInvocationMirror._invokeOn] has been called, we must not create a
1525 // typed selector based on the receiver type. 1525 // typed selector based on the receiver type.
1526 if (node.element == null && // Invocation is not exact. 1526 if (node.element == null && // Invocation is not exact.
1527 backend.compiler.enabledInvokeOn) { 1527 backend.compiler.enabledInvokeOn) {
1528 return selector; 1528 return selector;
1529 } 1529 }
1530 HType receiverType = node.getDartReceiver(compiler).instructionType; 1530 HType receiverType = node.getDartReceiver(compiler).instructionType;
1531 return receiverType.refine(selector, compiler); 1531 return receiverType.refine(selector, compiler);
1532 } 1532 }
1533 1533
1534 void registerInvoke(HInvokeDynamic node, Selector selector) { 1534 void registerInvoke(HInvokeDynamic node, Selector selector) {
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 if (leftType.canBeNull() && rightType.canBeNull()) { 2999 if (leftType.canBeNull() && rightType.canBeNull()) {
3000 if (left.isConstantNull() || right.isConstantNull() || 3000 if (left.isConstantNull() || right.isConstantNull() ||
3001 (leftType.isPrimitive() && leftType == rightType)) { 3001 (leftType.isPrimitive() && leftType == rightType)) {
3002 return '=='; 3002 return '==';
3003 } 3003 }
3004 return null; 3004 return null;
3005 } else { 3005 } else {
3006 return '==='; 3006 return '===';
3007 } 3007 }
3008 } 3008 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | dart/sdk/lib/core/invocation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698