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

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

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review fixes Created 8 years, 1 month 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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 } 1765 }
1766 pushStatement(new js.LiteralStatement(code), node); 1766 pushStatement(new js.LiteralStatement(code), node);
1767 } else { 1767 } else {
1768 List<js.Expression> data = <js.Expression>[]; 1768 List<js.Expression> data = <js.Expression>[];
1769 for (int i = 0; i < inputs.length; i++) { 1769 for (int i = 0; i < inputs.length; i++) {
1770 use(inputs[i]); 1770 use(inputs[i]);
1771 data.add(pop()); 1771 data.add(pop());
1772 } 1772 }
1773 push(new js.LiteralExpression.withData(code, data), node); 1773 push(new js.LiteralExpression.withData(code, data), node);
1774 } 1774 }
1775 // TODO(sra): Tell world.nativeEnqueuer about the types created here.
1775 } 1776 }
1776 1777
1777 visitForeignNew(HForeignNew node) { 1778 visitForeignNew(HForeignNew node) {
1778 visitedForeignCode = true; 1779 visitedForeignCode = true;
1779 String jsClassReference = backend.namer.isolateAccess(node.element); 1780 String jsClassReference = backend.namer.isolateAccess(node.element);
1780 List<HInstruction> inputs = node.inputs; 1781 List<HInstruction> inputs = node.inputs;
1781 // We can't use 'visitArguments', since our arguments start at input[0]. 1782 // We can't use 'visitArguments', since our arguments start at input[0].
1782 List<js.Expression> arguments = <js.Expression>[]; 1783 List<js.Expression> arguments = <js.Expression>[];
1783 for (int i = 0; i < inputs.length; i++) { 1784 for (int i = 0; i < inputs.length; i++) {
1784 use(inputs[i]); 1785 use(inputs[i]);
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 if (leftType.canBeNull() && rightType.canBeNull()) { 3102 if (leftType.canBeNull() && rightType.canBeNull()) {
3102 if (left.isConstantNull() || right.isConstantNull() || 3103 if (left.isConstantNull() || right.isConstantNull() ||
3103 (leftType.isPrimitive() && leftType == rightType)) { 3104 (leftType.isPrimitive() && leftType == rightType)) {
3104 return '=='; 3105 return '==';
3105 } 3106 }
3106 return null; 3107 return null;
3107 } else { 3108 } else {
3108 return '==='; 3109 return '===';
3109 } 3110 }
3110 } 3111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698