Chromium Code Reviews| 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 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3667 Isolate* isolate = global->GetIsolate(); | 3667 Isolate* isolate = global->GetIsolate(); |
| 3668 Factory* factory = isolate->factory(); | 3668 Factory* factory = isolate->factory(); |
| 3669 | 3669 |
| 3670 LookupIterator it1(global, factory->NewStringFromAsciiChecked("Array"), | 3670 LookupIterator it1(global, factory->NewStringFromAsciiChecked("Array"), |
| 3671 LookupIterator::OWN_SKIP_INTERCEPTOR); | 3671 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3672 Handle<Object> array_object = Object::GetProperty(&it1).ToHandleChecked(); | 3672 Handle<Object> array_object = Object::GetProperty(&it1).ToHandleChecked(); |
| 3673 LookupIterator it2(array_object, | 3673 LookupIterator it2(array_object, |
| 3674 factory->NewStringFromAsciiChecked("prototype"), | 3674 factory->NewStringFromAsciiChecked("prototype"), |
| 3675 LookupIterator::OWN_SKIP_INTERCEPTOR); | 3675 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3676 Handle<Object> array_prototype = Object::GetProperty(&it2).ToHandleChecked(); | 3676 Handle<Object> array_prototype = Object::GetProperty(&it2).ToHandleChecked(); |
| 3677 | |
| 3677 LookupIterator it3(array_prototype, | 3678 LookupIterator it3(array_prototype, |
| 3678 factory->NewStringFromAsciiChecked("forEach"), | 3679 factory->NewStringFromAsciiChecked("forEach"), |
| 3679 LookupIterator::OWN_SKIP_INTERCEPTOR); | 3680 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3680 Handle<Object> for_each_function = | 3681 Handle<Object> for_each_function = |
| 3681 Object::GetProperty(&it3).ToHandleChecked(); | 3682 Object::GetProperty(&it3).ToHandleChecked(); |
| 3682 Handle<JSFunction>::cast(for_each_function) | 3683 Handle<JSFunction>::cast(for_each_function) |
| 3683 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); | 3684 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); |
| 3684 Handle<JSFunction>::cast(for_each_function) | 3685 Handle<JSFunction>::cast(for_each_function) |
| 3685 ->shared() | 3686 ->shared() |
| 3686 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); | 3687 ->set_code(isolate->builtins()->builtin(Builtins::kArrayForEach)); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 3697 | 3698 |
| 3698 LookupIterator it5(array_prototype, | 3699 LookupIterator it5(array_prototype, |
| 3699 factory->NewStringFromAsciiChecked("some"), | 3700 factory->NewStringFromAsciiChecked("some"), |
| 3700 LookupIterator::OWN_SKIP_INTERCEPTOR); | 3701 LookupIterator::OWN_SKIP_INTERCEPTOR); |
| 3701 Handle<Object> some_function = Object::GetProperty(&it5).ToHandleChecked(); | 3702 Handle<Object> some_function = Object::GetProperty(&it5).ToHandleChecked(); |
| 3702 Handle<JSFunction>::cast(some_function) | 3703 Handle<JSFunction>::cast(some_function) |
| 3703 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); | 3704 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
| 3704 Handle<JSFunction>::cast(some_function) | 3705 Handle<JSFunction>::cast(some_function) |
| 3705 ->shared() | 3706 ->shared() |
| 3706 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); | 3707 ->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
| 3708 | |
| 3709 if (FLAG_csa_builtin_filter) { | |
|
danno
2017/03/20 08:06:25
Instead of introducing a new flag, how about you j
mvstanton
2017/03/20 16:10:52
I like the idea, but right now the filter implemen
| |
| 3710 LookupIterator it6(array_prototype, | |
| 3711 factory->NewStringFromAsciiChecked("filter"), | |
| 3712 LookupIterator::OWN_SKIP_INTERCEPTOR); | |
| 3713 Handle<Object> filter_function = | |
| 3714 Object::GetProperty(&it6).ToHandleChecked(); | |
| 3715 Handle<JSFunction>::cast(filter_function) | |
| 3716 ->set_code(isolate->builtins()->builtin(Builtins::kArrayFilter)); | |
| 3717 Handle<JSFunction>::cast(filter_function) | |
| 3718 ->shared() | |
| 3719 ->set_code(isolate->builtins()->builtin(Builtins::kArrayFilter)); | |
| 3720 } | |
| 3707 } | 3721 } |
| 3708 | 3722 |
| 3709 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { | 3723 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |
| 3710 if (!FLAG_harmony_sharedarraybuffer) return; | 3724 if (!FLAG_harmony_sharedarraybuffer) return; |
| 3711 | 3725 |
| 3712 Handle<JSGlobalObject> global(native_context()->global_object()); | 3726 Handle<JSGlobalObject> global(native_context()->global_object()); |
| 3713 Isolate* isolate = global->GetIsolate(); | 3727 Isolate* isolate = global->GetIsolate(); |
| 3714 Factory* factory = isolate->factory(); | 3728 Factory* factory = isolate->factory(); |
| 3715 | 3729 |
| 3716 Handle<JSFunction> shared_array_buffer_fun = | 3730 Handle<JSFunction> shared_array_buffer_fun = |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5061 } | 5075 } |
| 5062 | 5076 |
| 5063 | 5077 |
| 5064 // Called when the top-level V8 mutex is destroyed. | 5078 // Called when the top-level V8 mutex is destroyed. |
| 5065 void Bootstrapper::FreeThreadResources() { | 5079 void Bootstrapper::FreeThreadResources() { |
| 5066 DCHECK(!IsActive()); | 5080 DCHECK(!IsActive()); |
| 5067 } | 5081 } |
| 5068 | 5082 |
| 5069 } // namespace internal | 5083 } // namespace internal |
| 5070 } // namespace v8 | 5084 } // namespace v8 |
| OLD | NEW |