| 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
|
|
|