~vcs-imports/v8/trunk-svn

« back to all changes in this revision

Viewing changes to src/mark-compact.cc

  • Committer: jkummerow at chromium
  • Date: 2011-11-07 10:14:12 UTC
  • Revision ID: svn-v4:ce2b1a6d-e550-0410-aec6-3dcde31c8c00:trunk:9889
Tags: 3.7.4
Version 3.7.4

Proper "libv8.so.3.7.4" SONAME for Linux shared library (issue 1786).

Fix Harmony sets and maps to allow null and undefined as keys (still hidden behind --harmony flag) (issue 1622).

Implement VirtualMemory on FreeBSD to fix build (issue 1807).

Enable VFP instructions for Android.

Fix error handling in Date.prototype.toISOString (issue 1792).

Bug fixes and performance improvements for all platforms.

Not officially supported but noteworthy: Crankshaft for MIPS :-)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1516
1516
        if (o->IsExternalString()) {
1517
1517
          heap_->FinalizeExternalString(String::cast(*p));
1518
1518
        }
1519
 
        // Set the entry to null_value (as deleted).
1520
 
        *p = heap_->null_value();
 
1519
        // Set the entry to the_hole_value (as deleted).
 
1520
        *p = heap_->the_hole_value();
1521
1521
        pointers_removed_++;
1522
1522
      }
1523
1523
    }
2124
2124
             i += MapCache::kEntrySize) {
2125
2125
          Object* raw_key = map_cache->get(i);
2126
2126
          if (raw_key == heap()->undefined_value() ||
2127
 
              raw_key == heap()->null_value()) continue;
 
2127
              raw_key == heap()->the_hole_value()) continue;
2128
2128
          STATIC_ASSERT(MapCache::kEntrySize == 2);
2129
2129
          Object* raw_map = map_cache->get(i + 1);
2130
2130
          if (raw_map->IsHeapObject() && IsMarked(raw_map)) {
2132
2132
          } else {
2133
2133
            // Delete useless entries with unmarked maps.
2134
2134
            ASSERT(raw_map->IsMap());
2135
 
            map_cache->set_null_unchecked(heap(), i);
2136
 
            map_cache->set_null_unchecked(heap(), i + 1);
 
2135
            map_cache->set_the_hole(i);
 
2136
            map_cache->set_the_hole(i + 1);
2137
2137
          }
2138
2138
        }
2139
2139
        if (used_elements == 0) {
2320
2320
    ObjectHashTable* table = weak_map->unchecked_table();
2321
2321
    for (int i = 0; i < table->Capacity(); i++) {
2322
2322
      if (!MarkCompactCollector::IsMarked(HeapObject::cast(table->KeyAt(i)))) {
2323
 
        table->RemoveEntry(i, heap());
 
2323
        table->RemoveEntry(i);
2324
2324
      }
2325
2325
    }
2326
2326
    weak_map_obj = weak_map->next();