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

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

Issue 10889022: Address comments from CL 10660026. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen_helpers.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 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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 } 1641 }
1642 1642
1643 visitLocalSet(HLocalSet node) { 1643 visitLocalSet(HLocalSet node) {
1644 use(node.value); 1644 use(node.value);
1645 assignVariable(variableNames.getName(node.receiver), pop()); 1645 assignVariable(variableNames.getName(node.receiver), pop());
1646 } 1646 }
1647 1647
1648 visitForeign(HForeign node) { 1648 visitForeign(HForeign node) {
1649 String code = node.code.slowToString(); 1649 String code = node.code.slowToString();
1650 List<HInstruction> inputs = node.inputs; 1650 List<HInstruction> inputs = node.inputs;
1651 if (node.isStatement(types)) { 1651 if (node.isJsStatement(types)) {
1652 if (!inputs.isEmpty()) { 1652 if (!inputs.isEmpty()) {
1653 compiler.internalError("foreign statement with inputs: $code", 1653 compiler.internalError("foreign statement with inputs: $code",
1654 instruction: node); 1654 instruction: node);
1655 } 1655 }
1656 pushStatement(new js.LiteralStatement(code), node); 1656 pushStatement(new js.LiteralStatement(code), node);
1657 } else { 1657 } else {
1658 List<js.Expression> data = <js.Expression>[]; 1658 List<js.Expression> data = <js.Expression>[];
1659 for (int i = 0; i < inputs.length; i++) { 1659 for (int i = 0; i < inputs.length; i++) {
1660 use(inputs[i]); 1660 use(inputs[i]);
1661 data.add(pop()); 1661 data.add(pop());
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2925 if (leftType.canBeNull() && rightType.canBeNull()) { 2925 if (leftType.canBeNull() && rightType.canBeNull()) {
2926 if (left.isConstantNull() || right.isConstantNull() || 2926 if (left.isConstantNull() || right.isConstantNull() ||
2927 (leftType.isPrimitive() && leftType == rightType)) { 2927 (leftType.isPrimitive() && leftType == rightType)) {
2928 return '=='; 2928 return '==';
2929 } 2929 }
2930 return null; 2930 return null;
2931 } else { 2931 } else {
2932 return '==='; 2932 return '===';
2933 } 2933 }
2934 } 2934 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698