OLD | NEW |
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 Loading... |
345 if (IsElement()) { | 345 if (IsElement()) { |
346 Handle<JSObject> object = Handle<JSObject>::cast(holder); | 346 Handle<JSObject> object = Handle<JSObject>::cast(holder); |
347 ElementsAccessor* accessor = object->GetElementsAccessor(); | 347 ElementsAccessor* accessor = object->GetElementsAccessor(); |
348 accessor->Delete(object, number_); | 348 accessor->Delete(object, number_); |
349 } else { | 349 } else { |
350 bool is_prototype_map = holder->map()->is_prototype_map(); | 350 bool is_prototype_map = holder->map()->is_prototype_map(); |
351 RuntimeCallTimerScope stats_scope( | 351 RuntimeCallTimerScope stats_scope( |
352 isolate_, is_prototype_map | 352 isolate_, is_prototype_map |
353 ? &RuntimeCallStats::PrototypeObject_DeleteProperty | 353 ? &RuntimeCallStats::PrototypeObject_DeleteProperty |
354 : &RuntimeCallStats::Object_DeleteProperty); | 354 : &RuntimeCallStats::Object_DeleteProperty); |
355 TRACE_RUNTIME_CALL(is_prototype_map ? "PrototypeObject_DeleteProperty" | |
356 : "Object_DeleteProperty"); | |
357 | 355 |
358 PropertyNormalizationMode mode = | 356 PropertyNormalizationMode mode = |
359 is_prototype_map ? KEEP_INOBJECT_PROPERTIES : CLEAR_INOBJECT_PROPERTIES; | 357 is_prototype_map ? KEEP_INOBJECT_PROPERTIES : CLEAR_INOBJECT_PROPERTIES; |
360 | 358 |
361 if (holder->HasFastProperties()) { | 359 if (holder->HasFastProperties()) { |
362 JSObject::NormalizeProperties(Handle<JSObject>::cast(holder), mode, 0, | 360 JSObject::NormalizeProperties(Handle<JSObject>::cast(holder), mode, 0, |
363 "DeletingProperty"); | 361 "DeletingProperty"); |
364 ReloadPropertyInformation<false>(); | 362 ReloadPropertyInformation<false>(); |
365 } | 363 } |
366 // TODO(verwaest): Get rid of the name_ argument. | 364 // TODO(verwaest): Get rid of the name_ argument. |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 case v8::internal::kAccessor: | 752 case v8::internal::kAccessor: |
755 return ACCESSOR; | 753 return ACCESSOR; |
756 } | 754 } |
757 | 755 |
758 UNREACHABLE(); | 756 UNREACHABLE(); |
759 return state_; | 757 return state_; |
760 } | 758 } |
761 | 759 |
762 } // namespace internal | 760 } // namespace internal |
763 } // namespace v8 | 761 } // namespace v8 |
OLD | NEW |