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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 807573003: Fix some bugs that blocked optimizations in the new IRs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index 4f42e9de31ca6fb4696ea978f5e9d0f230125035..5c9da0f5390f60913e6effbc266e70271eabcffa 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -1646,8 +1646,10 @@ class DartIrBuilder extends IrBuilder {
ir.Primitive buildLocalGet(LocalElement local) {
assert(isOpen);
if (isInClosureVariable(local)) {
- ir.Primitive result = new ir.GetClosureVariable(getClosureVariable(local));
- result.useElementAsHint(local);
+ // Do not use [local] as a hint on [result]. The variable should always
+ // be inlined, but the hint prevents it.
+ ir.Primitive result =
+ new ir.GetClosureVariable(getClosureVariable(local));
add(new ir.LetPrim(result));
return result;
} else {

Powered by Google App Engine
This is Rietveld 408576698