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

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

Issue 14751009: Re-apply https://codereview.chromium.org/14636002/, but this time avoid creating TypeMask with dyna… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 visitLocalGet(HLocalGet node) { 1686 visitLocalGet(HLocalGet node) {
1687 use(node.receiver); 1687 use(node.receiver);
1688 } 1688 }
1689 1689
1690 visitLocalSet(HLocalSet node) { 1690 visitLocalSet(HLocalSet node) {
1691 use(node.value); 1691 use(node.value);
1692 assignVariable(variableNames.getName(node.receiver), pop()); 1692 assignVariable(variableNames.getName(node.receiver), pop());
1693 } 1693 }
1694 1694
1695 void registerForeignType(HType type) { 1695 void registerForeignType(HType type) {
1696 // TODO(kasperl): This looks shaky. It makes sense if the type is
1697 // exact, but otherwise we should be registering more types as
1698 // instantiated. We should find a way of using something along the
1699 // lines of the NativeEnqueuerBase.processNativeBehavior method.
1700 if (type.isUnknown()) return; 1696 if (type.isUnknown()) return;
1701 TypeMask mask = type.computeMask(compiler); 1697 TypeMask mask = type.computeMask(compiler);
1702 world.registerInstantiatedClass(mask.base.element, work.resolutionTree); 1698 for (ClassElement cls in mask.containedClasses(compiler)) {
1699 world.registerInstantiatedClass(cls, work.resolutionTree);
1700 }
1703 } 1701 }
1704 1702
1705 visitForeign(HForeign node) { 1703 visitForeign(HForeign node) {
1706 List<HInstruction> inputs = node.inputs; 1704 List<HInstruction> inputs = node.inputs;
1707 if (node.isJsStatement()) { 1705 if (node.isJsStatement()) {
1708 if (!inputs.isEmpty) { 1706 if (!inputs.isEmpty) {
1709 compiler.internalError("foreign statement with inputs", 1707 compiler.internalError("foreign statement with inputs",
1710 instruction: node); 1708 instruction: node);
1711 } 1709 }
1712 pushStatement(node.codeAst, node); 1710 pushStatement(node.codeAst, node);
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 if (leftType.canBeNull() && rightType.canBeNull()) { 2974 if (leftType.canBeNull() && rightType.canBeNull()) {
2977 if (left.isConstantNull() || right.isConstantNull() || 2975 if (left.isConstantNull() || right.isConstantNull() ||
2978 (leftType.isPrimitive() && leftType == rightType)) { 2976 (leftType.isPrimitive() && leftType == rightType)) {
2979 return '=='; 2977 return '==';
2980 } 2978 }
2981 return null; 2979 return null;
2982 } else { 2980 } else {
2983 return '==='; 2981 return '===';
2984 } 2982 }
2985 } 2983 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698