Home | History | Annotate | Download | only in src

Lines Matching defs:object

198 //   after: a live object's map pointer is marked as '00'.
202 // marking, live objects' map pointers are marked indicating that the object
342 static inline HeapObject* ShortCircuitConsString(Object** p) {
343 // Optimization: If the heap object pointed to by p is a non-symbol
347 // Here we assume that if we change *p, we replace it with a heap object
348 // (ie, the left substring of a cons string is always a heap object).
351 // object->IsConsString() && !object->IsSymbol() &&
352 // (ConsString::cast(object)->second() == HEAP->empty_string())
353 // except the maps for the object and its possible substrings might be
355 HeapObject* object = HeapObject::cast(*p);
356 MapWord map_word = object->map_word();
359 if ((type & kShortcutTypeMask) != kShortcutTypeTag) return object;
361 Object* second = reinterpret_cast<ConsString*>(object)->unchecked_second();
364 return object;
367 // Since we don't have the object's start, it is impossible to update the
370 Object* first = reinterpret_cast<ConsString*>(object)->unchecked_first();
371 if (!heap->InNewSpace(object) && heap->InNewSpace(first)) return object;
445 INLINE(static void VisitPointer(Heap* heap, Object** p)) {
449 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) {
456 for (Object** p = start; p < end; p++) MarkObjectByPointer(heap, p);
473 Object* cell = rinfo->target_cell();
474 Object* old_cell = cell;
490 // Mark object pointed to by p.
491 INLINE(static void MarkObjectByPointer(Heap* heap, Object** p)) {
493 HeapObject* object = ShortCircuitConsString(p);
494 if (!object->IsMarked()) {
495 heap->mark_compact_collector()->MarkUnmarkedObject(object);
500 // Visit an unmarked object.
517 Object** start,
518 Object** end) {
525 for (Object** p = start; p < end; p++) {
541 static void VisitSpecialized(Map* map, HeapObject* object) {
544 static void Visit(Map* map, HeapObject* object) {
556 static void VisitCode(Map* map, HeapObject* object) {
557 reinterpret_cast<Code*>(object)->CodeIterateBody<StaticMarkingVisitor>(
563 // How many collections newly compiled code object will survive before being
568 Object* undefined = heap->raw_unchecked_undefined_value();
617 Object* function_data = shared_info->function_data();
656 static inline Map* SafeMap(Object* obj) {
664 static inline bool IsJSBuiltinsObject(Object* obj) {
670 static inline bool IsValidNotBuiltinContext(Object* ctx) {
691 static void VisitSharedFunctionInfoGeneric(Map* map, HeapObject* object) {
692 SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(object);
698 void>::Visit(map, object);
703 HeapObject* object) {
706 VisitSharedFunctionInfoGeneric(map, object);
709 VisitSharedFunctionInfoAndFlushCodeGeneric(map, object, false);
714 Map* map, HeapObject* object, bool known_flush_code_candidate) {
716 SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(object);
727 VisitSharedFunctionInfoFields(heap, object, known_flush_code_candidate);
732 Object* code = Code::GetObjectFromEntryAddress(entry_address);
733 Object* old_code = code;
742 static void VisitJSFunctionAndFlushCode(Map* map, HeapObject* object) {
746 VisitJSFunction(map, object);
750 JSFunction* jsfunction = reinterpret_cast<JSFunction*>(object);
780 reinterpret_cast<JSFunction*>(object),
785 static void VisitJSFunction(Map* map, HeapObject* object) {
787 reinterpret_cast<JSFunction*>(object),
793 reinterpret_cast<Object**>((obj)->address() + offset)
797 JSFunction* object,
803 SLOT_ADDR(object, JSFunction::kPropertiesOffset),
804 SLOT_ADDR(object, JSFunction::kCodeEntryOffset));
807 VisitCodeEntry(heap, object->address() + JSFunction::kCodeEntryOffset);
809 // Don't visit code object.
813 SharedFunctionInfo* shared_info = object->unchecked_shared();
825 SLOT_ADDR(object,
827 SLOT_ADDR(object, JSFunction::kNonWeakFieldsEndOffset));
834 HeapObject* object,
836 VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kNameOffset));
839 VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kCodeOffset));
843 SLOT_ADDR(object, SharedFunctionInfo::kScopeInfoOffset),
844 SLOT_ADDR(object, SharedFunctionInfo::kSize));
849 typedef void (*Callback)(Map* map, HeapObject* object);
863 void VisitPointer(Object** p) {
867 void VisitPointers(Object** start, Object** end) {
909 void VisitPointers(Object** start, Object** end) {
910 for (Object** p = start; p < end; p++) VisitPointer(p);
913 void VisitPointer(Object** slot) {
914 Object* obj = *slot;
974 void VisitPointer(Object** p) {
978 void VisitPointers(Object** start, Object** end) {
979 for (Object** p = start; p < end; p++) MarkObjectByPointer(p);
983 void MarkObjectByPointer(Object** p) {
987 HeapObject* object = ShortCircuitConsString(p);
988 if (object->IsMarked()) return;
990 Map* map = object->map();
991 // Mark the object.
992 collector_->SetMark(object);
996 StaticMarkingVisitor::IterateBody(map, object);
1013 virtual void VisitPointers(Object** start, Object** end) {
1015 for (Object** p = start; p < end; p++) {
1021 // the object.
1045 virtual Object* RetainAs(Object* object) {
1046 MapWord first_word = HeapObject::cast(object)->map_word();
1048 return object;
1056 void MarkCompactCollector::MarkUnmarkedObject(HeapObject* object) {
1057 ASSERT(!object->IsMarked());
1058 ASSERT(HEAP->Contains(object));
1059 if (object->IsMap()) {
1060 Map* map = Map::cast(object);
1073 SetMark(object);
1074 marking_stack_.Push(object);
1089 // Mark the Object* fields of the Map.
1092 Object** start_slot = HeapObject::RawField(map,
1095 Object** end_slot = HeapObject::RawField(map, Map::kPointerFieldsEndOffset);
1119 // CONSTANT_TRANSITION is the value an Object* (a Map*).
1125 HeapObject* object = reinterpret_cast<HeapObject*>(contents->get(i));
1126 if (object->IsHeapObject() && !object->IsMarked()) {
1127 SetMark(object);
1128 marking_stack_.Push(object);
1177 for (HeapObject* object = it->next(); object != NULL; object = it->next()) {
1178 if (object->IsOverflowed()) {
1179 object->ClearOverflow();
1180 ASSERT(object->IsMarked());
1181 ASSERT(HEAP->Contains(object));
1182 collector->marking_stack_.Push(object);
1190 bool MarkCompactCollector::IsUnmarkedHeapObject(Object** p) {
1231 Object*** objects = entry->objects_;
1234 Object* object = *objects[j];
1235 if (object->IsHeapObject() && HeapObject::cast(object)->IsMarked()) {
1246 // An object in the group is marked, so mark all heap objects in
1276 Object*** children = entry->children_;
1277 // A parent object is marked, so mark all child heap objects.
1293 // Before: the marking stack contains zero or more heap object pointers.
1298 HeapObject* object = marking_stack_.Pop();
1299 ASSERT(object->IsHeapObject());
1300 ASSERT(heap()->Contains(object));
1301 ASSERT(object->IsMarked());
1302 ASSERT(!object->IsOverflowed());
1304 // Because the object is marked, we have to recover the original map
1305 // pointer and use it to mark the object's body.
1306 MapWord map_word = object->map_word();
1311 StaticMarkingVisitor::IterateBody(map, object);
1358 // stack. Before: the marking stack contains zero or more heap object
1410 // The objects reachable from the roots or object groups are marked,
1443 // Remove object groups after marking phase.
1495 bool MarkCompactCollector::SafeIsMap(HeapObject* object) {
1496 MapWord metamap = object->map_word();
1537 Object* prototype = prototype_transitions->get(i);
1538 Object* cached_map = prototype_transitions->get(i + 1);
1556 Object* undefined = heap()->raw_unchecked_undefined_value();
1572 Object* real_prototype = current;
1578 Object* next;
1610 // of a live object). A second distinguished map-pointer encoding is used
1615 // Any valid map page offset must lie in the object area of the page, so map
1648 // strings are promoted to the code space, large objects to large object space,
1651 HeapObject* object,
1657 OldSpace* target_space = heap->TargetSpace(object);
1662 Object* result;
1710 // to-space object, but in from space.
1714 Object* new_object,
1723 // The forwarding address is encoded in the map pointer of the object as an
1724 // offset (in terms of live bytes) from the address of the first live object
1729 Object* new_object,
1731 // Record the forwarding address of the first live object if necessary.
1746 inline void IgnoreNonLiveObject(HeapObject* object, Isolate* isolate) {}
1771 // A flag giving the state of the previously swept object. Initially true
1778 HeapObject* object = HeapObject::FromAddress(current);
1779 if (object->IsMarked()) {
1780 object->ClearMark();
1782 object_size = object->Size();
1784 Object* forwarded =
1785 Alloc(collector->heap(), object, object_size)->ToObjectUnchecked();
1786 Encode(collector->heap(), object, object_size, forwarded, offset);
1790 PrintF("forward %p -> %p.\n", object->address(),
1798 } else { // Non-live object.
1799 object_size = object->Size();
1800 ProcessNonLive(object, collector->heap()->isolate());
1805 LiveObjectList::ProcessNonLive(object);
1837 // The offset of each live object in the page from the first live object
1855 // first word of object without any encoding. If object is dead we are writing
1879 static inline void VisitPointer(Heap* heap, Object** p) {
1899 void VisitPointer(Object** p) {
1903 void VisitPointers(Object** start, Object** end) {
1904 for (Object** p = start; p < end; p++) {
1911 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
1921 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
1942 // We encountered pointer to a dead object. Clear it so we will
1952 Object** p) {
1959 static bool TryPromoteObject(Heap* heap, HeapObject* object, int object_size) {
1960 Object* result;
1967 MigrateObject(heap, target->address(), object->address(), object_size,
1974 OldSpace* target_space = heap->TargetSpace(object);
1983 object->address(),
2013 HeapObject* object = HeapObject::FromAddress(current);
2015 if (object->IsMarked()) {
2016 object->ClearMark();
2019 size = object->Size();
2023 if (TryPromoteObject(heap, object, size)) {
2027 // Promotion failed. Just migrate object to another semispace.
2029 Object* target = space->AllocateRaw(size)->ToObjectUnchecked();
2037 // Process the dead object before we write a NULL into its header.
2038 LiveObjectList::ProcessNonLive(object);
2040 size = object->Size();
2051 HeapObject* object = HeapObject::FromAddress(current);
2053 StaticPointersToNewGenUpdatingVisitor::IterateBody(object->map(),
2054 object);
2078 updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
2128 HeapObject* object;
2132 current += object->Size()) {
2133 object = HeapObject::FromAddress(current);
2134 if (object->IsMarked()) {
2135 object->ClearMark();
2146 object, heap->isolate());
2151 LiveObjectList::ProcessNonLive(object);
2153 // The object is now unmarked for the call to Size() at the top of the
2380 void VisitPointer(Object** p) {
2384 void VisitPointers(Object** start, Object** end) {
2385 for (Object** p = start; p < end; p++) UpdateMapPointer(p);
2389 void UpdateMapPointer(Object** p) {
2484 HeapObject* object;
2487 object = HeapObject::FromAddress(current);
2488 size = UpdateMapPointersInObject(heap, object);
2558 // size of each live object.
2611 void VisitPointer(Object** p) {
2615 void VisitPointers(Object** start, Object** end) {
2617 for (Object** p = start; p < end; p++) UpdatePointer(p);
2622 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
2633 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
2642 void UpdatePointer(Object** p) {
2669 // Don't move objects in the large object space.
2772 // We have to compute the object size relying on the old map because
2776 // Update pointers in the object body.
2807 // Update pointers in the object body.
2815 // Object should either in old or map space.
2818 // Offset to the first live object's forwarding address.
2822 // Find the first live object's forwarding address.
2833 // Check if current object's forward pointer is in the same page
2834 // as the first live object's forwarding pointer
2863 // objects in other space relies on map objects to get object size.
2918 // Reset map pointer. The meta map object may not be copied yet so
2945 // This must be a non-map object, and the function relies on the