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

Side by Side Diff: pkg/compiler/lib/src/js_backend/minify_namer.dart

Issue 2863073003: Access NativeData only through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of js_backend.namer; 5 part of js_backend.namer;
6 6
7 /** 7 /**
8 * Assigns JavaScript identifiers to Dart variables, class-names and members. 8 * Assigns JavaScript identifiers to Dart variables, class-names and members.
9 */ 9 */
10 class MinifyNamer extends Namer 10 class MinifyNamer extends Namer
11 with 11 with
12 _MinifiedFieldNamer, 12 _MinifiedFieldNamer,
13 _MinifyConstructorBodyNamer, 13 _MinifyConstructorBodyNamer,
14 _MinifiedOneShotInterceptorNamer { 14 _MinifiedOneShotInterceptorNamer {
15 MinifyNamer(NativeData nativeData, ClosedWorld closedWorld, 15 MinifyNamer(ClosedWorld closedWorld, CodegenWorldBuilder codegenWorldBuilder)
16 CodegenWorldBuilder codegenWorldBuilder) 16 : super(closedWorld, codegenWorldBuilder) {
17 : super(nativeData, closedWorld, codegenWorldBuilder) {
18 reserveBackendNames(); 17 reserveBackendNames();
19 fieldRegistry = new _FieldNamingRegistry(this); 18 fieldRegistry = new _FieldNamingRegistry(this);
20 } 19 }
21 20
22 _FieldNamingRegistry fieldRegistry; 21 _FieldNamingRegistry fieldRegistry;
23 22
24 String get isolateName => 'I'; 23 String get isolateName => 'I';
25 String get isolatePropertiesName => 'p'; 24 String get isolatePropertiesName => 'p';
26 bool get shouldMinify => true; 25 bool get shouldMinify => true;
27 26
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 String prefix = 383 String prefix =
385 selector.isGetter ? r"$get" : selector.isSetter ? r"$set" : ""; 384 selector.isGetter ? r"$get" : selector.isSetter ? r"$set" : "";
386 String callSuffix = selector.isCall 385 String callSuffix = selector.isCall
387 ? callSuffixForStructure(selector.callStructure).join() 386 ? callSuffixForStructure(selector.callStructure).join()
388 : ""; 387 : "";
389 String suffix = suffixForGetInterceptor(classes); 388 String suffix = suffixForGetInterceptor(classes);
390 String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix"; 389 String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix";
391 return _disambiguateInternalGlobal(fullName); 390 return _disambiguateInternalGlobal(fullName);
392 } 391 }
393 } 392 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/frequency_namer.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698