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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart

Issue 1540973005: dart2js: minify 'static:' tag (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
index 9ad63abc6e2a442876f3511976d347cffae80069..ecd8a4b681fc090fb2d12aa96b573f7862bb9a50 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
@@ -102,6 +102,8 @@ jsAst.Statement buildSetupProgram(Program program, Compiler compiler,
'mangledNames': mangledNamesAccess,
'mangledGlobalNames': mangledGlobalNamesAccess,
'statics': staticsAccess,
+ 'staticsPropertyName': namer.staticsPropertyName,
+ 'staticsPropertyNameString': js.quoteName(namer.staticsPropertyName),
'typeInformation': typeInformationAccess,
'globalFunctions': globalFunctionsAccess,
'enabledInvokeOn': compiler.enabledInvokeOn,
@@ -526,10 +528,10 @@ function $setupProgramName(programData, typesOffset) {
for (var i = 0; i < properties.length; i++) {
var property = properties[i];
var firstChar = property.charCodeAt(0);
- if (property === "static") {
- processStatics(#statics[cls] = descriptor.static,
+ if (property === #staticsPropertyNameString) {
+ processStatics(#statics[cls] = descriptor.#staticsPropertyName,
processedClasses);
- delete descriptor.static;
+ delete descriptor.#staticsPropertyName;
} else if (firstChar === 43) { // 43 is "+".
mangledNames[previousProperty] = property.substring(1);
var flag = descriptor[property];
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698