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

Unified Diff: src/key-accumulator.h

Issue 1637753004: [es7] refactor and fix Object.values() / Object.entries() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: keepin it fresh 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
Index: src/key-accumulator.h
diff --git a/src/key-accumulator.h b/src/key-accumulator.h
index 8a4d886f515db441e1a8346daf4f0442e1a1dc03..aac23ac0099b3f53fa0927944b009d3c06883efd 100644
--- a/src/key-accumulator.h
+++ b/src/key-accumulator.h
@@ -51,6 +51,10 @@ class KeyAccumulator final BASE_EMBEDDED {
// Sort the integer indices in the last list in |elements_|
void SortCurrentElementsList();
Handle<FixedArray> GetKeys(GetKeysConversion convert = KEEP_NUMBERS);
+ MaybeHandle<FixedArray> GetValues(Handle<JSReceiver> object,
+ GetKeysConversion convert = KEEP_NUMBERS);
+ MaybeHandle<FixedArray> GetEntries(Handle<JSReceiver> object,
+ GetKeysConversion convert = KEEP_NUMBERS);
Camillo Bruni 2016/02/03 12:03:48 Do you think we will ever need the convert argumen
caitp (gmail) 2016/02/03 12:57:30 it has been removed
int length() { return length_; }
Isolate* isolate() { return isolate_; }
@@ -59,6 +63,9 @@ class KeyAccumulator final BASE_EMBEDDED {
bool AddStringKey(Handle<Object> key, AddKeyConversion convert);
bool AddSymbolKey(Handle<Object> array);
void SortCurrentElementsListRemoveDuplicates();
+ template <typename F>
+ MaybeHandle<FixedArray> GetKeys_Internal(GetKeysConversion convert,
+ bool trivial, F& accumulate);
Isolate* isolate_;
PropertyFilter filter_;
« no previous file with comments | « src/builtins.cc ('k') | src/key-accumulator.cc » ('j') | src/key-accumulator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698