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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder.dart

Issue 849933003: dart2js: register static non final fields in the model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/registry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder.dart
index ead4a315a6e4625d0a5a1a457d65e54b3a4dc398..b335ae00ffff347c74837c78035788365bdf53d6 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder.dart
@@ -61,6 +61,7 @@ class ProgramBuilder {
_task.outputClassLists.forEach(_registry.registerElements);
_task.outputStaticLists.forEach(_registry.registerElements);
_task.outputConstantLists.forEach(_registerConstants);
+ _task.outputStaticNonFinalFieldLists.forEach(_registry.registerElements);
// TODO(kasperl): There's code that implicitly needs access to the special
// $ holder so we have to register that. Can we track if we have to?
@@ -437,7 +438,8 @@ class ProgramBuilder {
}
void _registerConstants(OutputUnit outputUnit,
- List<ConstantValue> constantValues) {
+ Iterable<ConstantValue> constantValues) {
+ // `constantValues` is null if an outputUnit doesn't contain any constants.
if (constantValues == null) return;
for (ConstantValue constantValue in constantValues) {
_registry.registerConstant(outputUnit, constantValue);
@@ -447,6 +449,6 @@ class ProgramBuilder {
Holder holder = _registry.registerHolder(constantObject);
Constant constant = new Constant(name, holder, constantValue);
_constants[constantValue] = constant;
- };
+ }
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698