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

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

Issue 10377166: Prepare to have more than one universe. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 final JavaScriptBackend backend; 6 final JavaScriptBackend backend;
7 SsaCodeGeneratorTask(JavaScriptBackend backend) 7 SsaCodeGeneratorTask(JavaScriptBackend backend)
8 : this.backend = backend, 8 : this.backend = backend,
9 super(backend.compiler); 9 super(backend.compiler);
10 String get name() => 'SSA code generator'; 10 String get name() => 'SSA code generator';
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 } else if (input.propagatedType.canBePrimitive() 2141 } else if (input.propagatedType.canBePrimitive()
2142 || input.propagatedType.canBeNull()) { 2142 || input.propagatedType.canBeNull()) {
2143 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 2143 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
2144 checkObject(input, '==='); 2144 checkObject(input, '===');
2145 buffer.add(' && '); 2145 buffer.add(' && ');
2146 checkType(input, element); 2146 checkType(input, element);
2147 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 2147 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
2148 } else { 2148 } else {
2149 checkType(input, element); 2149 checkType(input, element);
2150 } 2150 }
2151 if (compiler.universe.rti.hasTypeArguments(type)) { 2151 if (compiler.codegenWorld.rti.hasTypeArguments(type)) {
2152 InterfaceType interfaceType = type; 2152 InterfaceType interfaceType = type;
2153 ClassElement cls = type.element; 2153 ClassElement cls = type.element;
2154 Link<Type> arguments = interfaceType.arguments; 2154 Link<Type> arguments = interfaceType.arguments;
2155 buffer.add(' && '); 2155 buffer.add(' && ');
2156 checkObject(node.typeInfoCall, '==='); 2156 checkObject(node.typeInfoCall, '===');
2157 cls.typeParameters.forEach((name, _) { 2157 cls.typeParameters.forEach((name, _) {
2158 buffer.add(' && '); 2158 buffer.add(' && ');
2159 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 2159 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
2160 use(node.typeInfoCall, JSPrecedence.EQUALITY_PRECEDENCE); 2160 use(node.typeInfoCall, JSPrecedence.EQUALITY_PRECEDENCE);
2161 buffer.add(".${name.slowToString()} === '${arguments.head}'"); 2161 buffer.add(".${name.slowToString()} === '${arguments.head}'");
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 startBailoutSwitch(); 2621 startBailoutSwitch();
2622 } 2622 }
2623 } 2623 }
2624 2624
2625 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { 2625 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) {
2626 if (labeledBlockInfo.body.start.hasGuards()) { 2626 if (labeledBlockInfo.body.start.hasGuards()) {
2627 endBailoutSwitch(); 2627 endBailoutSwitch();
2628 } 2628 }
2629 } 2629 }
2630 } 2630 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/ssa/closure.dart ('k') | dart/lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698