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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10171007: Reapply "Only emit typeguards if we think they are valuable." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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
« no previous file with comments | « lib/compiler/implementation/ssa/bailout.dart ('k') | tests/language/src/ListDoubleIndexInLoop2Test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 795a2157aa1a57488bb51f6a124a09459822507d..19f794894f0250e7588c7940155c9b81fbd85197 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -445,6 +445,11 @@ class HBasicBlock extends HInstructionList implements Hashable {
bool isLoopHeader() => blockInformation is HLoopInformation;
bool isLabeledBlock() => blockInformation is HLabeledBlockInformation;
+ HBasicBlock get enclosingLoopHeader() {
+ if (isLoopHeader()) return this;
+ return parentLoopHeader;
+ }
+
bool hasGuards() => !guards.isEmpty();
void open() {
« no previous file with comments | « lib/compiler/implementation/ssa/bailout.dart ('k') | tests/language/src/ListDoubleIndexInLoop2Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698