OLD | NEW |
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; |
| 6 |
5 /** | 7 /** |
6 * Assigns JavaScript identifiers to Dart variables, class-names and members. | 8 * Assigns JavaScript identifiers to Dart variables, class-names and members. |
7 */ | 9 */ |
8 class MinifyNamer extends Namer { | 10 class MinifyNamer extends Namer { |
9 MinifyNamer(Compiler compiler) : super(compiler); | 11 MinifyNamer(Compiler compiler) : super(compiler); |
10 | 12 |
11 String get ISOLATE => 'I'; | 13 String get ISOLATE => 'I'; |
12 String get ISOLATE_PROPERTIES => 'p'; | 14 String get ISOLATE_PROPERTIES => 'p'; |
13 bool get shouldMinify => true; | 15 bool get shouldMinify => true; |
14 | 16 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 99 } |
98 | 100 |
99 int _alphaNumericNumber(int x) { | 101 int _alphaNumericNumber(int x) { |
100 if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS; | 102 if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS; |
101 if (x < 26) return $a + x; | 103 if (x < 26) return $a + x; |
102 if (x < 52) return $A + x - 26; | 104 if (x < 52) return $A + x - 26; |
103 return $0 + x - 52; | 105 return $0 + x - 52; |
104 } | 106 } |
105 | 107 |
106 } | 108 } |
OLD | NEW |