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

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: 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 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 } 1772 }
1773 pushStatement(new js.LiteralStatement(code), node); 1773 pushStatement(new js.LiteralStatement(code), node);
1774 } else { 1774 } else {
1775 List<js.Expression> data = <js.Expression>[]; 1775 List<js.Expression> data = <js.Expression>[];
1776 for (int i = 0; i < inputs.length; i++) { 1776 for (int i = 0; i < inputs.length; i++) {
1777 use(inputs[i]); 1777 use(inputs[i]);
1778 data.add(pop()); 1778 data.add(pop());
1779 } 1779 }
1780 push(new js.LiteralExpression.withData(code, data), node); 1780 push(new js.LiteralExpression.withData(code, data), node);
1781 } 1781 }
1782 // TODO(sra): Tell world.nativeEnqueuer about the types created here.
1782 } 1783 }
1783 1784
1784 visitForeignNew(HForeignNew node) { 1785 visitForeignNew(HForeignNew node) {
1785 visitedForeignCode = true; 1786 visitedForeignCode = true;
1786 String jsClassReference = backend.namer.isolateAccess(node.element); 1787 String jsClassReference = backend.namer.isolateAccess(node.element);
1787 List<HInstruction> inputs = node.inputs; 1788 List<HInstruction> inputs = node.inputs;
1788 // We can't use 'visitArguments', since our arguments start at input[0]. 1789 // We can't use 'visitArguments', since our arguments start at input[0].
1789 List<js.Expression> arguments = <js.Expression>[]; 1790 List<js.Expression> arguments = <js.Expression>[];
1790 for (int i = 0; i < inputs.length; i++) { 1791 for (int i = 0; i < inputs.length; i++) {
1791 use(inputs[i]); 1792 use(inputs[i]);
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 if (leftType.canBeNull() && rightType.canBeNull()) { 3105 if (leftType.canBeNull() && rightType.canBeNull()) {
3105 if (left.isConstantNull() || right.isConstantNull() || 3106 if (left.isConstantNull() || right.isConstantNull() ||
3106 (leftType.isPrimitive() && leftType == rightType)) { 3107 (leftType.isPrimitive() && leftType == rightType)) {
3107 return '=='; 3108 return '==';
3108 } 3109 }
3109 return null; 3110 return null;
3110 } else { 3111 } else {
3111 return '==='; 3112 return '===';
3112 } 3113 }
3113 } 3114 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698