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

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

Issue 10826045: Substitution handled for most Send nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/ssa.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 checkObject(input, '==='); 2565 checkObject(input, '===');
2566 buffer.add(' && '); 2566 buffer.add(' && ');
2567 checkType(input, element); 2567 checkType(input, element);
2568 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 2568 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
2569 } else { 2569 } else {
2570 checkType(input, element); 2570 checkType(input, element);
2571 } 2571 }
2572 if (compiler.codegenWorld.rti.hasTypeArguments(type)) { 2572 if (compiler.codegenWorld.rti.hasTypeArguments(type)) {
2573 InterfaceType interfaceType = type; 2573 InterfaceType interfaceType = type;
2574 ClassElement cls = type.element; 2574 ClassElement cls = type.element;
2575 Link<Type> arguments = interfaceType.arguments; 2575 Link<Type> arguments = interfaceType.typeArguments;
2576 buffer.add(' && '); 2576 buffer.add(' && ');
2577 checkObject(node.typeInfoCall, '==='); 2577 checkObject(node.typeInfoCall, '===');
2578 cls.typeParameters.forEach((name, _) { 2578 cls.typeParameters.forEach((name, _) {
2579 buffer.add(' && '); 2579 buffer.add(' && ');
2580 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 2580 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
2581 use(node.typeInfoCall, JSPrecedence.EQUALITY_PRECEDENCE); 2581 use(node.typeInfoCall, JSPrecedence.EQUALITY_PRECEDENCE);
2582 buffer.add(".${name.slowToString()} === '${arguments.head}'"); 2582 buffer.add(".${name.slowToString()} === '${arguments.head}'");
2583 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 2583 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
2584 }); 2584 });
2585 } 2585 }
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 if (leftType.canBeNull() && rightType.canBeNull()) { 3179 if (leftType.canBeNull() && rightType.canBeNull()) {
3180 if (left.isConstantNull() || right.isConstantNull() || 3180 if (left.isConstantNull() || right.isConstantNull() ||
3181 (leftType.isPrimitive() && leftType == rightType)) { 3181 (leftType.isPrimitive() && leftType == rightType)) {
3182 return '=='; 3182 return '==';
3183 } 3183 }
3184 return null; 3184 return null;
3185 } else { 3185 } else {
3186 return '==='; 3186 return '===';
3187 } 3187 }
3188 } 3188 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698