Lines Matching defs:object
215 int Heap::GcSafeSizeOfOldObject(HeapObject* object) {
216 ASSERT(!HEAP->InNewSpace(object)); // Code only works for old objects.
218 MapWord map_word = object->map_word();
221 return object->SizeFromMap(map_word.ToMap());
225 int Heap::GcSafeSizeOfOldObjectWithEncodedMap(HeapObject* object) {
226 ASSERT(!HEAP->InNewSpace(object)); // Code only works for old objects.
228 uint32_t marker = Memory::uint32_at(object->address());
232 return Memory::int_at(object->address() + kIntSize);
234 MapWord map_word = object->map_word();
237 return object->SizeFromMap(map);
266 // for object promotion. It counts only the bytes that the memory
354 PrintF("Large object space, used: %8" V8_PTR_PREFIX "d"
535 void VisitPointers(Object** start, Object** end) {
537 for (Object** p = start; p < end; p++) {
599 // large-object allocations that are only just larger than the page size.
601 // The ReserveSpace method on the large object space checks how much
638 Object* context = global_contexts_list_;
658 Object* context = global_contexts_list_;
860 Object* Heap::FindCodeObject(Address a) {
861 Object* obj = NULL; // Initialization to please compiler.
876 void VisitPointer(Object** p) { ScavengePointer(p); }
878 void VisitPointers(Object** start, Object** end) {
880 for (Object** p = start; p < end; p++) ScavengePointer(p);
884 void ScavengePointer(Object** p) {
885 Object* object = *p;
886 if (!heap_->InNewSpace(object)) return;
888 reinterpret_cast<HeapObject*>(object));
900 void VisitPointers(Object** start, Object**end) {
901 for (Object** current = start; current < end; current++) {
915 for (HeapObject* object = code_it.next();
916 object != NULL; object = code_it.next())
917 object->Iterate(&v);
920 for (HeapObject* object = data_it.next();
921 object != NULL; object = data_it.next())
922 object->Iterate(&v);
988 // updated as a side effect of promoting an object.
991 // for the addresses of promoted objects: every object promoted
1024 scavenge_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
1028 // Scavenge object reachable from the global contexts list directly.
1029 scavenge_visitor.VisitPointer(BitCast<Object**>(&global_contexts_list_));
1057 Object** p) {
1077 Object** start = &external_string_table_.new_space_strings_[0];
1078 Object** end = start + external_string_table_.new_space_strings_.length();
1079 Object** last = start;
1081 for (Object** p = start; p < end; ++p) {
1104 static Object* ProcessFunctionWeakReferences(Heap* heap,
1105 Object* function,
1107 Object* head = heap->undefined_value();
1109 Object* candidate = function;
1113 Object* retain = retainer->RetainAs(candidate);
1140 Object* head = undefined_value();
1142 Object* candidate = global_contexts_list_;
1146 Object* retain = retainer->RetainAs(candidate);
1163 Object* function_list_head =
1192 static inline void VisitPointer(Heap* heap, Object** p) {
1193 Object* object = *p;
1194 if (!heap->InNewSpace(object)) return;
1196 reinterpret_cast<HeapObject*>(object));
1210 HeapObject* object = HeapObject::FromAddress(new_space_front);
1211 new_space_front += NewSpaceScavenger::IterateBody(object->map(), object);
1220 // Promoted object might be already partially visited
1246 HeapObject* object);
1329 // Helper function used by CopyObject to copy a source object to an
1330 // allocated target object and update the forwarding pointer in the source
1331 // object. Returns the target object.
1367 HeapObject* object,
1371 ASSERT(object->Size() == object_size);
1374 if (heap->ShouldBePromoted(object->address(), object_size)) {
1388 Object* result = NULL; // Initialization to please compiler.
1391 *slot = MigrateObject(heap, object , target, object_size);
1401 Object* result =
1403 *slot = MigrateObject(heap, object, HeapObject::cast(result), object_size);
1410 HeapObject* object) {
1411 int object_size = FixedArray::BodyDescriptor::SizeOf(map, object);
1414 object,
1421 HeapObject* object) {
1422 int object_size = reinterpret_cast<ByteArray*>(object)->ByteArraySize();
1423 EvacuateObject<DATA_OBJECT, UNKNOWN_SIZE>(map, slot, object, object_size);
1429 HeapObject* object) {
1430 int object_size = SeqAsciiString::cast(object)->
1432 EvacuateObject<DATA_OBJECT, UNKNOWN_SIZE>(map, slot, object, object_size);
1438 HeapObject* object) {
1439 int object_size = SeqTwoByteString::cast(object)->
1441 EvacuateObject<DATA_OBJECT, UNKNOWN_SIZE>(map, slot, object, object_size);
1451 HeapObject* object) {
1454 if (ConsString::cast(object)->unchecked_second() ==
1457 HeapObject::cast(ConsString::cast(object)->unchecked_first());
1462 object->set_map_word(MapWord::FromForwardingAddress(first));
1471 object->set_map_word(MapWord::FromForwardingAddress(target));
1476 object->set_map_word(MapWord::FromForwardingAddress(*slot));
1481 EvacuateObject<POINTER_OBJECT, SMALL>(map, slot, object, object_size);
1490 HeapObject* object) {
1491 EvacuateObject<object_contents, SMALL>(map, slot, object, object_size);
1496 HeapObject* object) {
1498 EvacuateObject<object_contents, SMALL>(map, slot, object, object_size);
1549 void Heap::ScavengeObjectSlow(HeapObject** p, HeapObject* object) {
1550 ASSERT(HEAP->InFromSpace(object));
1551 MapWord first_word = object->map_word();
1554 DoScavengeObject(map, p, object);
1560 Object* result;
1581 Object* result;
1603 // If the map object is aligned fill the padding area with Smi 0 objects.
1614 Object* result;
1650 Object* obj;
1701 // Fix prototype object for existing maps.
1886 Object* result;
1906 Object* result;
1916 MaybeObject* Heap::AllocateJSGlobalPropertyCell(Object* value) {
1917 Object* result;
1928 Object* to_number,
1930 Object* result;
1939 Object* obj;
1949 Object* elements;
1993 Object* obj;
2022 Object* symbol;
2182 Object* obj;
2210 Object* Heap::GetNumberStringCache(Object* number) {
2218 Object* key = number_string_cache()->get(hash * 2);
2230 void Heap::SetNumberStringCache(Object* number, String* string) {
2244 MaybeObject* Heap::NumberToString(Object* number,
2248 Object* cached = GetNumberStringCache(number);
2265 Object* js_string;
2330 Object* result;
2340 MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) {
2341 Object* result;
2381 Object* script,
2382 Object* stack_trace,
2383 Object* stack_frames) {
2384 Object* result;
2424 Object* result;
2433 Object* result;
2495 Object* result;
2499 // Copy the characters into the new object.
2519 Object* result;
2523 // Copy the characters into the new object.
2531 Object* result;
2535 // Copy the characters into the new object.
2546 Object* result;
2582 Object* result;
2589 // Copy the characters into the new object.
2613 Object* result;
2642 Object* result;
2658 Object* value = single_character_string_cache()->get(code);
2663 Object* result;
2671 Object* result;
2689 Object* result;
2709 Object* result;
2739 Object* result;
2758 Handle<Object> self_reference,
2760 // Allocate ByteArray before the Code object, so that we do not risk
2761 // leaving uninitialized Code object (and breaking the heap).
2762 Object* reloc_info;
2773 // are allocated in large object space.
2780 Object* result;
2783 // Initialize the object
2795 // Allow self references to created code object by patching the handle to
2796 // point to the newly allocated Code object.
2801 // The generated code can contain Object** values (typically from handles)
2803 // objects. These pointers can include references to the code object itself,
2815 // Allocate an object the same size as the code object.
2824 Object* result;
2827 // Copy code object.
2841 // Allocate ByteArray before the Code object, so that we do not risk
2842 // leaving uninitialized Code object (and breaking the heap).
2843 Object* reloc_info_array;
2867 Object* result;
2870 // Copy code object.
2898 // space when new space is full and the object is not a large object.
2901 Object* result;
2916 Object* prototype) {
2931 // Allocate the prototype. Make sure to use the object function
2936 Object* prototype;
2942 Object* result;
2954 Object* prototype,
2958 Object* result;
2966 MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) {
2995 Object* result;
3012 // Set the callee property for non-strict mode arguments object only.
3018 // Check the state of the object
3043 // First create a new map with the size and number of in-object properties
3047 Object* map_obj;
3053 Object* prototype;
3068 // field descriptors for these to the initial map as the object
3079 Object* descriptors_obj;
3121 // TODO(1240798): Initialize the object's body using valid initial values
3122 // according to the object's initial map. For example, if the map's
3125 // fixed array (eg, Heap::empty_fixed_array()). Currently, the object
3128 Object* filler;
3135 // We might want to shrink the object later.
3161 Object* properties;
3170 Object* obj;
3188 Object* initial_map;
3195 // Allocate the object based on the constructors initial map.
3199 // Make sure result is NOT a global object if valid.
3200 Object* non_failure;
3217 // global objects. They will be unused once we normalize the object.
3222 // bootstrapping. The size differs between the JS global object ad the
3223 // builtins object.
3226 // Allocate a dictionary object for backing storage.
3227 Object* obj;
3235 // The global object might be created from an object template with accessors.
3243 Object* value = descs->GetCallbacksObject(i);
3248 Object* result;
3255 // Allocate the global object and initialize it with the backing store.
3262 // Create a new map for the global object.
3268 // Setup the global object as a normalized object.
3273 // Make sure result is a global object with properties in dictionary.
3288 Object* clone;
3291 // functions which may leave us with an object in old space.
3321 Object* elem;
3331 Object* prop;
3346 JSGlobalProxy* object) {
3350 // Check that the already allocated object has the same size and type as
3352 ASSERT(map->instance_size() == object->map()->instance_size());
3353 ASSERT(map->instance_type() == object->map()->instance_type());
3357 Object* properties;
3362 // Reset the map for the object.
3363 object->set_map(constructor->initial_map());
3365 // Reinitialize the object from the constructor map.
3366 InitializeJSObjectFromMap(object, FixedArray::cast(properties), map);
3367 return object;
3373 Object* result;
3379 // Copy the characters into the new object.
3403 Object* result;
3408 // Convert and copy the characters into the new object.
3429 Object* result;
3432 // Copy the characters into the new object, which may be either ASCII or
3491 // Compute map and object size.
3510 Object* result;
3546 // Allocate in large object space, retry space will be ignored.
3549 // Allocate in new space, retry in large object space.
3555 Object* result;
3560 // Partially initialize the object.
3581 // Allocate in large object space, retry space will be ignored.
3584 // Allocate in new space, retry in large object space.
3590 Object* result;
3595 // Partially initialize the object.
3606 Object* result;
3611 // Initialize the object.
3635 Object* obj;
3662 Object* result;
3705 Object* filler) {
3711 Object* result;
3744 Object* obj;
3756 Object* result;
3767 Object* result;
3782 Object* result;
3803 Object* result;
3836 Object* result;
3982 PrintF("Large object space : ");
4063 for (HeapObject* object = it.next(); object != NULL; object = it.next()) {
4064 if (object->IsFixedArray()) {
4065 Address slot_address = object->address();
4066 Address end = object->address() + object->Size();
4113 Object* symbol = NULL;
4114 Object* new_table;
4128 Object* symbol = NULL;
4129 Object* new_table;
4143 Object* symbol = NULL;
4144 Object* new_table;
4159 Object* symbol = NULL;
4160 Object* new_table;
4184 ASSERT(reinterpret_cast<Object*>(kFromSpaceZapValue)->IsFailure());
4202 Object** slot = reinterpret_cast<Object**>(slot_address);
4326 Object** slot = reinterpret_cast<Object**>(slot_address);
4462 v->VisitPointer(reinterpret_cast<Object**>(&roots_[kSymbolTableRootIndex]));
4476 v->VisitPointer(BitCast<Object**>(&hidden_symbol_));
4665 void VisitPointers(Object** start, Object** end) {
4667 for (Object** p = start; p < end; p++) {
4676 void MarkObjectRecursively(Object** p) {
4681 Object* map = obj->map();
4716 void VisitPointers(Object** start, Object** end) {
4718 for (Object** p = start; p < end; p++) {
4728 void UnmarkObjectRecursively(Object** p) {
4733 Object* map = obj->map();
4747 UnmarkObjectRecursively(reinterpret_cast<Object**>(&map_p));
4757 void MarkRootObjectRecursively(Object** root) {
4771 PrintF("==== Path to object ====\n");
4777 Object* obj = object_stack_[i];
4789 void VisitPointers(Object** start, Object** end) {
4791 for (Object** p = start; p < end; p++) {
4801 Object* search_target_;
4803 List<Object*> object_stack_;
4906 // The large object code space may contain code or data. We set the memory
4945 reinterpret_cast<Object*>(
4948 reinterpret_cast<Object*>(
5091 void VisitPointers(Object** start, Object** end) {
5092 for (Object** p = start; p < end; p++)
5242 virtual bool SkipObject(HeapObject* object) = 0;
5252 bool SkipObject(HeapObject* object) {
5253 if (object->IsMarked()) {
5254 object->ClearMark();
5291 bool SkipObject(HeapObject* object) {
5292 if (object->IsMarked()) {
5293 object->ClearMark();
5305 void VisitPointers(Object** start, Object** end) {
5306 for (Object** p = start; p < end; p++) {
5438 Object* const PathTracer::kAnyGlobalObject = reinterpret_cast<Object*>(NULL);
5443 void VisitPointers(Object** start, Object** end) {
5445 for (Object** p = start; !tracer_->found() && (p < end); p++) {
5459 void VisitPointers(Object** start, Object** end) {
5461 for (Object** p = start; p < end; p++) {
5472 void PathTracer::VisitPointers(Object** start, Object** end) {
5475 for (Object** p = start; !done && (p < end); p++) {
5490 void PathTracer::TracePathFrom(Object** root) {
5506 void PathTracer::MarkRecursively(Object** p, MarkVisitor* mark_visitor) {
5511 Object* map = obj->map();
5533 // Scan the object body.
5536 Object** start = reinterpret_cast<Object**>(obj->address() +
5538 Object** end = reinterpret_cast<Object**>(obj->address() +
5556 void PathTracer::UnmarkRecursively(Object** p, UnmarkVisitor* unmark_visitor) {
5561 Object* map = obj->map();
5575 UnmarkRecursively(reinterpret_cast<Object**>(&map_p), unmark_visitor);
5586 PrintF("==== Path to object ====\n");
5592 Object* obj = object_stack_[i];
5607 // and finds a path to a specific heap object and prints it.
5608 void Heap::TracePathToObject(Object* target) {
5615 // and finds a path to any global object and prints it. Useful for