| 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; | 5 part of js_backend; |
| 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 { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 r'$isJavaScriptIndexingBehavior', r'$isolateProperties', | 91 r'$isJavaScriptIndexingBehavior', r'$isolateProperties', |
| 92 r'iterator', r'length', r'$lt', r'$gt', r'$le', r'$ge', | 92 r'iterator', r'length', r'$lt', r'$gt', r'$le', r'$ge', |
| 93 r'moveNext$0', r'node', r'on', r'prototype', r'push', r'self', | 93 r'moveNext$0', r'node', r'on', r'prototype', r'push', r'self', |
| 94 r'start', r'target', r'this_0', r'value', r'width', r'style']); | 94 r'start', r'target', r'this_0', r'value', r'width', r'style']); |
| 95 | 95 |
| 96 _populateSuggestedNames( | 96 _populateSuggestedNames( |
| 97 suggestedGlobalNames, | 97 suggestedGlobalNames, |
| 98 usedGlobalNames, | 98 usedGlobalNames, |
| 99 const <String>[ | 99 const <String>[ |
| 100 r'Object', r'$throw', r'$eq', r'S', r'ioore', r'UnsupportedError$', | 100 r'Object', r'$throw', r'$eq', r'S', r'ioore', r'UnsupportedError$', |
| 101 r'length', r'$sub', r'getInterceptor$JSStringJSArray', r'$add', | 101 r'length', r'$sub', r'getInterceptor$JSArrayJSString', r'$add', |
| 102 r'$gt', r'$ge', r'$lt', r'$le', r'add', r'getInterceptor$JSNumber', | 102 r'$gt', r'$ge', r'$lt', r'$le', r'add', r'getInterceptor$JSNumber', |
| 103 r'iterator', r'$index', r'iae', r'getInterceptor$JSArray', | 103 r'iterator', r'$index', r'iae', r'getInterceptor$JSArray', |
| 104 r'ArgumentError$', r'BoundClosure', r'StateError$', | 104 r'ArgumentError$', r'BoundClosure', r'StateError$', |
| 105 r'getInterceptor', r'max', r'$mul', r'List_List', r'Map_Map', | 105 r'getInterceptor', r'max', r'$mul', r'List_List', r'Map_Map', |
| 106 r'getInterceptor$JSString', r'$div', r'$indexSet', | 106 r'getInterceptor$JSString', r'$div', r'$indexSet', |
| 107 r'List_List$from', r'Set_Set$from', r'toString', r'toInt', r'min', | 107 r'List_List$from', r'Set_Set$from', r'toString', r'toInt', r'min', |
| 108 r'StringBuffer_StringBuffer', r'contains1', r'WhereIterable$', | 108 r'StringBuffer_StringBuffer', r'contains1', r'WhereIterable$', |
| 109 r'RangeError$value', r'JSString', r'JSNumber', | 109 r'RangeError$value', r'JSString', r'JSNumber', |
| 110 r'JSArray' | 110 r'JSArray' |
| 111 ]); | 111 ]); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 | 192 |
| 193 int _alphaNumericNumber(int x) { | 193 int _alphaNumericNumber(int x) { |
| 194 if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS; | 194 if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS; |
| 195 if (x < 26) return $a + x; | 195 if (x < 26) return $a + x; |
| 196 if (x < 52) return $A + x - 26; | 196 if (x < 52) return $A + x - 26; |
| 197 return $0 + x - 52; | 197 return $0 + x - 52; |
| 198 } | 198 } |
| 199 | 199 |
| 200 } | 200 } |
| OLD | NEW |