| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 // ECMAScript 402 API implementation. | 5 // ECMAScript 402 API implementation. |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Intl object is a single object that has some named properties, | 8 * Intl object is a single object that has some named properties, |
| 9 * all of which are constructors. | 9 * all of which are constructors. |
| 10 */ | 10 */ |
| 11 (function(global, utils) { | 11 (function(global, utils) { |
| 12 | 12 |
| 13 "use strict"; | 13 "use strict"; |
| 14 | 14 |
| 15 %CheckIsBootstrapping(); | 15 %CheckIsBootstrapping(); |
| 16 | 16 |
| 17 // ------------------------------------------------------------------- | 17 // ------------------------------------------------------------------- |
| 18 // Imports | 18 // Imports |
| 19 | 19 |
| 20 var ArrayIndexOf; | 20 var ArrayIndexOf; |
| 21 var ArrayJoin; | 21 var ArrayJoin; |
| 22 var ArrayPush; | 22 var ArrayPush; |
| 23 var IsFinite; | 23 var IsFinite; |
| 24 var IsNaN; | 24 var IsNaN; |
| 25 var GlobalBoolean = global.Boolean; | 25 var GlobalBoolean = global.Boolean; |
| 26 var GlobalDate = global.Date; | 26 var GlobalDate = global.Date; |
| 27 var GlobalNumber = global.Number; | 27 var GlobalNumber = global.Number; |
| 28 var GlobalRegExp = global.RegExp; | 28 var GlobalRegExp = global.RegExp; |
| 29 var GlobalString = global.String; | 29 var GlobalString = global.String; |
| 30 var MakeError; |
| 31 var MakeRangeError; |
| 32 var MakeTypeError; |
| 30 var MathFloor; | 33 var MathFloor; |
| 31 var ObjectDefineProperties = utils.ImportNow("ObjectDefineProperties"); | 34 var ObjectDefineProperties = utils.ImportNow("ObjectDefineProperties"); |
| 32 var ObjectDefineProperty = utils.ImportNow("ObjectDefineProperty"); | 35 var ObjectDefineProperty = utils.ImportNow("ObjectDefineProperty"); |
| 33 var RegExpTest; | 36 var RegExpTest; |
| 34 var StringIndexOf; | 37 var StringIndexOf; |
| 35 var StringLastIndexOf; | 38 var StringLastIndexOf; |
| 36 var StringMatch; | 39 var StringMatch; |
| 37 var StringReplace; | 40 var StringReplace; |
| 38 var StringSplit; | 41 var StringSplit; |
| 39 var StringSubstr; | 42 var StringSubstr; |
| 40 var StringSubstring; | 43 var StringSubstring; |
| 41 | 44 |
| 42 utils.Import(function(from) { | 45 utils.Import(function(from) { |
| 43 ArrayIndexOf = from.ArrayIndexOf; | 46 ArrayIndexOf = from.ArrayIndexOf; |
| 44 ArrayJoin = from.ArrayJoin; | 47 ArrayJoin = from.ArrayJoin; |
| 45 ArrayPush = from.ArrayPush; | 48 ArrayPush = from.ArrayPush; |
| 46 IsFinite = from.IsFinite; | 49 IsFinite = from.IsFinite; |
| 47 IsNaN = from.IsNaN; | 50 IsNaN = from.IsNaN; |
| 51 MakeError = from.MakeError; |
| 52 MakeRangeError = from.MakeRangeError; |
| 53 MakeTypeError = from.MakeTypeError; |
| 48 MathFloor = from.MathFloor; | 54 MathFloor = from.MathFloor; |
| 49 RegExpTest = from.RegExpTest; | 55 RegExpTest = from.RegExpTest; |
| 50 StringIndexOf = from.StringIndexOf; | 56 StringIndexOf = from.StringIndexOf; |
| 51 StringLastIndexOf = from.StringLastIndexOf; | 57 StringLastIndexOf = from.StringLastIndexOf; |
| 52 StringMatch = from.StringMatch; | 58 StringMatch = from.StringMatch; |
| 53 StringReplace = from.StringReplace; | 59 StringReplace = from.StringReplace; |
| 54 StringSplit = from.StringSplit; | 60 StringSplit = from.StringSplit; |
| 55 StringSubstr = from.StringSubstr; | 61 StringSubstr = from.StringSubstr; |
| 56 StringSubstring = from.StringSubstring; | 62 StringSubstring = from.StringSubstring; |
| 57 }); | 63 }); |
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2109 } | 2115 } |
| 2110 | 2116 |
| 2111 var locales = %_Arguments(0); | 2117 var locales = %_Arguments(0); |
| 2112 var options = %_Arguments(1); | 2118 var options = %_Arguments(1); |
| 2113 return toLocaleDateTime( | 2119 return toLocaleDateTime( |
| 2114 this, locales, options, 'time', 'time', 'dateformattime'); | 2120 this, locales, options, 'time', 'time', 'dateformattime'); |
| 2115 } | 2121 } |
| 2116 ); | 2122 ); |
| 2117 | 2123 |
| 2118 }) | 2124 }) |
| OLD | NEW |