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

Side by Side Diff: src/lookup.cc

Issue 1275363002: [IC] Make SeededNumberDictionary::UpdateMaxNumberKey prototype aware (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/elements.cc ('k') | src/objects.h » ('j') | src/objects.cc » ('J')
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/lookup-inl.h" 10 #include "src/lookup-inl.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 holder_ = receiver; 299 holder_ = receiver;
300 300
301 PropertyDetails details(attributes, ACCESSOR_CONSTANT, 0, 301 PropertyDetails details(attributes, ACCESSOR_CONSTANT, 0,
302 PropertyCellType::kMutable); 302 PropertyCellType::kMutable);
303 303
304 if (IsElement()) { 304 if (IsElement()) {
305 // TODO(verwaest): Move code into the element accessor. 305 // TODO(verwaest): Move code into the element accessor.
306 Handle<SeededNumberDictionary> dictionary = 306 Handle<SeededNumberDictionary> dictionary =
307 JSObject::NormalizeElements(receiver); 307 JSObject::NormalizeElements(receiver);
308 308
309 dictionary = SeededNumberDictionary::Set(dictionary, index_, pair, details); 309 // We unconditionally pass used_as_prototype=false here because the call
310 // to RequireSlowElements takes care of the required IC clearing and
311 // we don't want to walk the heap twice.
312 dictionary =
313 SeededNumberDictionary::Set(dictionary, index_, pair, details, false);
310 receiver->RequireSlowElements(*dictionary); 314 receiver->RequireSlowElements(*dictionary);
311 315
312 if (receiver->HasSlowArgumentsElements()) { 316 if (receiver->HasSlowArgumentsElements()) {
313 FixedArray* parameter_map = FixedArray::cast(receiver->elements()); 317 FixedArray* parameter_map = FixedArray::cast(receiver->elements());
314 uint32_t length = parameter_map->length() - 2; 318 uint32_t length = parameter_map->length() - 2;
315 if (number_ < length) { 319 if (number_ < length) {
316 parameter_map->set(number_ + 2, heap()->the_hole_value()); 320 parameter_map->set(number_ + 2, heap()->the_hole_value());
317 } 321 }
318 FixedArray::cast(receiver->elements())->set(1, *dictionary); 322 FixedArray::cast(receiver->elements())->set(1, *dictionary);
319 } else { 323 } else {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 case InterceptorState::kSkipNonMasking: 543 case InterceptorState::kSkipNonMasking:
540 return true; 544 return true;
541 case InterceptorState::kProcessNonMasking: 545 case InterceptorState::kProcessNonMasking:
542 return false; 546 return false;
543 } 547 }
544 } 548 }
545 return interceptor_state_ == InterceptorState::kProcessNonMasking; 549 return interceptor_state_ == InterceptorState::kProcessNonMasking;
546 } 550 }
547 } // namespace internal 551 } // namespace internal
548 } // namespace v8 552 } // namespace v8
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698