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/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 | 1388 |
1389 // Install the "constructor" property on the {prototype}. | 1389 // Install the "constructor" property on the {prototype}. |
1390 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, | 1390 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, |
1391 DONT_ENUM); | 1391 DONT_ENUM); |
1392 | 1392 |
1393 // Install the String.prototype methods. | 1393 // Install the String.prototype methods. |
1394 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt, | 1394 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt, |
1395 1, true); | 1395 1, true); |
1396 SimpleInstallFunction(prototype, "charCodeAt", | 1396 SimpleInstallFunction(prototype, "charCodeAt", |
1397 Builtins::kStringPrototypeCharCodeAt, 1, true); | 1397 Builtins::kStringPrototypeCharCodeAt, 1, true); |
| 1398 SimpleInstallFunction(prototype, "indexOf", |
| 1399 Builtins::kStringPrototypeIndexOf, 1, false); |
1398 SimpleInstallFunction(prototype, "lastIndexOf", | 1400 SimpleInstallFunction(prototype, "lastIndexOf", |
1399 Builtins::kStringPrototypeLastIndexOf, 1, false); | 1401 Builtins::kStringPrototypeLastIndexOf, 1, false); |
1400 SimpleInstallFunction(prototype, "localeCompare", | 1402 SimpleInstallFunction(prototype, "localeCompare", |
1401 Builtins::kStringPrototypeLocaleCompare, 1, true); | 1403 Builtins::kStringPrototypeLocaleCompare, 1, true); |
1402 SimpleInstallFunction(prototype, "normalize", | 1404 SimpleInstallFunction(prototype, "normalize", |
1403 Builtins::kStringPrototypeNormalize, 0, false); | 1405 Builtins::kStringPrototypeNormalize, 0, false); |
1404 SimpleInstallFunction(prototype, "toString", | 1406 SimpleInstallFunction(prototype, "toString", |
1405 Builtins::kStringPrototypeToString, 0, true); | 1407 Builtins::kStringPrototypeToString, 0, true); |
1406 SimpleInstallFunction(prototype, "trim", Builtins::kStringPrototypeTrim, 0, | 1408 SimpleInstallFunction(prototype, "trim", Builtins::kStringPrototypeTrim, 0, |
1407 false); | 1409 false); |
(...skipping 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4159 } | 4161 } |
4160 | 4162 |
4161 | 4163 |
4162 // Called when the top-level V8 mutex is destroyed. | 4164 // Called when the top-level V8 mutex is destroyed. |
4163 void Bootstrapper::FreeThreadResources() { | 4165 void Bootstrapper::FreeThreadResources() { |
4164 DCHECK(!IsActive()); | 4166 DCHECK(!IsActive()); |
4165 } | 4167 } |
4166 | 4168 |
4167 } // namespace internal | 4169 } // namespace internal |
4168 } // namespace v8 | 4170 } // namespace v8 |
OLD | NEW |