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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart

Issue 13947004: dart2js: Allow 'throw' when inlining (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nicolas' Code review feedback Created 7 years, 8 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 | Annotate | Revision Log
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; 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 r'iterator', r'length', r'$lt', r'$gt', r'$le', r'$ge', 101 r'iterator', r'length', r'$lt', r'$gt', r'$le', r'$ge',
102 r'moveNext$0', r'node', r'on', r'$negate', r'push', r'self', 102 r'moveNext$0', r'node', r'on', r'$negate', r'push', r'self',
103 r'start', r'target', r'$shl', r'value', r'width', r'style', 103 r'start', r'target', r'$shl', r'value', r'width', r'style',
104 r'noSuchMethod$1', r'$mul', r'$div', r'$sub', r'$not', r'$mod', 104 r'noSuchMethod$1', r'$mul', r'$div', r'$sub', r'$not', r'$mod',
105 r'$tdiv']); 105 r'$tdiv']);
106 106
107 _populateSuggestedNames( 107 _populateSuggestedNames(
108 suggestedGlobalNames, 108 suggestedGlobalNames,
109 usedGlobalNames, 109 usedGlobalNames,
110 const <String>[ 110 const <String>[
111 r'Object', r'$throw', r'$eq', r'S', r'ioore', r'UnsupportedError$', 111 r'Object', 'wrapException', r'$eq', r'S', r'ioore',
112 r'length', r'$sub', r'getInterceptor$JSArrayJSString', r'$add', 112 r'UnsupportedError$', r'length', r'$sub',
113 r'getInterceptor$JSArrayJSString', r'$add',
113 r'$gt', r'$ge', r'$lt', r'$le', r'add', r'getInterceptor$JSNumber', 114 r'$gt', r'$ge', r'$lt', r'$le', r'add', r'getInterceptor$JSNumber',
114 r'iterator', r'$index', r'iae', r'getInterceptor$JSArray', 115 r'iterator', r'$index', r'iae', r'getInterceptor$JSArray',
115 r'ArgumentError$', r'BoundClosure', r'StateError$', 116 r'ArgumentError$', r'BoundClosure', r'StateError$',
116 r'getInterceptor', r'max', r'$mul', r'List_List', r'Map_Map', 117 r'getInterceptor', r'max', r'$mul', r'List_List', r'Map_Map',
117 r'getInterceptor$JSString', r'$div', r'$indexSet', 118 r'getInterceptor$JSString', r'$div', r'$indexSet',
118 r'List_List$from', r'Set_Set$from', r'toString', r'toInt', r'min', 119 r'List_List$from', r'Set_Set$from', r'toString', r'toInt', r'min',
119 r'StringBuffer_StringBuffer', r'contains1', r'WhereIterable$', 120 r'StringBuffer_StringBuffer', r'contains1', r'WhereIterable$',
120 r'RangeError$value', r'JSString', r'JSNumber', 121 r'RangeError$value', r'JSString', r'JSNumber',
121 r'JSArray', r'createInvocationMirror' 122 r'JSArray', r'createInvocationMirror'
122 ]); 123 ]);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 215 }
215 216
216 int _alphaNumericNumber(int x) { 217 int _alphaNumericNumber(int x) {
217 if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS; 218 if (x >= ALPHANUMERIC_CHARACTERS) x %= ALPHANUMERIC_CHARACTERS;
218 if (x < 26) return $a + x; 219 if (x < 26) return $a + x;
219 if (x < 52) return $A + x - 26; 220 if (x < 52) return $A + x - 26;
220 return $0 + x - 52; 221 return $0 + x - 52;
221 } 222 }
222 223
223 } 224 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698