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

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

Issue 123423002: Fix checkedInstructionOrNonGenerateAtUseSite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/language/issue15720_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart b/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
index dc1ac267a2899a05985d991ddc320b6b491d3e65..bd95f58b00f2735768f5dfbd517aa42d437fde5e 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
@@ -225,6 +225,20 @@ class SsaLiveIntervalBuilder extends HBaseVisitor {
// Returns the non-HCheck instruction, or the last [HCheck] in the
// check chain that is not generate at use site.
+ //
+ // For example:
+ //
+ // t1 = GeneratedAtUseSite instruction
+ // t2 = check(t1)
+ // t3 = check(t2)
+ // t4 = use(t3)
+ // t5 = use(t3)
+ // t6 = use(t2)
+ //
+ // The t1 is generate-at-use site, and the live-range must thus be on t2 and
+ // not on the checked instruction t1.
+ // When looking for the checkedInstructionOrNonGenerateAtUseSite of t3 we must
+ // return t2.
HInstruction checkedInstructionOrNonGenerateAtUseSite(HCheck check) {
var checked = check.checkedInput;
while (checked is HCheck) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/language/issue15720_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698