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 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3701 LookupIterator it3(array_prototype, | 3701 LookupIterator it3(array_prototype, |
3702 factory->NewStringFromAsciiChecked("forEach"), | 3702 factory->NewStringFromAsciiChecked("forEach"), |
3703 LookupIterator::OWN_SKIP_INTERCEPTOR); | 3703 LookupIterator::OWN_SKIP_INTERCEPTOR); |
3704 Handle<Object> for_each_function = | 3704 Handle<Object> for_each_function = |
3705 Object::GetProperty(&it3).ToHandleChecked(); | 3705 Object::GetProperty(&it3).ToHandleChecked(); |
3706 Handle<JSFunction>::cast(for_each_function) | 3706 Handle<JSFunction>::cast(for_each_function) |
3707 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); | 3707 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); |
3708 Handle<JSFunction>::cast(for_each_function) | 3708 Handle<JSFunction>::cast(for_each_function) |
3709 ->shared() | 3709 ->shared() |
3710 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); | 3710 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); |
| 3711 |
| 3712 LookupIterator it4(array_prototype, |
| 3713 factory->NewStringFromAsciiChecked("every"), |
| 3714 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3715 Handle<Object> every_function = Object::GetProperty(&it4).ToHandleChecked(); |
| 3716 Handle<JSFunction>::cast(every_function) |
| 3717 ->set_code(isolate->builtins()->builtin(Builtins::kArrayEvery)); |
| 3718 Handle<JSFunction>::cast(every_function) |
| 3719 ->shared() |
| 3720 ->set_code(isolate->builtins()->builtin(Builtins::kArrayEvery)); |
| 3721 |
| 3722 LookupIterator it5(array_prototype, |
| 3723 factory->NewStringFromAsciiChecked("some"), |
| 3724 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3725 Handle<Object> some_function = Object::GetProperty(&it5).ToHandleChecked(); |
| 3726 Handle<JSFunction>::cast(some_function) |
| 3727 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
| 3728 Handle<JSFunction>::cast(some_function) |
| 3729 ->shared() |
| 3730 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
3711 } | 3731 } |
3712 | 3732 |
3713 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { | 3733 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |
3714 if (!FLAG_harmony_sharedarraybuffer) return; | 3734 if (!FLAG_harmony_sharedarraybuffer) return; |
3715 | 3735 |
3716 Handle<JSGlobalObject> global(native_context()->global_object()); | 3736 Handle<JSGlobalObject> global(native_context()->global_object()); |
3717 Isolate* isolate = global->GetIsolate(); | 3737 Isolate* isolate = global->GetIsolate(); |
3718 Factory* factory = isolate->factory(); | 3738 Factory* factory = isolate->factory(); |
3719 | 3739 |
3720 Handle<JSFunction> shared_array_buffer_fun = | 3740 Handle<JSFunction> shared_array_buffer_fun = |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5131 } | 5151 } |
5132 | 5152 |
5133 | 5153 |
5134 // Called when the top-level V8 mutex is destroyed. | 5154 // Called when the top-level V8 mutex is destroyed. |
5135 void Bootstrapper::FreeThreadResources() { | 5155 void Bootstrapper::FreeThreadResources() { |
5136 DCHECK(!IsActive()); | 5156 DCHECK(!IsActive()); |
5137 } | 5157 } |
5138 | 5158 |
5139 } // namespace internal | 5159 } // namespace internal |
5140 } // namespace v8 | 5160 } // namespace v8 |
OLD | NEW |