| 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 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 MathFloor; | 30 var MathFloor; |
| 31 var ObjectDefineProperties = utils.ImportNow("ObjectDefineProperties"); |
| 32 var ObjectDefineProperty = utils.ImportNow("ObjectDefineProperty"); |
| 31 var RegExpTest; | 33 var RegExpTest; |
| 32 var StringIndexOf; | 34 var StringIndexOf; |
| 33 var StringLastIndexOf; | 35 var StringLastIndexOf; |
| 34 var StringMatch; | 36 var StringMatch; |
| 35 var StringReplace; | 37 var StringReplace; |
| 36 var StringSplit; | 38 var StringSplit; |
| 37 var StringSubstr; | 39 var StringSubstr; |
| 38 var StringSubstring; | 40 var StringSubstring; |
| 39 | 41 |
| 40 utils.Import(function(from) { | 42 utils.Import(function(from) { |
| 41 ArrayIndexOf = from.ArrayIndexOf; | 43 ArrayIndexOf = from.ArrayIndexOf; |
| 42 ArrayJoin = from.ArrayJoin; | 44 ArrayJoin = from.ArrayJoin; |
| 43 ArrayPush = from.ArrayPush; | 45 ArrayPush = from.ArrayPush; |
| 44 IsFinite = from.IsFinite; | 46 IsFinite = from.IsFinite; |
| 45 IsNaN = from.IsNaN; | 47 IsNaN = from.IsNaN; |
| 46 MathFloor = from.MathFloor; | 48 MathFloor = from.MathFloor; |
| 47 RegExpTest = from.RegExpTest; | 49 RegExpTest = from.RegExpTest; |
| 48 StringIndexOf = from.StringIndexOf; | 50 StringIndexOf = from.StringIndexOf; |
| 49 StringLastIndexOf = from.StringLastIndexOf; | 51 StringLastIndexOf = from.StringLastIndexOf; |
| 50 StringMatch = from.StringMatch; | 52 StringMatch = from.StringMatch; |
| 51 StringReplace = from.StringReplace; | 53 StringReplace = from.StringReplace; |
| 52 StringSplit = from.StringSplit; | 54 StringSplit = from.StringSplit; |
| 53 StringSubstr = from.StringSubstr; | 55 StringSubstr = from.StringSubstr; |
| 54 StringSubstring = from.StringSubstring; | 56 StringSubstring = from.StringSubstring; |
| 55 ToNumber = from.ToNumber; | 57 ToNumber = from.ToNumber; |
| 56 }); | 58 }); |
| 57 | 59 |
| 58 utils.ImportNow(function(from) { | |
| 59 ObjectDefineProperties = from.ObjectDefineProperties; | |
| 60 ObjectDefineProperty = from.ObjectDefineProperty; | |
| 61 }); | |
| 62 | |
| 63 // ------------------------------------------------------------------- | 60 // ------------------------------------------------------------------- |
| 64 | 61 |
| 65 var Intl = {}; | 62 var Intl = {}; |
| 66 | 63 |
| 67 %AddNamedProperty(global, "Intl", Intl, DONT_ENUM); | 64 %AddNamedProperty(global, "Intl", Intl, DONT_ENUM); |
| 68 | 65 |
| 69 /** | 66 /** |
| 70 * Caches available locales for each service. | 67 * Caches available locales for each service. |
| 71 */ | 68 */ |
| 72 var AVAILABLE_LOCALES = { | 69 var AVAILABLE_LOCALES = { |
| (...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 } | 2110 } |
| 2114 | 2111 |
| 2115 var locales = %_Arguments(0); | 2112 var locales = %_Arguments(0); |
| 2116 var options = %_Arguments(1); | 2113 var options = %_Arguments(1); |
| 2117 return toLocaleDateTime( | 2114 return toLocaleDateTime( |
| 2118 this, locales, options, 'time', 'time', 'dateformattime'); | 2115 this, locales, options, 'time', 'time', 'dateformattime'); |
| 2119 } | 2116 } |
| 2120 ); | 2117 ); |
| 2121 | 2118 |
| 2122 }) | 2119 }) |
| OLD | NEW |