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

Side by Side Diff: src/objects.cc

Issue 177018: Don't use the same descriptor array in several maps (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2911 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 Map::cast(result)->set_instance_descriptors(Heap::empty_descriptor_array()); 2922 Map::cast(result)->set_instance_descriptors(Heap::empty_descriptor_array());
2923 // Please note instance_type and instance_size are set when allocated. 2923 // Please note instance_type and instance_size are set when allocated.
2924 Map::cast(result)->set_inobject_properties(inobject_properties()); 2924 Map::cast(result)->set_inobject_properties(inobject_properties());
2925 Map::cast(result)->set_unused_property_fields(unused_property_fields()); 2925 Map::cast(result)->set_unused_property_fields(unused_property_fields());
2926 2926
2927 // If the map has pre-allocated properties always start out with a descriptor 2927 // If the map has pre-allocated properties always start out with a descriptor
2928 // array describing these properties. 2928 // array describing these properties.
2929 if (pre_allocated_property_fields() > 0) { 2929 if (pre_allocated_property_fields() > 0) {
2930 ASSERT(constructor()->IsJSFunction()); 2930 ASSERT(constructor()->IsJSFunction());
2931 JSFunction* ctor = JSFunction::cast(constructor()); 2931 JSFunction* ctor = JSFunction::cast(constructor());
2932 Object* descriptors =
William Hesse 2009/08/28 11:07:19 This entire test should be removed from CopyDropDe
2933 ctor->initial_map()->instance_descriptors()->RemoveTransitions();
2934 if (descriptors->IsFailure()) return descriptors;
2932 Map::cast(result)->set_instance_descriptors( 2935 Map::cast(result)->set_instance_descriptors(
2933 ctor->initial_map()->instance_descriptors()); 2936 DescriptorArray::cast(descriptors));
2934 Map::cast(result)->set_pre_allocated_property_fields( 2937 Map::cast(result)->set_pre_allocated_property_fields(
2935 pre_allocated_property_fields()); 2938 pre_allocated_property_fields());
2936 } 2939 }
2937 Map::cast(result)->set_bit_field(bit_field()); 2940 Map::cast(result)->set_bit_field(bit_field());
2938 Map::cast(result)->set_bit_field2(bit_field2()); 2941 Map::cast(result)->set_bit_field2(bit_field2());
2939 Map::cast(result)->ClearCodeCache(); 2942 Map::cast(result)->ClearCodeCache();
2940 return result; 2943 return result;
2941 } 2944 }
2942 2945
2943 2946
(...skipping 5052 matching lines...) Expand 10 before | Expand all | Expand 10 after
7996 if (break_point_objects()->IsUndefined()) return 0; 7999 if (break_point_objects()->IsUndefined()) return 0;
7997 // Single beak point. 8000 // Single beak point.
7998 if (!break_point_objects()->IsFixedArray()) return 1; 8001 if (!break_point_objects()->IsFixedArray()) return 1;
7999 // Multiple break points. 8002 // Multiple break points.
8000 return FixedArray::cast(break_point_objects())->length(); 8003 return FixedArray::cast(break_point_objects())->length();
8001 } 8004 }
8002 #endif 8005 #endif
8003 8006
8004 8007
8005 } } // namespace v8::internal 8008 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698