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

Side by Side Diff: src/objects.cc

Issue 765473004: Fast-to-slow migration should wipe out in-object space if it exists in the object after migration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 6 years 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 | « no previous file | src/objects-inl.h » ('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 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 4400 matching lines...) Expand 10 before | Expand all | Expand 10 after
4411 heap->AdjustLiveBytes(object->address(), -instance_size_delta, 4411 heap->AdjustLiveBytes(object->address(), -instance_size_delta,
4412 Heap::FROM_MUTATOR); 4412 Heap::FROM_MUTATOR);
4413 } 4413 }
4414 4414
4415 // We are storing the new map using release store after creating a filler for 4415 // We are storing the new map using release store after creating a filler for
4416 // the left-over space to avoid races with the sweeper thread. 4416 // the left-over space to avoid races with the sweeper thread.
4417 object->synchronized_set_map(*new_map); 4417 object->synchronized_set_map(*new_map);
4418 4418
4419 object->set_properties(*dictionary); 4419 object->set_properties(*dictionary);
4420 4420
4421 // Ensure that in-object space of slow-mode object does not contain random
4422 // garbage.
4423 int inobject_properties = new_map->inobject_properties();
4424 for (int i = 0; i < inobject_properties; i++) {
4425 FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i);
4426 object->RawFastPropertyAtPut(index, Smi::FromInt(0));
4427 }
4428
4421 isolate->counters()->props_to_dictionary()->Increment(); 4429 isolate->counters()->props_to_dictionary()->Increment();
4422 4430
4423 #ifdef DEBUG 4431 #ifdef DEBUG
4424 if (FLAG_trace_normalization) { 4432 if (FLAG_trace_normalization) {
4425 OFStream os(stdout); 4433 OFStream os(stdout);
4426 os << "Object properties have been normalized:\n"; 4434 os << "Object properties have been normalized:\n";
4427 object->Print(os); 4435 object->Print(os);
4428 } 4436 }
4429 #endif 4437 #endif
4430 } 4438 }
(...skipping 12401 matching lines...) Expand 10 before | Expand all | Expand 10 after
16832 Handle<DependentCode> codes = 16840 Handle<DependentCode> codes =
16833 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16841 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16834 DependentCode::kPropertyCellChangedGroup, 16842 DependentCode::kPropertyCellChangedGroup,
16835 info->object_wrapper()); 16843 info->object_wrapper());
16836 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16844 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16837 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16845 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16838 cell, info->zone()); 16846 cell, info->zone());
16839 } 16847 }
16840 16848
16841 } } // namespace v8::internal 16849 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698