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

Unified Diff: src/elements.cc

Issue 2002203002: [api] Add more parameters to Object::GetPropertyNames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-05-06_keys_fast_path_1995263002
Patch Set: addressing nits Created 4 years, 7 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 | « src/debug/debug-scopes.cc ('k') | src/json-stringifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 398466509ce490b2f35cbe9f9740cc3301a6d168..6814197662e771a2ce9454ff12726763aa87c3af 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -886,7 +886,8 @@ class ElementsAccessorBase : public ElementsAccessor {
Handle<FixedArray> values_or_entries, bool get_entries, int* nof_items,
PropertyFilter filter) {
int count = 0;
- KeyAccumulator accumulator(isolate, OWN_ONLY, ALL_PROPERTIES);
+ KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly,
+ ALL_PROPERTIES);
Subclass::CollectElementIndicesImpl(
object, handle(object->elements(), isolate), &accumulator);
Handle<FixedArray> keys = accumulator.GetKeys();
@@ -950,7 +951,7 @@ class ElementsAccessorBase : public ElementsAccessor {
uint32_t length = Subclass::GetMaxIndex(*object, *backing_store);
for (uint32_t i = 0; i < length; i++) {
if (Subclass::HasElementImpl(object, i, backing_store, filter)) {
- if (convert == CONVERT_TO_STRING) {
+ if (convert == GetKeysConversion::kConvertToString) {
Handle<String> index_string = isolate->factory()->Uint32ToString(i);
list->set(insertion_index, *index_string);
} else {
@@ -996,7 +997,7 @@ class ElementsAccessorBase : public ElementsAccessor {
uint32_t array_length = 0;
// Indices from dictionary elements should only be converted after
// sorting.
- if (convert == CONVERT_TO_STRING) {
+ if (convert == GetKeysConversion::kConvertToString) {
for (uint32_t i = 0; i < nof_indices; i++) {
Handle<Object> index_string = isolate->factory()->Uint32ToString(
combined_keys->get(i)->Number());
@@ -2409,8 +2410,8 @@ class SloppyArgumentsElementsAccessor
Handle<FixedArray> indices = isolate->factory()->NewFixedArray(
GetCapacityImpl(*object, *backing_store));
DirectCollectElementIndicesImpl(isolate, object, backing_store,
- KEEP_NUMBERS, ENUMERABLE_STRINGS, indices,
- &nof_indices);
+ GetKeysConversion::kKeepNumbers,
+ ENUMERABLE_STRINGS, indices, &nof_indices);
SortIndices(indices, nof_indices);
for (uint32_t i = 0; i < nof_indices; i++) {
keys->AddKey(indices->get(i));
@@ -2427,7 +2428,7 @@ class SloppyArgumentsElementsAccessor
for (uint32_t i = 0; i < length; ++i) {
if (parameter_map->get(i + 2)->IsTheHole()) continue;
- if (convert == CONVERT_TO_STRING) {
+ if (convert == GetKeysConversion::kConvertToString) {
Handle<String> index_string = isolate->factory()->Uint32ToString(i);
list->set(insertion_index, *index_string);
} else {
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/json-stringifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698