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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 831133004: Use closure conversion in new dart2js backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed redundant null-check 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/tree_ir/tree_ir_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index d0f01f4251554462ba9c45901c52e3358df0b42a..4cc853c878f59dacfbea17a951d959d343450d67 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -47,10 +47,9 @@ class Builder extends cps_ir.Visitor<Node> {
final dart2js.InternalErrorFunction internalError;
/// Maps variable/parameter elements to the Tree variables that represent it.
- final Map<Element, List<Variable>> element2variables =
- <Element,List<Variable>>{};
+ final Map<Local, List<Variable>> local2variables = <Local, List<Variable>>{};
- /// Like [element2variables], except for closure variables.
+ /// Like [local2variables], except for closure variables.
final Map<cps_ir.ClosureVariable, Variable> local2closure =
<cps_ir.ClosureVariable, Variable>{};
@@ -87,7 +86,7 @@ class Builder extends cps_ir.Visitor<Node> {
if (primitive.registerIndex == null) {
return null; // variable is unused
}
- List<Variable> variables = element2variables.putIfAbsent(primitive.hint,
+ List<Variable> variables = local2variables.putIfAbsent(primitive.hint,
() => <Variable>[]);
while (variables.length <= primitive.registerIndex) {
variables.add(new Variable(currentElement, primitive.hint));
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698