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

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

Issue 11543017: Revert r16032: it revealed a bug in our bailout environment computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 int len = node.inputs.length; 2159 int len = node.inputs.length;
2160 List<js.ArrayElement> elements = <js.ArrayElement>[]; 2160 List<js.ArrayElement> elements = <js.ArrayElement>[];
2161 for (int i = 0; i < len; i++) { 2161 for (int i = 0; i < len; i++) {
2162 use(node.inputs[i]); 2162 use(node.inputs[i]);
2163 elements.add(new js.ArrayElement(i, pop())); 2163 elements.add(new js.ArrayElement(i, pop()));
2164 } 2164 }
2165 push(new js.ArrayInitializer(len, elements), node); 2165 push(new js.ArrayInitializer(len, elements), node);
2166 } 2166 }
2167 2167
2168 void visitIndex(HIndex node) { 2168 void visitIndex(HIndex node) {
2169 use(node.receiver); 2169 if (node.isBuiltin(types)) {
2170 js.Expression receiver = pop(); 2170 use(node.inputs[1]);
2171 use(node.index); 2171 js.Expression receiver = pop();
2172 push(new js.PropertyAccess(receiver, pop()), node); 2172 use(node.inputs[2]);
2173 push(new js.PropertyAccess(receiver, pop()), node);
2174 } else {
2175 visitInvokeStatic(node);
2176 }
2173 } 2177 }
2174 2178
2175 void visitIndexAssign(HIndexAssign node) { 2179 void visitIndexAssign(HIndexAssign node) {
2176 if (node.isBuiltin(types)) { 2180 if (node.isBuiltin(types)) {
2177 use(node.inputs[1]); 2181 use(node.inputs[1]);
2178 js.Expression receiver = pop(); 2182 js.Expression receiver = pop();
2179 use(node.inputs[2]); 2183 use(node.inputs[2]);
2180 js.Expression index = pop(); 2184 js.Expression index = pop();
2181 use(node.inputs[3]); 2185 use(node.inputs[3]);
2182 push(new js.Assignment(new js.PropertyAccess(receiver, index), pop()), 2186 push(new js.Assignment(new js.PropertyAccess(receiver, index), pop()),
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 if (leftType.canBeNull() && rightType.canBeNull()) { 3050 if (leftType.canBeNull() && rightType.canBeNull()) {
3047 if (left.isConstantNull() || right.isConstantNull() || 3051 if (left.isConstantNull() || right.isConstantNull() ||
3048 (leftType.isPrimitive() && leftType == rightType)) { 3052 (leftType.isPrimitive() && leftType == rightType)) {
3049 return '=='; 3053 return '==';
3050 } 3054 }
3051 return null; 3055 return null;
3052 } else { 3056 } else {
3053 return '==='; 3057 return '===';
3054 } 3058 }
3055 } 3059 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698