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

Unified Diff: src/bootstrapper.cc

Issue 1581033002: [es7] implement Object.values() / Object.entries() proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Execution::ToObject() -> Object::ToObject(), test fixups Created 4 years, 11 months 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.h » ('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 315b47fb7c2d3202cba32553813a4ba4d7baf1a9..1c4574e5e0d8842cc342100325ae1cce0561d160 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2451,6 +2451,22 @@ void Genesis::InitializeGlobal_harmony_simd() {
}
+void Genesis::InitializeGlobal_harmony_object_values_entries() {
+ if (!FLAG_harmony_object_values_entries) return;
+
+ Handle<JSGlobalObject> global(
+ JSGlobalObject::cast(native_context()->global_object()));
+ Isolate* isolate = global->GetIsolate();
+ Factory* factory = isolate->factory();
+
+ Handle<JSFunction> object_function = isolate->object_function();
+ SimpleInstallFunction(object_function, factory->entries_string(),
+ Builtins::kObjectEntries, 1, false);
+ SimpleInstallFunction(object_function, factory->values_string(),
+ Builtins::kObjectValues, 1, false);
+}
+
+
void Genesis::InstallJSProxyMaps() {
// Allocate the different maps for all Proxy types.
// Next to the default proxy, we need maps indicating callable and
@@ -2940,6 +2956,7 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_function_name_natives[] = {nullptr};
static const char* promise_extra_natives[] = {"native promise-extra.js",
nullptr};
+ static const char* harmony_object_values_entries_natives[] = {nullptr};
for (int i = ExperimentalNatives::GetDebuggerCount();
i < ExperimentalNatives::GetBuiltinsCount(); i++) {
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698