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

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

Issue 14636002: Make TypeMask an interface and start hiding implementation details of FlatTypeMask. (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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1696 // TODO(kasperl): This looks shaky. It makes sense if the type is
1697 // exact, but otherwise we should be registering more types as 1697 // exact, but otherwise we should be registering more types as
1698 // instantiated. We should find a way of using something along the 1698 // instantiated. We should find a way of using something along the
1699 // lines of the NativeEnqueuerBase.processNativeBehavior method. 1699 // lines of the NativeEnqueuerBase.processNativeBehavior method.
1700 if (type.isUnknown()) return; 1700 if (type.isUnknown()) return;
1701 TypeMask mask = type.computeMask(compiler); 1701 TypeMask mask = type.computeMask(compiler);
1702 world.registerInstantiatedClass(mask.base.element, work.resolutionTree); 1702 world.registerInstantiatedClass(mask.topClass(), work.resolutionTree);
kasperl 2013/04/30 14:03:24 Would exactClass work here?
ngeoffray 2013/05/01 12:56:16 No, so I use containedClasses instead.
1703 } 1703 }
1704 1704
1705 visitForeign(HForeign node) { 1705 visitForeign(HForeign node) {
1706 String code = node.code.slowToString(); 1706 String code = node.code.slowToString();
1707 List<HInstruction> inputs = node.inputs; 1707 List<HInstruction> inputs = node.inputs;
1708 if (node.isJsStatement()) { 1708 if (node.isJsStatement()) {
1709 if (!inputs.isEmpty) { 1709 if (!inputs.isEmpty) {
1710 compiler.internalError("foreign statement with inputs: $code", 1710 compiler.internalError("foreign statement with inputs: $code",
1711 instruction: node); 1711 instruction: node);
1712 } 1712 }
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2982 if (leftType.canBeNull() && rightType.canBeNull()) { 2982 if (leftType.canBeNull() && rightType.canBeNull()) {
2983 if (left.isConstantNull() || right.isConstantNull() || 2983 if (left.isConstantNull() || right.isConstantNull() ||
2984 (leftType.isPrimitive() && leftType == rightType)) { 2984 (leftType.isPrimitive() && leftType == rightType)) {
2985 return '=='; 2985 return '==';
2986 } 2986 }
2987 return null; 2987 return null;
2988 } else { 2988 } else {
2989 return '==='; 2989 return '===';
2990 } 2990 }
2991 } 2991 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698