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

Unified Diff: src/global-handles.cc

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/global-handles.h ('k') | src/harmony-array.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 5df9dd4c6c78857f517bc83b23a19b5e4d4d2179..88ebe31647dc954fa21f0f5deca99dbf2ccc819b 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -71,7 +71,6 @@ class GlobalHandles::Node {
STATIC_ASSERT(static_cast<int>(NodeState::kMask) ==
Internals::kNodeStateMask);
STATIC_ASSERT(WEAK == Internals::kNodeStateIsWeakValue);
- STATIC_ASSERT(PENDING == Internals::kNodeStateIsPendingValue);
STATIC_ASSERT(NEAR_DEATH == Internals::kNodeStateIsNearDeathValue);
STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) ==
Internals::kNodeIsIndependentShift);
@@ -1019,68 +1018,4 @@ void GlobalHandles::ComputeObjectGroupsAndImplicitReferences() {
}
-EternalHandles::EternalHandles() : size_(0) {
- STATIC_ASSERT(v8::kUninitializedEternalIndex == kInvalidIndex);
- for (unsigned i = 0; i < ARRAY_SIZE(singleton_handles_); i++) {
- singleton_handles_[i] = kInvalidIndex;
- }
-}
-
-
-EternalHandles::~EternalHandles() {
- for (int i = 0; i < blocks_.length(); i++) delete[] blocks_[i];
-}
-
-
-void EternalHandles::IterateAllRoots(ObjectVisitor* visitor) {
- int limit = size_;
- for (int i = 0; i < blocks_.length(); i++) {
- ASSERT(limit > 0);
- Object** block = blocks_[i];
- visitor->VisitPointers(block, block + Min(limit, kSize));
- limit -= kSize;
- }
-}
-
-
-void EternalHandles::IterateNewSpaceRoots(ObjectVisitor* visitor) {
- for (int i = 0; i < new_space_indices_.length(); i++) {
- visitor->VisitPointer(GetLocation(new_space_indices_[i]));
- }
-}
-
-
-void EternalHandles::PostGarbageCollectionProcessing(Heap* heap) {
- int last = 0;
- for (int i = 0; i < new_space_indices_.length(); i++) {
- int index = new_space_indices_[i];
- if (heap->InNewSpace(*GetLocation(index))) {
- new_space_indices_[last++] = index;
- }
- }
- new_space_indices_.Rewind(last);
-}
-
-
-int EternalHandles::Create(Isolate* isolate, Object* object) {
- if (object == NULL) return kInvalidIndex;
- ASSERT_NE(isolate->heap()->the_hole_value(), object);
- int block = size_ >> kShift;
- int offset = size_ & kMask;
- // need to resize
- if (offset == 0) {
- Object** next_block = new Object*[kSize];
- Object* the_hole = isolate->heap()->the_hole_value();
- MemsetPointer(next_block, the_hole, kSize);
- blocks_.Add(next_block);
- }
- ASSERT_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]);
- blocks_[block][offset] = object;
- if (isolate->heap()->InNewSpace(object)) {
- new_space_indices_.Add(size_);
- }
- return size_++;
-}
-
-
} } // namespace v8::internal
« no previous file with comments | « src/global-handles.h ('k') | src/harmony-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698