OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 | 1333 |
1334 // Install the "constructor" property on the {prototype}. | 1334 // Install the "constructor" property on the {prototype}. |
1335 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, | 1335 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, |
1336 DONT_ENUM); | 1336 DONT_ENUM); |
1337 | 1337 |
1338 // Install the String.prototype methods. | 1338 // Install the String.prototype methods. |
1339 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt, | 1339 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt, |
1340 1, true); | 1340 1, true); |
1341 SimpleInstallFunction(prototype, "charCodeAt", | 1341 SimpleInstallFunction(prototype, "charCodeAt", |
1342 Builtins::kStringPrototypeCharCodeAt, 1, true); | 1342 Builtins::kStringPrototypeCharCodeAt, 1, true); |
| 1343 // TODO(bmeurer): One day we will want to install the correct i18n functions |
| 1344 // here directly instead of first installing the dummy, and overriding those |
| 1345 // in i18n.js later. |
| 1346 SimpleInstallFunction(prototype, "toLocaleLowerCase", |
| 1347 Builtins::kStringPrototypeToLowerCase, 0, false); |
| 1348 SimpleInstallFunction(prototype, "toLocaleUpperCase", |
| 1349 Builtins::kStringPrototypeToUpperCase, 0, false); |
| 1350 SimpleInstallFunction(prototype, "toLowerCase", |
| 1351 Builtins::kStringPrototypeToLowerCase, 0, false); |
| 1352 SimpleInstallFunction(prototype, "toUpperCase", |
| 1353 Builtins::kStringPrototypeToUpperCase, 0, false); |
1343 SimpleInstallFunction(prototype, "trim", Builtins::kStringPrototypeTrim, 0, | 1354 SimpleInstallFunction(prototype, "trim", Builtins::kStringPrototypeTrim, 0, |
1344 false); | 1355 false); |
1345 SimpleInstallFunction(prototype, "trimLeft", | 1356 SimpleInstallFunction(prototype, "trimLeft", |
1346 Builtins::kStringPrototypeTrimLeft, 0, false); | 1357 Builtins::kStringPrototypeTrimLeft, 0, false); |
1347 SimpleInstallFunction(prototype, "trimRight", | 1358 SimpleInstallFunction(prototype, "trimRight", |
1348 Builtins::kStringPrototypeTrimRight, 0, false); | 1359 Builtins::kStringPrototypeTrimRight, 0, false); |
1349 } | 1360 } |
1350 | 1361 |
1351 { | 1362 { |
1352 // --- S y m b o l --- | 1363 // --- S y m b o l --- |
(...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3795 } | 3806 } |
3796 | 3807 |
3797 | 3808 |
3798 // Called when the top-level V8 mutex is destroyed. | 3809 // Called when the top-level V8 mutex is destroyed. |
3799 void Bootstrapper::FreeThreadResources() { | 3810 void Bootstrapper::FreeThreadResources() { |
3800 DCHECK(!IsActive()); | 3811 DCHECK(!IsActive()); |
3801 } | 3812 } |
3802 | 3813 |
3803 } // namespace internal | 3814 } // namespace internal |
3804 } // namespace v8 | 3815 } // namespace v8 |
OLD | NEW |