OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains support for URI manipulations written in | 5 // This file contains support for URI manipulations written in |
6 // JavaScript. | 6 // JavaScript. |
7 | 7 |
8 (function(global, shared, exports) { | 8 (function(global, shared, exports) { |
9 | 9 |
10 "use strict"; | 10 "use strict"; |
11 | 11 |
12 %CheckIsBootstrapping(); | 12 %CheckIsBootstrapping(); |
13 | 13 |
| 14 //- ------------------------------------------------------------------ |
| 15 // Imports |
| 16 |
14 var GlobalObject = global.Object; | 17 var GlobalObject = global.Object; |
15 var GlobalArray = global.Array; | 18 var GlobalArray = global.Array; |
| 19 var InternalArray = shared.InternalArray; |
16 | 20 |
17 // ------------------------------------------------------------------- | 21 // ------------------------------------------------------------------- |
18 // Define internal helper functions. | 22 // Define internal helper functions. |
19 | 23 |
20 function HexValueOf(code) { | 24 function HexValueOf(code) { |
21 // 0-9 | 25 // 0-9 |
22 if (code >= 48 && code <= 57) return code - 48; | 26 if (code >= 48 && code <= 57) return code - 48; |
23 // A-F | 27 // A-F |
24 if (code >= 65 && code <= 70) return code - 55; | 28 if (code >= 65 && code <= 70) return code - 55; |
25 // a-f | 29 // a-f |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 $installFunctions(global, DONT_ENUM, [ | 363 $installFunctions(global, DONT_ENUM, [ |
360 "escape", URIEscapeJS, | 364 "escape", URIEscapeJS, |
361 "unescape", URIUnescapeJS, | 365 "unescape", URIUnescapeJS, |
362 "decodeURI", URIDecode, | 366 "decodeURI", URIDecode, |
363 "decodeURIComponent", URIDecodeComponent, | 367 "decodeURIComponent", URIDecodeComponent, |
364 "encodeURI", URIEncode, | 368 "encodeURI", URIEncode, |
365 "encodeURIComponent", URIEncodeComponent | 369 "encodeURIComponent", URIEncodeComponent |
366 ]); | 370 ]); |
367 | 371 |
368 }) | 372 }) |
OLD | NEW |