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

Side by Side Diff: src/heap.cc

Issue 295933012: Revert "Inobject slack tracking is done on a per-closure basis instead of per-shared info basis." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.cc ('k') | src/heap-snapshot-generator.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "api.h" 8 #include "api.h"
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after
3630 // verification code has to cope with (temporarily) invalid objects. See 3630 // verification code has to cope with (temporarily) invalid objects. See
3631 // for example, JSArray::JSArrayVerify). 3631 // for example, JSArray::JSArrayVerify).
3632 Object* filler; 3632 Object* filler;
3633 // We cannot always fill with one_pointer_filler_map because objects 3633 // We cannot always fill with one_pointer_filler_map because objects
3634 // created from API functions expect their internal fields to be initialized 3634 // created from API functions expect their internal fields to be initialized
3635 // with undefined_value. 3635 // with undefined_value.
3636 // Pre-allocated fields need to be initialized with undefined_value as well 3636 // Pre-allocated fields need to be initialized with undefined_value as well
3637 // so that object accesses before the constructor completes (e.g. in the 3637 // so that object accesses before the constructor completes (e.g. in the
3638 // debugger) will not cause a crash. 3638 // debugger) will not cause a crash.
3639 if (map->constructor()->IsJSFunction() && 3639 if (map->constructor()->IsJSFunction() &&
3640 JSFunction::cast(map->constructor())-> 3640 JSFunction::cast(map->constructor())->shared()->
3641 IsInobjectSlackTrackingInProgress()) { 3641 IsInobjectSlackTrackingInProgress()) {
3642 // We might want to shrink the object later. 3642 // We might want to shrink the object later.
3643 ASSERT(obj->GetInternalFieldCount() == 0); 3643 ASSERT(obj->GetInternalFieldCount() == 0);
3644 filler = Heap::one_pointer_filler_map(); 3644 filler = Heap::one_pointer_filler_map();
3645 } else { 3645 } else {
3646 filler = Heap::undefined_value(); 3646 filler = Heap::undefined_value();
3647 } 3647 }
3648 obj->InitializeBody(map, Heap::undefined_value(), filler); 3648 obj->InitializeBody(map, Heap::undefined_value(), filler);
3649 } 3649 }
3650 3650
(...skipping 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after
6492 static_cast<int>(object_sizes_last_time_[index])); 6492 static_cast<int>(object_sizes_last_time_[index]));
6493 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6493 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6494 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6494 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6495 6495
6496 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6496 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6497 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6497 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6498 ClearObjectStats(); 6498 ClearObjectStats();
6499 } 6499 }
6500 6500
6501 } } // namespace v8::internal 6501 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698