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

Side by Side Diff: src/heap/heap.cc

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/handles-inl.h ('k') | src/hydrogen-instructions.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 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4706 matching lines...) Expand 10 before | Expand all | Expand 10 after
4717 ExecutionAccess access(isolate()); 4717 ExecutionAccess access(isolate());
4718 v->VisitPointers(&roots_[kSmiRootsStart], &roots_[kRootListLength]); 4718 v->VisitPointers(&roots_[kSmiRootsStart], &roots_[kRootListLength]);
4719 v->Synchronize(VisitorSynchronization::kSmiRootList); 4719 v->Synchronize(VisitorSynchronization::kSmiRootList);
4720 } 4720 }
4721 4721
4722 4722
4723 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { 4723 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
4724 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); 4724 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]);
4725 v->Synchronize(VisitorSynchronization::kStrongRootList); 4725 v->Synchronize(VisitorSynchronization::kStrongRootList);
4726 4726
4727 v->VisitPointer(BitCast<Object**>(&hidden_string_)); 4727 v->VisitPointer(bit_cast<Object**>(&hidden_string_));
4728 v->Synchronize(VisitorSynchronization::kInternalizedString); 4728 v->Synchronize(VisitorSynchronization::kInternalizedString);
4729 4729
4730 isolate_->bootstrapper()->Iterate(v); 4730 isolate_->bootstrapper()->Iterate(v);
4731 v->Synchronize(VisitorSynchronization::kBootstrapper); 4731 v->Synchronize(VisitorSynchronization::kBootstrapper);
4732 isolate_->Iterate(v); 4732 isolate_->Iterate(v);
4733 v->Synchronize(VisitorSynchronization::kTop); 4733 v->Synchronize(VisitorSynchronization::kTop);
4734 Relocatable::Iterate(isolate_, v); 4734 Relocatable::Iterate(isolate_, v);
4735 v->Synchronize(VisitorSynchronization::kRelocatable); 4735 v->Synchronize(VisitorSynchronization::kRelocatable);
4736 4736
4737 if (isolate_->deoptimizer_data() != NULL) { 4737 if (isolate_->deoptimizer_data() != NULL) {
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
6126 static_cast<int>(object_sizes_last_time_[index])); 6126 static_cast<int>(object_sizes_last_time_[index]));
6127 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6127 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6128 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6128 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6129 6129
6130 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6130 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6131 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6131 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6132 ClearObjectStats(); 6132 ClearObjectStats();
6133 } 6133 }
6134 } 6134 }
6135 } // namespace v8::internal 6135 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles-inl.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698