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

Side by Side Diff: src/objects.cc

Issue 2545143002: Merged: [heap] Clear recorded slots for inobject properties when migrating fast object to slow mode. (Closed)
Patch Set: Created 4 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 | 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after
3515 if (inobject_properties) { 3515 if (inobject_properties) {
3516 Heap* heap = isolate->heap(); 3516 Heap* heap = isolate->heap();
3517 heap->ClearRecordedSlotRange( 3517 heap->ClearRecordedSlotRange(
3518 object->address() + map->GetInObjectPropertyOffset(0), 3518 object->address() + map->GetInObjectPropertyOffset(0),
3519 object->address() + new_instance_size); 3519 object->address() + new_instance_size);
3520 3520
3521 for (int i = 0; i < inobject_properties; i++) { 3521 for (int i = 0; i < inobject_properties; i++) {
3522 FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i); 3522 FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i);
3523 object->RawFastPropertyAtPut(index, Smi::FromInt(0)); 3523 object->RawFastPropertyAtPut(index, Smi::FromInt(0));
3524 } 3524 }
3525 } 3525 }
3526 3526
3527 isolate->counters()->props_to_dictionary()->Increment(); 3527 isolate->counters()->props_to_dictionary()->Increment();
3528 3528
3529 #ifdef DEBUG 3529 #ifdef DEBUG
3530 if (FLAG_trace_normalization) { 3530 if (FLAG_trace_normalization) {
3531 OFStream os(stdout); 3531 OFStream os(stdout);
3532 os << "Object properties have been normalized:\n"; 3532 os << "Object properties have been normalized:\n";
3533 object->Print(os); 3533 object->Print(os);
3534 } 3534 }
3535 #endif 3535 #endif
(...skipping 16404 matching lines...) Expand 10 before | Expand all | Expand 10 after
19940 } 19940 }
19941 19941
19942 // Evaluation of module body. 19942 // Evaluation of module body.
19943 Handle<JSFunction> resume( 19943 Handle<JSFunction> resume(
19944 isolate->native_context()->generator_next_internal(), isolate); 19944 isolate->native_context()->generator_next_internal(), isolate);
19945 return Execution::Call(isolate, resume, generator, 0, nullptr); 19945 return Execution::Call(isolate, resume, generator, 0, nullptr);
19946 } 19946 }
19947 19947
19948 } // namespace internal 19948 } // namespace internal
19949 } // namespace v8 19949 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698