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

Side by Side Diff: src/lookup.cc

Issue 1973473002: [runtime] Record runtime call stats for Map::TransitionTo*Property, JSObject::OptimizeAsPrototype t… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@handler-counters2
Patch Set: Addressing comments and rebasing 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/counters-inl.h ('k') | src/objects.cc » ('j') | 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/lookup.h" 5 #include "src/lookup.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/elements.h" 9 #include "src/elements.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 347
348 void LookupIterator::Delete() { 348 void LookupIterator::Delete() {
349 Handle<JSReceiver> holder = Handle<JSReceiver>::cast(holder_); 349 Handle<JSReceiver> holder = Handle<JSReceiver>::cast(holder_);
350 if (IsElement()) { 350 if (IsElement()) {
351 Handle<JSObject> object = Handle<JSObject>::cast(holder); 351 Handle<JSObject> object = Handle<JSObject>::cast(holder);
352 ElementsAccessor* accessor = object->GetElementsAccessor(); 352 ElementsAccessor* accessor = object->GetElementsAccessor();
353 accessor->Delete(object, number_); 353 accessor->Delete(object, number_);
354 } else { 354 } else {
355 PropertyNormalizationMode mode = holder->map()->is_prototype_map() 355 bool is_prototype_map = holder->map()->is_prototype_map();
356 ? KEEP_INOBJECT_PROPERTIES 356 RuntimeCallTimerScope stats_scope(
357 : CLEAR_INOBJECT_PROPERTIES; 357 isolate_, is_prototype_map
358 ? &RuntimeCallStats::PrototypeObject_DeleteProperty
359 : &RuntimeCallStats::Object_DeleteProperty);
Camillo Bruni 2016/05/11 13:01:46 I hope this case doesn't happen too much, I've see
360
361 PropertyNormalizationMode mode =
362 is_prototype_map ? KEEP_INOBJECT_PROPERTIES : CLEAR_INOBJECT_PROPERTIES;
358 363
359 if (holder->HasFastProperties()) { 364 if (holder->HasFastProperties()) {
360 JSObject::NormalizeProperties(Handle<JSObject>::cast(holder), mode, 0, 365 JSObject::NormalizeProperties(Handle<JSObject>::cast(holder), mode, 0,
361 "DeletingProperty"); 366 "DeletingProperty");
362 ReloadPropertyInformation<false>(); 367 ReloadPropertyInformation<false>();
363 } 368 }
364 // TODO(verwaest): Get rid of the name_ argument. 369 // TODO(verwaest): Get rid of the name_ argument.
365 JSReceiver::DeleteNormalizedProperty(holder, name_, number_); 370 JSReceiver::DeleteNormalizedProperty(holder, name_, number_);
366 if (holder->IsJSObject()) { 371 if (holder->IsJSObject()) {
367 JSObject::ReoptimizeIfPrototype(Handle<JSObject>::cast(holder)); 372 JSObject::ReoptimizeIfPrototype(Handle<JSObject>::cast(holder));
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 case v8::internal::kAccessor: 768 case v8::internal::kAccessor:
764 return ACCESSOR; 769 return ACCESSOR;
765 } 770 }
766 771
767 UNREACHABLE(); 772 UNREACHABLE();
768 return state_; 773 return state_;
769 } 774 }
770 775
771 } // namespace internal 776 } // namespace internal
772 } // namespace v8 777 } // namespace v8
OLDNEW
« no previous file with comments | « src/counters-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698