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

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

Issue 12310103: Small cleanups in RegExp to avoid generating lots of code just because there is a try/catch in our … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 19035)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -138,8 +138,16 @@
// If we can replace [instruction] with [replacement], then
// [replacement]'s type can be narrowed.
- replacement.instructionType = replacement.instructionType.intersection(
+ HType newType = replacement.instructionType.intersection(
instruction.instructionType, compiler);
+ if (!newType.isConflicting()) {
+ // [HType.intersection] may give up when doing the
+ // intersection of two types is too complicated, and return
+ // [HType.CONFLICTING]. We do not want instructions to have
+ // [HType.CONFLICTING], so we only update the type if the
+ // intersection did not give up.
+ replacement.instructionType = newType;
+ }
// If the replacement instruction does not know its
// source element, use the source element of the

Powered by Google App Engine
This is Rietveld 408576698