Skip to content

Commit

Permalink
Reland "[esnext] ship Object.fromEntries"
Browse files Browse the repository at this point in the history
Enable --harmony-object-from-entries by default.

Object.fromEntries is a new standard library method, whose proposal
(https://tc39.github.io/proposal-object-from-entries/) is currently
at stage 3.

It simply creates a JSObject from an iterable collection of key/value
pairs, such that `Object.fromEntries([ [ "a", "b" ] ]) -> { a: "b" }`

BUG=v8:8021
R=gsathya@chromium.org, adamk@chromium.org

Change-Id: I75787fce7ab06704be989576e7850d029ff4c1bf
Reviewed-on: https://chromium-review.googlesource.com/c/1397914
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58718}
  • Loading branch information
caitp authored and Commit Bot committed Jan 10, 2019
1 parent c17d21a commit f8f4a48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/flag-definitions.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -213,10 +213,9 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
#endif #endif


// Features that are complete (but still behind --harmony/es-staging flag). // Features that are complete (but still behind --harmony/es-staging flag).
#define HARMONY_STAGED_BASE(V) \ #define HARMONY_STAGED_BASE(V) \
V(harmony_private_fields, "harmony private fields in class literals") \ V(harmony_private_fields, "harmony private fields in class literals") \
V(harmony_numeric_separator, "harmony numeric separator between digits") \ V(harmony_numeric_separator, "harmony numeric separator between digits")
V(harmony_object_from_entries, "harmony Object.fromEntries()")


#ifdef V8_INTL_SUPPORT #ifdef V8_INTL_SUPPORT
#define HARMONY_STAGED(V) \ #define HARMONY_STAGED(V) \
Expand All @@ -239,7 +238,8 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
V(harmony_json_stringify, "well-formed JSON.stringify") \ V(harmony_json_stringify, "well-formed JSON.stringify") \
V(harmony_public_fields, "harmony public instance fields in class literals") \ V(harmony_public_fields, "harmony public instance fields in class literals") \
V(harmony_static_fields, "harmony static fields in class literals") \ V(harmony_static_fields, "harmony static fields in class literals") \
V(harmony_string_matchall, "harmony String.prototype.matchAll") V(harmony_string_matchall, "harmony String.prototype.matchAll") \
V(harmony_object_from_entries, "harmony Object.fromEntries()")


#ifdef V8_INTL_SUPPORT #ifdef V8_INTL_SUPPORT
#define HARMONY_SHIPPING(V) \ #define HARMONY_SHIPPING(V) \
Expand Down

0 comments on commit f8f4a48

Please sign in to comment.