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

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

Issue 12211112: Start work on a non-complete type inferrer. Currently only analyzes return types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 // TODO(kasperl): If we have a typed selector for the call, we 1610 // TODO(kasperl): If we have a typed selector for the call, we
1611 // may know something about the types of closures that need 1611 // may know something about the types of closures that need
1612 // the specific closure call method. 1612 // the specific closure call method.
1613 Selector call = new Selector.callClosureFrom(selector); 1613 Selector call = new Selector.callClosureFrom(selector);
1614 world.registerDynamicInvocation(call.name, call); 1614 world.registerDynamicInvocation(call.name, call);
1615 } 1615 }
1616 1616
1617 if (target != null) { 1617 if (target != null) {
1618 // If we know we're calling a specific method, register that 1618 // If we know we're calling a specific method, register that
1619 // method only. 1619 // method only.
1620 assert(selector.typeKind != TypedSelectorKind.UNKNOWN);
1620 world.registerDynamicInvocationOf(target, selector); 1621 world.registerDynamicInvocationOf(target, selector);
1621 } else { 1622 } else {
1622 SourceString name = node.selector.name; 1623 SourceString name = node.selector.name;
1623 world.registerDynamicInvocation(name, selector); 1624 world.registerDynamicInvocation(name, selector);
1624 } 1625 }
1625 registerInvoke(node); 1626 registerInvoke(node);
1626 } 1627 }
1627 1628
1628 void registerSetter(HInvokeDynamic node) { 1629 void registerSetter(HInvokeDynamic node) {
1629 Selector selector = getOptimizedSelectorFor(node, node.selector); 1630 Selector selector = getOptimizedSelectorFor(node, node.selector);
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 if (leftType.canBeNull() && rightType.canBeNull()) { 2989 if (leftType.canBeNull() && rightType.canBeNull()) {
2989 if (left.isConstantNull() || right.isConstantNull() || 2990 if (left.isConstantNull() || right.isConstantNull() ||
2990 (leftType.isPrimitive() && leftType == rightType)) { 2991 (leftType.isPrimitive() && leftType == rightType)) {
2991 return '=='; 2992 return '==';
2992 } 2993 }
2993 return null; 2994 return null;
2994 } else { 2995 } else {
2995 return '==='; 2996 return '===';
2996 } 2997 }
2997 } 2998 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698