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 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2607 Builtins::kTypedArrayPrototypeValues, 0, true); | 2607 Builtins::kTypedArrayPrototypeValues, 0, true); |
2608 values->shared()->set_builtin_function_id(kTypedArrayValues); | 2608 values->shared()->set_builtin_function_id(kTypedArrayValues); |
2609 JSObject::AddProperty(prototype, factory->iterator_symbol(), values, | 2609 JSObject::AddProperty(prototype, factory->iterator_symbol(), values, |
2610 DONT_ENUM); | 2610 DONT_ENUM); |
2611 | 2611 |
2612 // TODO(caitp): alphasort accessors/methods | 2612 // TODO(caitp): alphasort accessors/methods |
2613 SimpleInstallFunction(prototype, "copyWithin", | 2613 SimpleInstallFunction(prototype, "copyWithin", |
2614 Builtins::kTypedArrayPrototypeCopyWithin, 2, false); | 2614 Builtins::kTypedArrayPrototypeCopyWithin, 2, false); |
2615 SimpleInstallFunction(prototype, "includes", | 2615 SimpleInstallFunction(prototype, "includes", |
2616 Builtins::kTypedArrayPrototypeIncludes, 1, false); | 2616 Builtins::kTypedArrayPrototypeIncludes, 1, false); |
| 2617 SimpleInstallFunction(prototype, "indexOf", |
| 2618 Builtins::kTypedArrayPrototypeIndexOf, 1, false); |
2617 } | 2619 } |
2618 | 2620 |
2619 { // -- T y p e d A r r a y s | 2621 { // -- T y p e d A r r a y s |
2620 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 2622 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
2621 { \ | 2623 { \ |
2622 Handle<JSFunction> fun; \ | 2624 Handle<JSFunction> fun; \ |
2623 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ | 2625 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ |
2624 InstallWithIntrinsicDefaultProto(isolate, fun, \ | 2626 InstallWithIntrinsicDefaultProto(isolate, fun, \ |
2625 Context::TYPE##_ARRAY_FUN_INDEX); \ | 2627 Context::TYPE##_ARRAY_FUN_INDEX); \ |
2626 } | 2628 } |
(...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5112 } | 5114 } |
5113 | 5115 |
5114 | 5116 |
5115 // Called when the top-level V8 mutex is destroyed. | 5117 // Called when the top-level V8 mutex is destroyed. |
5116 void Bootstrapper::FreeThreadResources() { | 5118 void Bootstrapper::FreeThreadResources() { |
5117 DCHECK(!IsActive()); | 5119 DCHECK(!IsActive()); |
5118 } | 5120 } |
5119 | 5121 |
5120 } // namespace internal | 5122 } // namespace internal |
5121 } // namespace v8 | 5123 } // namespace v8 |
OLD | NEW |