Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: src/bootstrapper.cc

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: fix tests when ignition is used Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/builtins/builtins-array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index c75961d4bb9357bbc2ca3d0720345813c71d1bb0..08f024f5a6d1d11df89c6ecf84e66f7e73f08092 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1334,6 +1334,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<JSFunction> next = InstallFunction(
array_iterator_prototype, "next", JS_OBJECT_TYPE, JSObject::kHeaderSize,
MaybeHandle<JSObject>(), Builtins::kArrayIteratorPrototypeNext);
+ next->shared()->set_builtin_function_id(kArrayIteratorNext);
// Set the expected parameters for %ArrayIteratorPrototype%.next to 0 (not
// including the receiver), as required by the builtin.
@@ -2187,14 +2188,21 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
kTypedArrayLength);
// Install "keys", "values" and "entries" methods on the {prototype}.
- SimpleInstallFunction(prototype, factory->entries_string(),
- Builtins::kTypedArrayPrototypeEntries, 0, true);
- SimpleInstallFunction(prototype, factory->keys_string(),
- Builtins::kTypedArrayPrototypeKeys, 0, true);
- Handle<JSFunction> iterator =
+ Handle<JSFunction> entries =
+ SimpleInstallFunction(prototype, factory->entries_string(),
+ Builtins::kTypedArrayPrototypeEntries, 0, true);
+ entries->shared()->set_builtin_function_id(kTypedArrayEntries);
+
+ Handle<JSFunction> keys =
+ SimpleInstallFunction(prototype, factory->keys_string(),
+ Builtins::kTypedArrayPrototypeKeys, 0, true);
+ keys->shared()->set_builtin_function_id(kTypedArrayKeys);
+
+ Handle<JSFunction> values =
SimpleInstallFunction(prototype, factory->values_string(),
Builtins::kTypedArrayPrototypeValues, 0, true);
- JSObject::AddProperty(prototype, factory->iterator_symbol(), iterator,
+ values->shared()->set_builtin_function_id(kTypedArrayValues);
+ JSObject::AddProperty(prototype, factory->iterator_symbol(), values,
DONT_ENUM);
}
« no previous file with comments | « no previous file | src/builtins/builtins-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698