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

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

Issue 10905305: Patch refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years, 3 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 6
7 final JavaScriptBackend backend; 7 final JavaScriptBackend backend;
8 8
9 SsaCodeGeneratorTask(JavaScriptBackend backend) 9 SsaCodeGeneratorTask(JavaScriptBackend backend)
10 : this.backend = backend, 10 : this.backend = backend,
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 } 1699 }
1700 push(new js.LiteralExpression.withData(code, data), node); 1700 push(new js.LiteralExpression.withData(code, data), node);
1701 } 1701 }
1702 } 1702 }
1703 1703
1704 visitForeignNew(HForeignNew node) { 1704 visitForeignNew(HForeignNew node) {
1705 int j = 0; 1705 int j = 0;
1706 node.element.forEachInstanceField( 1706 node.element.forEachInstanceField(
1707 includeBackendMembers: true, 1707 includeBackendMembers: true,
1708 includeSuperMembers: true, 1708 includeSuperMembers: true,
1709 includeInjectedMembers: true,
1709 f: (ClassElement enclosingClass, Element member) { 1710 f: (ClassElement enclosingClass, Element member) {
1710 backend.updateFieldInitializers(member, types[node.inputs[j]]); 1711 backend.updateFieldInitializers(member, types[node.inputs[j]]);
1711 j++; 1712 j++;
1712 }); 1713 });
1713 String jsClassReference = backend.namer.isolateAccess(node.element); 1714 String jsClassReference = backend.namer.isolateAccess(node.element);
1714 List<HInstruction> inputs = node.inputs; 1715 List<HInstruction> inputs = node.inputs;
1715 // We can't use 'visitArguments', since our arguments start at input[0]. 1716 // We can't use 'visitArguments', since our arguments start at input[0].
1716 List<js.Expression> arguments = <js.Expression>[]; 1717 List<js.Expression> arguments = <js.Expression>[];
1717 for (int i = 0; i < inputs.length; i++) { 1718 for (int i = 0; i < inputs.length; i++) {
1718 use(inputs[i]); 1719 use(inputs[i]);
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2994 if (leftType.canBeNull() && rightType.canBeNull()) { 2995 if (leftType.canBeNull() && rightType.canBeNull()) {
2995 if (left.isConstantNull() || right.isConstantNull() || 2996 if (left.isConstantNull() || right.isConstantNull() ||
2996 (leftType.isPrimitive() && leftType == rightType)) { 2997 (leftType.isPrimitive() && leftType == rightType)) {
2997 return '=='; 2998 return '==';
2998 } 2999 }
2999 return null; 3000 return null;
3000 } else { 3001 } else {
3001 return '==='; 3002 return '===';
3002 } 3003 }
3003 } 3004 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698