| 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 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 // This file relies on the fact that the following declaration has been made | 7 // This file relies on the fact that the following declaration has been made |
| 8 // in runtime.js: | 8 // in runtime.js: |
| 9 // var $Array = global.Array; | 9 // var $Array = global.Array; |
| 10 | 10 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 // '0'..'9', 'A'..'F' and 'a' .. 'f'. | 396 // '0'..'9', 'A'..'F' and 'a' .. 'f'. |
| 397 } else { | 397 } else { |
| 398 return false; | 398 return false; |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 return true; | 401 return true; |
| 402 } | 402 } |
| 403 | 403 |
| 404 | 404 |
| 405 // ECMA-262 - B.2.1. | 405 // ECMA-262 - B.2.1. |
| 406 function URIEscape(str) { | 406 function URIEscapeJS(str) { |
| 407 var s = ToString(str); | 407 var s = ToString(str); |
| 408 return %URIEscape(s); | 408 return %URIEscape(s); |
| 409 } | 409 } |
| 410 | 410 |
| 411 | 411 |
| 412 // ECMA-262 - B.2.2. | 412 // ECMA-262 - B.2.2. |
| 413 function URIUnescape(str) { | 413 function URIUnescapeJS(str) { |
| 414 var s = ToString(str); | 414 var s = ToString(str); |
| 415 return %URIUnescape(s); | 415 return %URIUnescape(s); |
| 416 } | 416 } |
| 417 | 417 |
| 418 | 418 |
| 419 // ------------------------------------------------------------------- | 419 // ------------------------------------------------------------------- |
| 420 | 420 |
| 421 function SetUpUri() { | 421 function SetUpUri() { |
| 422 %CheckIsBootstrapping(); | 422 %CheckIsBootstrapping(); |
| 423 | 423 |
| 424 // Set up non-enumerable URI functions on the global object and set | 424 // Set up non-enumerable URI functions on the global object and set |
| 425 // their names. | 425 // their names. |
| 426 InstallFunctions(global, DONT_ENUM, $Array( | 426 InstallFunctions(global, DONT_ENUM, $Array( |
| 427 "escape", URIEscape, | 427 "escape", URIEscapeJS, |
| 428 "unescape", URIUnescape, | 428 "unescape", URIUnescapeJS, |
| 429 "decodeURI", URIDecode, | 429 "decodeURI", URIDecode, |
| 430 "decodeURIComponent", URIDecodeComponent, | 430 "decodeURIComponent", URIDecodeComponent, |
| 431 "encodeURI", URIEncode, | 431 "encodeURI", URIEncode, |
| 432 "encodeURIComponent", URIEncodeComponent | 432 "encodeURIComponent", URIEncodeComponent |
| 433 )); | 433 )); |
| 434 } | 434 } |
| 435 | 435 |
| 436 SetUpUri(); | 436 SetUpUri(); |
| OLD | NEW |