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

Side by Side Diff: src/objects.cc

Issue 2895008: Virtually dispatched specialized scavengers. (Closed)
Patch Set: Created 10 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
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 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 if (obj->IsFailure()) return obj; 2183 if (obj->IsFailure()) return obj;
2184 Map* new_map = Map::cast(obj); 2184 Map* new_map = Map::cast(obj);
2185 2185
2186 // Clear inobject properties if needed by adjusting the instance size and 2186 // Clear inobject properties if needed by adjusting the instance size and
2187 // putting in a filler object instead of the inobject properties. 2187 // putting in a filler object instead of the inobject properties.
2188 if (mode == CLEAR_INOBJECT_PROPERTIES && map()->inobject_properties() > 0) { 2188 if (mode == CLEAR_INOBJECT_PROPERTIES && map()->inobject_properties() > 0) {
2189 int instance_size_delta = map()->inobject_properties() * kPointerSize; 2189 int instance_size_delta = map()->inobject_properties() * kPointerSize;
2190 int new_instance_size = map()->instance_size() - instance_size_delta; 2190 int new_instance_size = map()->instance_size() - instance_size_delta;
2191 new_map->set_inobject_properties(0); 2191 new_map->set_inobject_properties(0);
2192 new_map->set_instance_size(new_instance_size); 2192 new_map->set_instance_size(new_instance_size);
2193 new_map->set_scavenger(Heap::GetScavenger(new_map->instance_type(),
2194 new_map->instance_size()));
2193 Heap::CreateFillerObjectAt(this->address() + new_instance_size, 2195 Heap::CreateFillerObjectAt(this->address() + new_instance_size,
2194 instance_size_delta); 2196 instance_size_delta);
2195 } 2197 }
2196 new_map->set_unused_property_fields(0); 2198 new_map->set_unused_property_fields(0);
2197 2199
2198 // We have now successfully allocated all the necessary objects. 2200 // We have now successfully allocated all the necessary objects.
2199 // Changes can now be made with the guarantee that all of them take effect. 2201 // Changes can now be made with the guarantee that all of them take effect.
2200 set_map(new_map); 2202 set_map(new_map);
2201 map()->set_instance_descriptors(Heap::empty_descriptor_array()); 2203 map()->set_instance_descriptors(Heap::empty_descriptor_array());
2202 2204
(...skipping 6566 matching lines...) Expand 10 before | Expand all | Expand 10 after
8769 if (break_point_objects()->IsUndefined()) return 0; 8771 if (break_point_objects()->IsUndefined()) return 0;
8770 // Single beak point. 8772 // Single beak point.
8771 if (!break_point_objects()->IsFixedArray()) return 1; 8773 if (!break_point_objects()->IsFixedArray()) return 1;
8772 // Multiple break points. 8774 // Multiple break points.
8773 return FixedArray::cast(break_point_objects())->length(); 8775 return FixedArray::cast(break_point_objects())->length();
8774 } 8776 }
8775 #endif 8777 #endif
8776 8778
8777 8779
8778 } } // namespace v8::internal 8780 } } // namespace v8::internal
OLDNEW
« src/heap.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