Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 65208d7f3241b01d084c4f3ed6b8dc48c390da4c..aab6dd708d31b25f208d003a3d2906342ef6cbe4 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -3676,6 +3676,7 @@ void Genesis::InitializeGlobal_enable_fast_array_builtins() { |
factory->NewStringFromAsciiChecked("prototype"), |
LookupIterator::OWN_SKIP_INTERCEPTOR); |
Handle<Object> array_prototype = Object::GetProperty(&it2).ToHandleChecked(); |
+ |
LookupIterator it3(array_prototype, |
factory->NewStringFromAsciiChecked("forEach"), |
LookupIterator::OWN_SKIP_INTERCEPTOR); |
@@ -3706,6 +3707,19 @@ void Genesis::InitializeGlobal_enable_fast_array_builtins() { |
Handle<JSFunction>::cast(some_function) |
->shared() |
->set_code(isolate->builtins()->builtin(Builtins::kArraySome)); |
+ |
+ if (FLAG_experimental_array_builtins) { |
+ LookupIterator it6(array_prototype, |
+ factory->NewStringFromAsciiChecked("filter"), |
+ LookupIterator::OWN_SKIP_INTERCEPTOR); |
+ Handle<Object> filter_function = |
+ Object::GetProperty(&it6).ToHandleChecked(); |
+ Handle<JSFunction>::cast(filter_function) |
+ ->set_code(isolate->builtins()->builtin(Builtins::kArrayFilter)); |
+ Handle<JSFunction>::cast(filter_function) |
+ ->shared() |
+ ->set_code(isolate->builtins()->builtin(Builtins::kArrayFilter)); |
+ } |
} |
void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { |