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

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

Issue 11358140: This assert was obsolete after our type propagation rewrite, and it is now hit by some tests in hos… (Closed) Base URL: http://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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 abstract class OptimizationPhase { 7 abstract class OptimizationPhase {
8 String get name; 8 String get name;
9 void visitGraph(HGraph graph); 9 void visitGraph(HGraph graph);
10 } 10 }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // Note that we still have to call [super] to make sure that we end up 391 // Note that we still have to call [super] to make sure that we end up
392 // in the remaining optimizations. 392 // in the remaining optimizations.
393 return super.visitRelational(node); 393 return super.visitRelational(node);
394 } 394 }
395 395
396 HInstruction handleIdentityCheck(HInvokeBinary node) { 396 HInstruction handleIdentityCheck(HInvokeBinary node) {
397 HInstruction left = node.left; 397 HInstruction left = node.left;
398 HInstruction right = node.right; 398 HInstruction right = node.right;
399 HType leftType = types[left]; 399 HType leftType = types[left];
400 HType rightType = types[right]; 400 HType rightType = types[right];
401 assert(!leftType.isConflicting() && !rightType.isConflicting());
402 401
403 // We don't optimize on numbers to preserve the runtime semantics. 402 // We don't optimize on numbers to preserve the runtime semantics.
404 if (!(left.isNumberOrNull(types) && right.isNumberOrNull(types)) && 403 if (!(left.isNumberOrNull(types) && right.isNumberOrNull(types)) &&
405 leftType.intersection(rightType, compiler).isConflicting()) { 404 leftType.intersection(rightType, compiler).isConflicting()) {
406 return graph.addConstantBool(false, constantSystem); 405 return graph.addConstantBool(false, constantSystem);
407 } 406 }
408 407
409 if (left.isConstantBoolean() && right.isBoolean(types)) { 408 if (left.isConstantBoolean() && right.isBoolean(types)) {
410 HConstant constant = left; 409 HConstant constant = left;
411 if (constant.constant.isTrue()) { 410 if (constant.constant.isTrue()) {
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 } 1349 }
1351 1350
1352 // For other fields having setters in the generative constructor body, set 1351 // For other fields having setters in the generative constructor body, set
1353 // the type to UNKNOWN to avoid relying on the type set in the initializer 1352 // the type to UNKNOWN to avoid relying on the type set in the initializer
1354 // list. 1353 // list.
1355 allSetters.forEach((Element element) { 1354 allSetters.forEach((Element element) {
1356 backend.registerFieldConstructor(element, HType.UNKNOWN); 1355 backend.registerFieldConstructor(element, HType.UNKNOWN);
1357 }); 1356 });
1358 } 1357 }
1359 } 1358 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698