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

Side by Side Diff: src/objects.cc

Issue 845403002: Reduce number of deopts caused by ForceDelete. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/api.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 Handle<Map> new_map = Map::CopyDropDescriptors(handle(object->map())); 550 Handle<Map> new_map = Map::CopyDropDescriptors(handle(object->map()));
551 DCHECK(new_map->is_dictionary_map()); 551 DCHECK(new_map->is_dictionary_map());
552 #if TRACE_MAPS 552 #if TRACE_MAPS
553 if (FLAG_trace_maps) { 553 if (FLAG_trace_maps) {
554 PrintF("[TraceMaps: GlobalDeleteNormalized from= %p to= %p ]\n", 554 PrintF("[TraceMaps: GlobalDeleteNormalized from= %p to= %p ]\n",
555 reinterpret_cast<void*>(object->map()), 555 reinterpret_cast<void*>(object->map()),
556 reinterpret_cast<void*>(*new_map)); 556 reinterpret_cast<void*>(*new_map));
557 } 557 }
558 #endif 558 #endif
559 JSObject::MigrateToMap(object, new_map); 559 JSObject::MigrateToMap(object, new_map);
560 // Optimized code does not check for the hole value for non-configurable
561 // properties.
562 Deoptimizer::DeoptimizeGlobalObject(*object);
560 } 563 }
561 Handle<PropertyCell> cell(PropertyCell::cast(dictionary->ValueAt(entry))); 564 Handle<PropertyCell> cell(PropertyCell::cast(dictionary->ValueAt(entry)));
562 Handle<Object> value = isolate->factory()->the_hole_value(); 565 Handle<Object> value = isolate->factory()->the_hole_value();
563 PropertyCell::SetValueInferType(cell, value); 566 PropertyCell::SetValueInferType(cell, value);
564 dictionary->DetailsAtPut(entry, details.AsDeleted()); 567 dictionary->DetailsAtPut(entry, details.AsDeleted());
565 } else { 568 } else {
566 Handle<Object> deleted( 569 Handle<Object> deleted(
567 NameDictionary::DeleteProperty(dictionary, entry, mode)); 570 NameDictionary::DeleteProperty(dictionary, entry, mode));
568 if (*deleted == isolate->heap()->true_value()) { 571 if (*deleted == isolate->heap()->true_value()) {
569 Handle<NameDictionary> new_properties = 572 Handle<NameDictionary> new_properties =
(...skipping 16256 matching lines...) Expand 10 before | Expand all | Expand 10 after
16826 Handle<DependentCode> codes = 16829 Handle<DependentCode> codes =
16827 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16830 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16828 DependentCode::kPropertyCellChangedGroup, 16831 DependentCode::kPropertyCellChangedGroup,
16829 info->object_wrapper()); 16832 info->object_wrapper());
16830 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16833 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16831 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16834 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16832 cell, info->zone()); 16835 cell, info->zone());
16833 } 16836 }
16834 16837
16835 } } // namespace v8::internal 16838 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698