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

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

Issue 10911062: Codegen support for the argument definition test. (Closed) Base URL: http://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
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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 } else if (constant.isString()) { 1708 } else if (constant.isString()) {
1709 // TODO(floitsch): get rid of the code buffer. 1709 // TODO(floitsch): get rid of the code buffer.
1710 CodeBuffer buffer = new CodeBuffer(); 1710 CodeBuffer buffer = new CodeBuffer();
1711 handler.writeConstant(buffer, constant); 1711 handler.writeConstant(buffer, constant);
1712 push(new js.LiteralString(buffer.toString())); 1712 push(new js.LiteralString(buffer.toString()));
1713 } else if (constant.isFunction()) { 1713 } else if (constant.isFunction()) {
1714 FunctionConstant function = constant; 1714 FunctionConstant function = constant;
1715 world.registerStaticUse(function.element); 1715 world.registerStaticUse(function.element);
1716 push(new js.VariableUse( 1716 push(new js.VariableUse(
1717 compiler.namer.isolateAccess(function.element))); 1717 compiler.namer.isolateAccess(function.element)));
1718 } else if (constant.isSentinel()) {
1719 // TODO(floitsch): get rid of the code buffer.
1720 CodeBuffer buffer = new CodeBuffer();
1721 handler.writeConstant(buffer, constant);
1722 push(new js.VariableUse(buffer.toString()));
1718 } else { 1723 } else {
1719 compiler.internalError( 1724 compiler.internalError(
1720 "The compiler does not know how generate code for " 1725 "The compiler does not know how generate code for "
1721 "constant $constant"); 1726 "constant $constant");
1722 } 1727 }
1723 } else { 1728 } else {
1724 js.VariableUse currentIsolateUse = 1729 js.VariableUse currentIsolateUse =
1725 new js.VariableUse(compiler.namer.CURRENT_ISOLATE); 1730 new js.VariableUse(compiler.namer.CURRENT_ISOLATE);
1726 push(new js.PropertyAccess.field(currentIsolateUse, name)); 1731 push(new js.PropertyAccess.field(currentIsolateUse, name));
1727 } 1732 }
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 if (leftType.canBeNull() && rightType.canBeNull()) { 2897 if (leftType.canBeNull() && rightType.canBeNull()) {
2893 if (left.isConstantNull() || right.isConstantNull() || 2898 if (left.isConstantNull() || right.isConstantNull() ||
2894 (leftType.isPrimitive() && leftType == rightType)) { 2899 (leftType.isPrimitive() && leftType == rightType)) {
2895 return '=='; 2900 return '==';
2896 } 2901 }
2897 return null; 2902 return null;
2898 } else { 2903 } else {
2899 return '==='; 2904 return '===';
2900 } 2905 }
2901 } 2906 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698