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

Side by Side Diff: src/objects.cc

Issue 149324: * Move almost all roots into an array ready for use by a constant-pool... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 months 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 4586 matching lines...) Expand 10 before | Expand all | Expand 10 after
4597 } 4597 }
4598 } 4598 }
4599 } 4599 }
4600 4600
4601 4601
4602 void Map::ClearNonLiveTransitions(Object* real_prototype) { 4602 void Map::ClearNonLiveTransitions(Object* real_prototype) {
4603 // Live DescriptorArray objects will be marked, so we must use 4603 // Live DescriptorArray objects will be marked, so we must use
4604 // low-level accessors to get and modify their data. 4604 // low-level accessors to get and modify their data.
4605 DescriptorArray* d = reinterpret_cast<DescriptorArray*>( 4605 DescriptorArray* d = reinterpret_cast<DescriptorArray*>(
4606 *RawField(this, Map::kInstanceDescriptorsOffset)); 4606 *RawField(this, Map::kInstanceDescriptorsOffset));
4607 if (d == Heap::empty_descriptor_array()) return; 4607 if (d == Heap::raw_unchecked_empty_descriptor_array()) return;
4608 Smi* NullDescriptorDetails = 4608 Smi* NullDescriptorDetails =
4609 PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi(); 4609 PropertyDetails(NONE, NULL_DESCRIPTOR).AsSmi();
4610 FixedArray* contents = reinterpret_cast<FixedArray*>( 4610 FixedArray* contents = reinterpret_cast<FixedArray*>(
4611 d->get(DescriptorArray::kContentArrayIndex)); 4611 d->get(DescriptorArray::kContentArrayIndex));
4612 ASSERT(contents->length() >= 2); 4612 ASSERT(contents->length() >= 2);
4613 for (int i = 0; i < contents->length(); i += 2) { 4613 for (int i = 0; i < contents->length(); i += 2) {
4614 // If the pair (value, details) is a map transition, 4614 // If the pair (value, details) is a map transition,
4615 // check if the target is live. If not, null the descriptor. 4615 // check if the target is live. If not, null the descriptor.
4616 // Also drop the back pointer for that map transition, so that this 4616 // Also drop the back pointer for that map transition, so that this
4617 // map is not reached again by following a back pointer from a 4617 // map is not reached again by following a back pointer from a
(...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after
7682 if (break_point_objects()->IsUndefined()) return 0; 7682 if (break_point_objects()->IsUndefined()) return 0;
7683 // Single beak point. 7683 // Single beak point.
7684 if (!break_point_objects()->IsFixedArray()) return 1; 7684 if (!break_point_objects()->IsFixedArray()) return 1;
7685 // Multiple break points. 7685 // Multiple break points.
7686 return FixedArray::cast(break_point_objects())->length(); 7686 return FixedArray::cast(break_point_objects())->length();
7687 } 7687 }
7688 #endif 7688 #endif
7689 7689
7690 7690
7691 } } // namespace v8::internal 7691 } } // namespace v8::internal
OLDNEW
« src/mark-compact.cc ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698