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

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

Issue 10165004: 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
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..42c4c7e4ac9d73d3132f3887e7127f372ec89c30 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 getEnclosingLoopHeader() {
kasperl 2012/04/20 12:07:31 Maybe drop the 'get' prefix?
floitsch 2012/04/20 12:43:47 How would you know it's not just a field (like par
kasperl 2012/04/20 12:52:14 Like I know hashCode() isn't a field :-)
floitsch 2012/04/20 13:51:21 I let Nicolas decide: now it's a getter :)
+ if (isLoopHeader()) return this;
+ return parentLoopHeader;
+ }
+
bool hasGuards() => !guards.isEmpty();
void open() {
« lib/compiler/implementation/ssa/bailout.dart ('K') | « lib/compiler/implementation/ssa/bailout.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698