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

Unified Diff: src/bootstrapper.cc

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)
Patch Set: Remove whitespace change that snuck in 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') | src/builtins/builtins-array.cc » ('J')
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 6f9248abcf64c1887d5f5b19ff28c7839c948017..c0727cebc8a77d898a52c99a2e2a85f8b56387f3 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.
@@ -2188,12 +2189,14 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
// Install "keys", "values" and "entries" methods on the {prototype}.
SimpleInstallFunction(prototype, factory->entries_string(),
- Builtins::kTypedArrayPrototypeEntries, 0, true);
+ Builtins::kTypedArrayPrototypeEntries, true,
+ kTypedArrayEntries);
SimpleInstallFunction(prototype, factory->keys_string(),
- Builtins::kTypedArrayPrototypeKeys, 0, true);
- Handle<JSFunction> iterator =
- SimpleInstallFunction(prototype, factory->values_string(),
- Builtins::kTypedArrayPrototypeValues, 0, true);
+ Builtins::kTypedArrayPrototypeKeys, true,
+ kTypedArrayKeys);
+ Handle<JSFunction> iterator = SimpleInstallFunction(
+ prototype, factory->values_string(),
+ Builtins::kTypedArrayPrototypeValues, true, kTypedArrayValues);
JSObject::AddProperty(prototype, factory->iterator_symbol(), iterator,
DONT_ENUM);
}
« no previous file with comments | « no previous file | src/builtins/builtins-array.cc » ('j') | src/builtins/builtins-array.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698