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

Side by Side Diff: src/mark-compact.cc

Issue 8506004: Made PropertyType handling even more explicit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 // If the pair (value, details) at index i, i+1 is not 1628 // If the pair (value, details) at index i, i+1 is not
1629 // a transition or null descriptor, mark the value. 1629 // a transition or null descriptor, mark the value.
1630 PropertyDetails details(Smi::cast(contents->get(i + 1))); 1630 PropertyDetails details(Smi::cast(contents->get(i + 1)));
1631 1631
1632 Object** slot = contents->data_start() + i; 1632 Object** slot = contents->data_start() + i;
1633 Object* value = *slot; 1633 Object* value = *slot;
1634 if (!value->IsHeapObject()) continue; 1634 if (!value->IsHeapObject()) continue;
1635 1635
1636 RecordSlot(slot, slot, *slot); 1636 RecordSlot(slot, slot, *slot);
1637 1637
1638 PropertyType type = details.type(); 1638 if (details.IsProperty()) {
1639 if (type < FIRST_PHANTOM_PROPERTY_TYPE) {
1640 HeapObject* object = HeapObject::cast(value); 1639 HeapObject* object = HeapObject::cast(value);
1641 MarkBit mark = Marking::MarkBitFrom(HeapObject::cast(object)); 1640 MarkBit mark = Marking::MarkBitFrom(HeapObject::cast(object));
1642 if (!mark.Get()) { 1641 if (!mark.Get()) {
1643 SetMark(HeapObject::cast(object), mark); 1642 SetMark(HeapObject::cast(object), mark);
1644 marking_deque_.PushBlack(object); 1643 marking_deque_.PushBlack(object);
1645 } 1644 }
1646 } else if (type == ELEMENTS_TRANSITION && value->IsFixedArray()) { 1645 } else if (details.type() == ELEMENTS_TRANSITION && value->IsFixedArray()) {
1647 // For maps with multiple elements transitions, the transition maps are 1646 // For maps with multiple elements transitions, the transition maps are
1648 // stored in a FixedArray. Keep the fixed array alive but not the maps 1647 // stored in a FixedArray. Keep the fixed array alive but not the maps
1649 // that it refers to. 1648 // that it refers to.
1650 HeapObject* object = HeapObject::cast(value); 1649 HeapObject* object = HeapObject::cast(value);
1651 MarkBit mark = Marking::MarkBitFrom(HeapObject::cast(object)); 1650 MarkBit mark = Marking::MarkBitFrom(HeapObject::cast(object));
1652 if (!mark.Get()) { 1651 if (!mark.Get()) {
1653 SetMark(HeapObject::cast(object), mark); 1652 SetMark(HeapObject::cast(object), mark);
1654 } 1653 }
1655 } 1654 }
1656 } 1655 }
(...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
3774 while (buffer != NULL) { 3773 while (buffer != NULL) {
3775 SlotsBuffer* next_buffer = buffer->next(); 3774 SlotsBuffer* next_buffer = buffer->next();
3776 DeallocateBuffer(buffer); 3775 DeallocateBuffer(buffer);
3777 buffer = next_buffer; 3776 buffer = next_buffer;
3778 } 3777 }
3779 *buffer_address = NULL; 3778 *buffer_address = NULL;
3780 } 3779 }
3781 3780
3782 3781
3783 } } // namespace v8::internal 3782 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects-inl.h » ('j') | src/profile-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698