| 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 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 SimpleInstallFunction(prototype, factory->keys_string(), | 2476 SimpleInstallFunction(prototype, factory->keys_string(), |
| 2477 Builtins::kTypedArrayPrototypeKeys, 0, true); | 2477 Builtins::kTypedArrayPrototypeKeys, 0, true); |
| 2478 keys->shared()->set_builtin_function_id(kTypedArrayKeys); | 2478 keys->shared()->set_builtin_function_id(kTypedArrayKeys); |
| 2479 | 2479 |
| 2480 Handle<JSFunction> values = | 2480 Handle<JSFunction> values = |
| 2481 SimpleInstallFunction(prototype, factory->values_string(), | 2481 SimpleInstallFunction(prototype, factory->values_string(), |
| 2482 Builtins::kTypedArrayPrototypeValues, 0, true); | 2482 Builtins::kTypedArrayPrototypeValues, 0, true); |
| 2483 values->shared()->set_builtin_function_id(kTypedArrayValues); | 2483 values->shared()->set_builtin_function_id(kTypedArrayValues); |
| 2484 JSObject::AddProperty(prototype, factory->iterator_symbol(), values, | 2484 JSObject::AddProperty(prototype, factory->iterator_symbol(), values, |
| 2485 DONT_ENUM); | 2485 DONT_ENUM); |
| 2486 |
| 2487 // TODO(caitp): alphasort accessors/methods |
| 2488 SimpleInstallFunction(prototype, "copyWithin", |
| 2489 Builtins::kTypedArrayPrototypeCopyWithin, 2, false); |
| 2486 } | 2490 } |
| 2487 | 2491 |
| 2488 { // -- T y p e d A r r a y s | 2492 { // -- T y p e d A r r a y s |
| 2489 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 2493 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
| 2490 { \ | 2494 { \ |
| 2491 Handle<JSFunction> fun; \ | 2495 Handle<JSFunction> fun; \ |
| 2492 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ | 2496 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ |
| 2493 InstallWithIntrinsicDefaultProto(isolate, fun, \ | 2497 InstallWithIntrinsicDefaultProto(isolate, fun, \ |
| 2494 Context::TYPE##_ARRAY_FUN_INDEX); \ | 2498 Context::TYPE##_ARRAY_FUN_INDEX); \ |
| 2495 } | 2499 } |
| (...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4839 } | 4843 } |
| 4840 | 4844 |
| 4841 | 4845 |
| 4842 // Called when the top-level V8 mutex is destroyed. | 4846 // Called when the top-level V8 mutex is destroyed. |
| 4843 void Bootstrapper::FreeThreadResources() { | 4847 void Bootstrapper::FreeThreadResources() { |
| 4844 DCHECK(!IsActive()); | 4848 DCHECK(!IsActive()); |
| 4845 } | 4849 } |
| 4846 | 4850 |
| 4847 } // namespace internal | 4851 } // namespace internal |
| 4848 } // namespace v8 | 4852 } // namespace v8 |
| OLD | NEW |