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

Side by Side Diff: src/runtime/runtime-array.cc

Issue 1944703002: [keys] Cleanup: removing unused parameters in elements.cc and keys.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-04-19_keys.cc_the_great_migration_1938413002
Patch Set: remove accidental changes 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/conversions-inl.h" 9 #include "src/conversions-inl.h"
10 #include "src/elements.h" 10 #include "src/elements.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 !iter.IsAtEnd(); iter.Advance()) { 206 !iter.IsAtEnd(); iter.Advance()) {
207 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy() || 207 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy() ||
208 PrototypeIterator::GetCurrent<JSObject>(iter) 208 PrototypeIterator::GetCurrent<JSObject>(iter)
209 ->HasIndexedInterceptor()) { 209 ->HasIndexedInterceptor()) {
210 // Bail out if we find a proxy or interceptor, likely not worth 210 // Bail out if we find a proxy or interceptor, likely not worth
211 // collecting keys in that case. 211 // collecting keys in that case.
212 return *isolate->factory()->NewNumberFromUint(length); 212 return *isolate->factory()->NewNumberFromUint(length);
213 } 213 }
214 accumulator.NextPrototype(); 214 accumulator.NextPrototype();
215 Handle<JSObject> current = PrototypeIterator::GetCurrent<JSObject>(iter); 215 Handle<JSObject> current = PrototypeIterator::GetCurrent<JSObject>(iter);
216 accumulator.CollectOwnElementKeys(current); 216 accumulator.CollectOwnElementIndices(current);
217 } 217 }
218 // Erase any keys >= length. 218 // Erase any keys >= length.
219 Handle<FixedArray> keys = accumulator.GetKeys(KEEP_NUMBERS); 219 Handle<FixedArray> keys = accumulator.GetKeys(KEEP_NUMBERS);
220 int j = 0; 220 int j = 0;
221 for (int i = 0; i < keys->length(); i++) { 221 for (int i = 0; i < keys->length(); i++) {
222 if (NumberToUint32(keys->get(i)) >= length) continue; 222 if (NumberToUint32(keys->get(i)) >= length) continue;
223 if (i != j) keys->set(j, keys->get(i)); 223 if (i != j) keys->set(j, keys->get(i));
224 j++; 224 j++;
225 } 225 }
226 226
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0); 493 CONVERT_ARG_HANDLE_CHECKED(Object, original_array, 0);
494 Handle<Object> constructor; 494 Handle<Object> constructor;
495 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 495 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
496 isolate, constructor, 496 isolate, constructor,
497 Object::ArraySpeciesConstructor(isolate, original_array)); 497 Object::ArraySpeciesConstructor(isolate, original_array));
498 return *constructor; 498 return *constructor;
499 } 499 }
500 500
501 } // namespace internal 501 } // namespace internal
502 } // namespace v8 502 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698