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

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

Issue 10880068: - Change "static final" to "static const" in the lib/ directory. (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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 * a subgraph. 124 * a subgraph.
125 * - [TYPE_STATEMENT] means that the graph must be generated as a statement, 125 * - [TYPE_STATEMENT] means that the graph must be generated as a statement,
126 * which is always possible. 126 * which is always possible.
127 * - [TYPE_EXPRESSION] means that the graph can be generated as an expression, 127 * - [TYPE_EXPRESSION] means that the graph can be generated as an expression,
128 * or possibly several comma-separated expressions. 128 * or possibly several comma-separated expressions.
129 * - [TYPE_DECLARATION] means that the graph can be generated as an 129 * - [TYPE_DECLARATION] means that the graph can be generated as an
130 * expression, and that it only generates expressions of the form 130 * expression, and that it only generates expressions of the form
131 * variable = expression 131 * variable = expression
132 * which are also valid as parts of a "var" declaration. 132 * which are also valid as parts of a "var" declaration.
133 */ 133 */
134 static final int TYPE_STATEMENT = 0; 134 static const int TYPE_STATEMENT = 0;
135 static final int TYPE_EXPRESSION = 1; 135 static const int TYPE_EXPRESSION = 1;
136 static final int TYPE_DECLARATION = 2; 136 static const int TYPE_DECLARATION = 2;
137 137
138 /** 138 /**
139 * Whether we are currently generating expressions instead of statements. 139 * Whether we are currently generating expressions instead of statements.
140 * This includes declarations, which are generated as expressions. 140 * This includes declarations, which are generated as expressions.
141 */ 141 */
142 bool isGeneratingExpression = false; 142 bool isGeneratingExpression = false;
143 143
144 final JavaScriptBackend backend; 144 final JavaScriptBackend backend;
145 final WorkItem work; 145 final WorkItem work;
146 final HTypeMap types; 146 final HTypeMap types;
(...skipping 2758 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 if (leftType.canBeNull() && rightType.canBeNull()) { 2905 if (leftType.canBeNull() && rightType.canBeNull()) {
2906 if (left.isConstantNull() || right.isConstantNull() || 2906 if (left.isConstantNull() || right.isConstantNull() ||
2907 (leftType.isPrimitive() && leftType == rightType)) { 2907 (leftType.isPrimitive() && leftType == rightType)) {
2908 return '=='; 2908 return '==';
2909 } 2909 }
2910 return null; 2910 return null;
2911 } else { 2911 } else {
2912 return '==='; 2912 return '===';
2913 } 2913 }
2914 } 2914 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/js_names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698