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 3546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3557 LookupIterator it3(array_prototype, | 3557 LookupIterator it3(array_prototype, |
3558 factory->NewStringFromAsciiChecked("forEach"), | 3558 factory->NewStringFromAsciiChecked("forEach"), |
3559 LookupIterator::OWN_SKIP_INTERCEPTOR); | 3559 LookupIterator::OWN_SKIP_INTERCEPTOR); |
3560 Handle<Object> for_each_function = | 3560 Handle<Object> for_each_function = |
3561 Object::GetProperty(&it3).ToHandleChecked(); | 3561 Object::GetProperty(&it3).ToHandleChecked(); |
3562 Handle<JSFunction>::cast(for_each_function) | 3562 Handle<JSFunction>::cast(for_each_function) |
3563 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); | 3563 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); |
3564 Handle<JSFunction>::cast(for_each_function) | 3564 Handle<JSFunction>::cast(for_each_function) |
3565 ->shared() | 3565 ->shared() |
3566 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); | 3566 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); |
| 3567 |
| 3568 LookupIterator it4(array_prototype, |
| 3569 factory->NewStringFromAsciiChecked("every"), |
| 3570 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3571 Handle<Object> every_function = Object::GetProperty(&it4).ToHandleChecked(); |
| 3572 Handle<JSFunction>::cast(every_function) |
| 3573 ->set_code(isolate->builtins()->builtin(Builtins::kArrayEvery)); |
| 3574 Handle<JSFunction>::cast(every_function) |
| 3575 ->shared() |
| 3576 ->set_code(isolate->builtins()->builtin(Builtins::kArrayEvery)); |
| 3577 |
| 3578 LookupIterator it5(array_prototype, |
| 3579 factory->NewStringFromAsciiChecked("some"), |
| 3580 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3581 Handle<Object> some_function = Object::GetProperty(&it5).ToHandleChecked(); |
| 3582 Handle<JSFunction>::cast(some_function) |
| 3583 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
| 3584 Handle<JSFunction>::cast(some_function) |
| 3585 ->shared() |
| 3586 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
3567 } | 3587 } |
3568 | 3588 |
3569 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { | 3589 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |
3570 if (!FLAG_harmony_sharedarraybuffer) return; | 3590 if (!FLAG_harmony_sharedarraybuffer) return; |
3571 | 3591 |
3572 Handle<JSGlobalObject> global(native_context()->global_object()); | 3592 Handle<JSGlobalObject> global(native_context()->global_object()); |
3573 Isolate* isolate = global->GetIsolate(); | 3593 Isolate* isolate = global->GetIsolate(); |
3574 Factory* factory = isolate->factory(); | 3594 Factory* factory = isolate->factory(); |
3575 | 3595 |
3576 Handle<JSFunction> shared_array_buffer_fun = | 3596 Handle<JSFunction> shared_array_buffer_fun = |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5001 } | 5021 } |
5002 | 5022 |
5003 | 5023 |
5004 // Called when the top-level V8 mutex is destroyed. | 5024 // Called when the top-level V8 mutex is destroyed. |
5005 void Bootstrapper::FreeThreadResources() { | 5025 void Bootstrapper::FreeThreadResources() { |
5006 DCHECK(!IsActive()); | 5026 DCHECK(!IsActive()); |
5007 } | 5027 } |
5008 | 5028 |
5009 } // namespace internal | 5029 } // namespace internal |
5010 } // namespace v8 | 5030 } // namespace v8 |
OLD | NEW |