| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 relies on the fact that the following declaration has been made | 5 // This file relies on the fact that the following declaration has been made |
| 6 // in runtime.js: | 6 // in runtime.js: |
| 7 // var $String = global.String; | 7 // var $String = global.String; |
| 8 | 8 |
| 9 // ------------------------------------------------------------------- | 9 // ------------------------------------------------------------------- |
| 10 | 10 |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 // ------------------------------------------------------------------- | 908 // ------------------------------------------------------------------- |
| 909 | 909 |
| 910 function SetUpString() { | 910 function SetUpString() { |
| 911 %CheckIsBootstrapping(); | 911 %CheckIsBootstrapping(); |
| 912 | 912 |
| 913 // Set the String function and constructor. | 913 // Set the String function and constructor. |
| 914 %SetCode($String, StringConstructor); | 914 %SetCode($String, StringConstructor); |
| 915 %FunctionSetPrototype($String, new $String()); | 915 %FunctionSetPrototype($String, new $String()); |
| 916 | 916 |
| 917 // Set up the constructor property on the String prototype object. | 917 // Set up the constructor property on the String prototype object. |
| 918 %AddProperty($String.prototype, "constructor", $String, DONT_ENUM); | 918 %AddNamedProperty($String.prototype, "constructor", $String, DONT_ENUM); |
| 919 | 919 |
| 920 // Set up the non-enumerable functions on the String object. | 920 // Set up the non-enumerable functions on the String object. |
| 921 InstallFunctions($String, DONT_ENUM, $Array( | 921 InstallFunctions($String, DONT_ENUM, $Array( |
| 922 "fromCharCode", StringFromCharCode | 922 "fromCharCode", StringFromCharCode |
| 923 )); | 923 )); |
| 924 | 924 |
| 925 // Set up the non-enumerable functions on the String prototype object. | 925 // Set up the non-enumerable functions on the String prototype object. |
| 926 InstallFunctions($String.prototype, DONT_ENUM, $Array( | 926 InstallFunctions($String.prototype, DONT_ENUM, $Array( |
| 927 "valueOf", StringValueOf, | 927 "valueOf", StringValueOf, |
| 928 "toString", StringToString, | 928 "toString", StringToString, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 957 "fixed", StringFixed, | 957 "fixed", StringFixed, |
| 958 "italics", StringItalics, | 958 "italics", StringItalics, |
| 959 "small", StringSmall, | 959 "small", StringSmall, |
| 960 "strike", StringStrike, | 960 "strike", StringStrike, |
| 961 "sub", StringSub, | 961 "sub", StringSub, |
| 962 "sup", StringSup | 962 "sup", StringSup |
| 963 )); | 963 )); |
| 964 } | 964 } |
| 965 | 965 |
| 966 SetUpString(); | 966 SetUpString(); |
| OLD | NEW |