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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart

Issue 1161793002: Revert "dart2js cps: 'is' checks on types with type arguments." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'optimization.dart' show Pass; 5 import 'optimization.dart' show Pass;
6 import '../tree_ir_nodes.dart'; 6 import '../tree_ir_nodes.dart';
7 7
8 /// Pulls assignment expressions to the top of the function body so they can be 8 /// Pulls assignment expressions to the top of the function body so they can be
9 /// translated into declaration-site variable initializaters. 9 /// translated into declaration-site variable initializaters.
10 /// 10 ///
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 entry.key = visitExpression(entry.key); 240 entry.key = visitExpression(entry.key);
241 if (seenImpure) return node; 241 if (seenImpure) return node;
242 entry.value = visitExpression(entry.value); 242 entry.value = visitExpression(entry.value);
243 if (seenImpure) return node; 243 if (seenImpure) return node;
244 } 244 }
245 if (node.type != null) seenImpure = true; // Type casts can throw. 245 if (node.type != null) seenImpure = true; // Type casts can throw.
246 return node; 246 return node;
247 } 247 }
248 248
249 Expression visitTypeOperator(TypeOperator node) { 249 Expression visitTypeOperator(TypeOperator node) {
250 node.value = visitExpression(node.value); 250 node.receiver = visitExpression(node.receiver);
251 if (seenImpure) return node;
252 rewriteList(node.typeArguments);
253 if (!node.isTypeTest) seenImpure = true; // Type cast can throw. 251 if (!node.isTypeTest) seenImpure = true; // Type cast can throw.
254 return node; 252 return node;
255 } 253 }
256 254
257 void visitInnerFunction(FunctionDefinition node) { 255 void visitInnerFunction(FunctionDefinition node) {
258 node.body = new BodyRewriter().rewriteBody(node.parameters, node.body); 256 node.body = new BodyRewriter().rewriteBody(node.parameters, node.body);
259 } 257 }
260 258
261 Expression visitFunctionExpression(FunctionExpression node) { 259 Expression visitFunctionExpression(FunctionExpression node) {
262 visitInnerFunction(node.definition); 260 visitInnerFunction(node.definition);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 324
327 Expression visitVariableUse(VariableUse node) { 325 Expression visitVariableUse(VariableUse node) {
328 return node; 326 return node;
329 } 327 }
330 328
331 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { 329 Expression visitCreateInvocationMirror(CreateInvocationMirror node) {
332 rewriteList(node.arguments); 330 rewriteList(node.arguments);
333 return node; 331 return node;
334 } 332 }
335 } 333 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698