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

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

Issue 12764005: Get rid of old code for union/intersection in HType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused factory methods. Created 7 years, 9 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 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 // TODO(kasperl): If we have a typed selector for the call, we 1616 // TODO(kasperl): If we have a typed selector for the call, we
1617 // may know something about the types of closures that need 1617 // may know something about the types of closures that need
1618 // the specific closure call method. 1618 // the specific closure call method.
1619 Selector call = new Selector.callClosureFrom(selector); 1619 Selector call = new Selector.callClosureFrom(selector);
1620 world.registerDynamicInvocation(call.name, call); 1620 world.registerDynamicInvocation(call.name, call);
1621 } 1621 }
1622 1622
1623 if (target != null) { 1623 if (target != null) {
1624 // If we know we're calling a specific method, register that 1624 // If we know we're calling a specific method, register that
1625 // method only. 1625 // method only.
1626 assert(selector.mask != null);
1627 world.registerDynamicInvocationOf(target, selector); 1626 world.registerDynamicInvocationOf(target, selector);
1628 } else { 1627 } else {
1629 SourceString name = node.selector.name; 1628 SourceString name = node.selector.name;
1630 world.registerDynamicInvocation(name, selector); 1629 world.registerDynamicInvocation(name, selector);
1631 } 1630 }
1632 registerInvoke(node, selector); 1631 registerInvoke(node, selector);
1633 } 1632 }
1634 1633
1635 void registerSetter(HInvokeDynamic node) { 1634 void registerSetter(HInvokeDynamic node) {
1636 Selector selector = getOptimizedSelectorFor(node, node.selector); 1635 Selector selector = getOptimizedSelectorFor(node, node.selector);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 DartType type = node.receiver.instructionType.computeType(compiler); 1729 DartType type = node.receiver.instructionType.computeType(compiler);
1731 if (type != null && !identical(type.kind, TypeKind.MALFORMED_TYPE)) { 1730 if (type != null && !identical(type.kind, TypeKind.MALFORMED_TYPE)) {
1732 world.registerFieldGetter(element); 1731 world.registerFieldGetter(element);
1733 } 1732 }
1734 } 1733 }
1735 } 1734 }
1736 1735
1737 visitFieldSet(HFieldSet node) { 1736 visitFieldSet(HFieldSet node) {
1738 Element element = node.element; 1737 Element element = node.element;
1739 String name = _fieldPropertyName(element); 1738 String name = _fieldPropertyName(element);
1740 DartType type = node.receiver.instructionType.computeType(compiler); 1739 if (!node.receiver.instructionType.isUnknown()) {
1741 if (type != null && !identical(type.kind, TypeKind.MALFORMED_TYPE)) {
1742 // Field setters in the generative constructor body are handled in a 1740 // Field setters in the generative constructor body are handled in a
1743 // step "SsaConstructionFieldTypes" in the ssa optimizer. 1741 // step "SsaConstructionFieldTypes" in the ssa optimizer.
1744 if (!work.element.isGenerativeConstructorBody()) { 1742 if (!work.element.isGenerativeConstructorBody()) {
1745 world.registerFieldSetter(element); 1743 world.registerFieldSetter(element);
1746 backend.registerFieldSetter( 1744 backend.registerFieldSetter(
1747 work.element, element, node.value.instructionType); 1745 work.element, element, node.value.instructionType);
1748 } 1746 }
1749 } 1747 }
1750 use(node.receiver); 1748 use(node.receiver);
1751 js.Expression receiver = pop(); 1749 js.Expression receiver = pop();
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 if (leftType.canBeNull() && rightType.canBeNull()) { 2961 if (leftType.canBeNull() && rightType.canBeNull()) {
2964 if (left.isConstantNull() || right.isConstantNull() || 2962 if (left.isConstantNull() || right.isConstantNull() ||
2965 (leftType.isPrimitive() && leftType == rightType)) { 2963 (leftType.isPrimitive() && leftType == rightType)) {
2966 return '=='; 2964 return '==';
2967 } 2965 }
2968 return null; 2966 return null;
2969 } else { 2967 } else {
2970 return '==='; 2968 return '===';
2971 } 2969 }
2972 } 2970 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698