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

Unified Diff: dart/frog/leg/ssa/builder.dart

Issue 9836022: No globals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Nicolas' comment by doing horrible things ;-) Created 8 years, 9 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 | « no previous file | dart/frog/leg/ssa/closure.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/builder.dart
diff --git a/dart/frog/leg/ssa/builder.dart b/dart/frog/leg/ssa/builder.dart
index 30cdbe951515cd25f181e77a6ceeadcfe841ac18..61612d3a36357ef06025584243babb63acaf4a83 100644
--- a/dart/frog/leg/ssa/builder.dart
+++ b/dart/frog/leg/ssa/builder.dart
@@ -112,10 +112,15 @@ class Interceptors {
}
class SsaBuilderTask extends CompilerTask {
- SsaBuilderTask(Compiler compiler)
- : super(compiler), interceptors = new Interceptors(compiler);
+ final Interceptors interceptors;
+ final Map<Node, ClosureData> closureDataCache;
+
String get name() => 'SSA builder';
- Interceptors interceptors;
+
+ SsaBuilderTask(Compiler compiler)
+ : interceptors = new Interceptors(compiler),
+ closureDataCache = new HashMap<Node, ClosureData>(),
+ super(compiler);
HGraph build(WorkItem work) {
return measure(() {
@@ -1254,7 +1259,7 @@ class SsaBuilder implements Visitor {
}
visitFunctionExpression(FunctionExpression node) {
- ClosureData nestedClosureData = closureDataCache[node];
+ ClosureData nestedClosureData = compiler.builder.closureDataCache[node];
if (nestedClosureData === null) {
// TODO(floitsch): we can only assume that the reason for not having a
// closure data here is, because the function is inside an initializer.
« no previous file with comments | « no previous file | dart/frog/leg/ssa/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698