| 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); | |
| 2490 } | 2486 } |
| 2491 | 2487 |
| 2492 { // -- T y p e d A r r a y s | 2488 { // -- T y p e d A r r a y s |
| 2493 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 2489 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
| 2494 { \ | 2490 { \ |
| 2495 Handle<JSFunction> fun; \ | 2491 Handle<JSFunction> fun; \ |
| 2496 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ | 2492 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ |
| 2497 InstallWithIntrinsicDefaultProto(isolate, fun, \ | 2493 InstallWithIntrinsicDefaultProto(isolate, fun, \ |
| 2498 Context::TYPE##_ARRAY_FUN_INDEX); \ | 2494 Context::TYPE##_ARRAY_FUN_INDEX); \ |
| 2499 } | 2495 } |
| (...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4877 } | 4873 } |
| 4878 | 4874 |
| 4879 | 4875 |
| 4880 // Called when the top-level V8 mutex is destroyed. | 4876 // Called when the top-level V8 mutex is destroyed. |
| 4881 void Bootstrapper::FreeThreadResources() { | 4877 void Bootstrapper::FreeThreadResources() { |
| 4882 DCHECK(!IsActive()); | 4878 DCHECK(!IsActive()); |
| 4883 } | 4879 } |
| 4884 | 4880 |
| 4885 } // namespace internal | 4881 } // namespace internal |
| 4886 } // namespace v8 | 4882 } // namespace v8 |
| OLD | NEW |