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

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

Issue 11336011: Revert "Change signature of noSuchMethod to take an InvocationMirror." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 world.registerDynamicInvocation(name, selector); 1508 world.registerDynamicInvocation(name, selector);
1509 } 1509 }
1510 } 1510 }
1511 push(jsPropertyCall(object, methodName, arguments), node); 1511 push(jsPropertyCall(object, methodName, arguments), node);
1512 } 1512 }
1513 1513
1514 Selector getOptimizedSelectorFor(HInvokeDynamic node, 1514 Selector getOptimizedSelectorFor(HInvokeDynamic node,
1515 Selector defaultSelector) { 1515 Selector defaultSelector) {
1516 // TODO(4434): For private members we need to use the untyped selector. 1516 // TODO(4434): For private members we need to use the untyped selector.
1517 if (defaultSelector.name.isPrivate()) return defaultSelector; 1517 if (defaultSelector.name.isPrivate()) return defaultSelector;
1518 // If [JSInvocationMirror.invokeOn] has been called, we must not create a
1519 // typed selector based on the receiver type.
1520 if (node.element == null && // Invocation is not exact.
1521 backend.compiler.enabledInvokeOn) {
1522 return defaultSelector;
1523 }
1524 HType receiverHType = types[node.inputs[0]]; 1518 HType receiverHType = types[node.inputs[0]];
1525 DartType receiverType = receiverHType.computeType(compiler); 1519 DartType receiverType = receiverHType.computeType(compiler);
1526 if (receiverType != null) { 1520 if (receiverType != null) {
1527 return new TypedSelector(receiverType, defaultSelector); 1521 return new TypedSelector(receiverType, defaultSelector);
1528 } else { 1522 } else {
1529 return defaultSelector; 1523 return defaultSelector;
1530 } 1524 }
1531 } 1525 }
1532 1526
1533 visitInvokeDynamicSetter(HInvokeDynamicSetter node) { 1527 visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 if (leftType.canBeNull() && rightType.canBeNull()) { 2994 if (leftType.canBeNull() && rightType.canBeNull()) {
3001 if (left.isConstantNull() || right.isConstantNull() || 2995 if (left.isConstantNull() || right.isConstantNull() ||
3002 (leftType.isPrimitive() && leftType == rightType)) { 2996 (leftType.isPrimitive() && leftType == rightType)) {
3003 return '=='; 2997 return '==';
3004 } 2998 }
3005 return null; 2999 return null;
3006 } else { 3000 } else {
3007 return '==='; 3001 return '===';
3008 } 3002 }
3009 } 3003 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/js_helper.dart ('k') | lib/compiler/implementation/universe/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698