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.h

Issue 227133007: Allow race-full access of map instance size when sweeping concurrently. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | src/objects.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5968 matching lines...) Expand 10 before | Expand all | Expand 10 after
5979 // - Size information about the object 5979 // - Size information about the object
5980 // - How to iterate over an object (for garbage collection) 5980 // - How to iterate over an object (for garbage collection)
5981 class Map: public HeapObject { 5981 class Map: public HeapObject {
5982 public: 5982 public:
5983 // Instance size. 5983 // Instance size.
5984 // Size in bytes or kVariableSizeSentinel if instances do not have 5984 // Size in bytes or kVariableSizeSentinel if instances do not have
5985 // a fixed size. 5985 // a fixed size.
5986 inline int instance_size(); 5986 inline int instance_size();
5987 inline void set_instance_size(int value); 5987 inline void set_instance_size(int value);
5988 5988
5989 // Get the instance size of a map using no barrier semantics.
5990 inline int nobarrier_instance_size();
5991
5989 // Count of properties allocated in the object. 5992 // Count of properties allocated in the object.
5990 inline int inobject_properties(); 5993 inline int inobject_properties();
5991 inline void set_inobject_properties(int value); 5994 inline void set_inobject_properties(int value);
5992 5995
5993 // Count of property fields pre-allocated in the object when first allocated. 5996 // Count of property fields pre-allocated in the object when first allocated.
5994 inline int pre_allocated_property_fields(); 5997 inline int pre_allocated_property_fields();
5995 inline void set_pre_allocated_property_fields(int value); 5998 inline void set_pre_allocated_property_fields(int value);
5996 5999
5997 // Instance type. 6000 // Instance type.
5998 inline InstanceType instance_type(); 6001 inline InstanceType instance_type();
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
6561 void VerifyOmittedMapChecks(); 6564 void VerifyOmittedMapChecks();
6562 #endif 6565 #endif
6563 6566
6564 inline int visitor_id(); 6567 inline int visitor_id();
6565 inline void set_visitor_id(int visitor_id); 6568 inline void set_visitor_id(int visitor_id);
6566 6569
6567 typedef void (*TraverseCallback)(Map* map, void* data); 6570 typedef void (*TraverseCallback)(Map* map, void* data);
6568 6571
6569 void TraverseTransitionTree(TraverseCallback callback, void* data); 6572 void TraverseTransitionTree(TraverseCallback callback, void* data);
6570 6573
6574 inline void Shrink(int slack);
6575
6571 // When you set the prototype of an object using the __proto__ accessor you 6576 // When you set the prototype of an object using the __proto__ accessor you
6572 // need a new map for the object (the prototype is stored in the map). In 6577 // need a new map for the object (the prototype is stored in the map). In
6573 // order not to multiply maps unnecessarily we store these as transitions in 6578 // order not to multiply maps unnecessarily we store these as transitions in
6574 // the original map. That way we can transition to the same map if the same 6579 // the original map. That way we can transition to the same map if the same
6575 // prototype is set, rather than creating a new map every time. The 6580 // prototype is set, rather than creating a new map every time. The
6576 // transitions are in the form of a map where the keys are prototype objects 6581 // transitions are in the form of a map where the keys are prototype objects
6577 // and the values are the maps the are transitioned to. 6582 // and the values are the maps the are transitioned to.
6578 static const int kMaxCachedPrototypeTransitions = 256; 6583 static const int kMaxCachedPrototypeTransitions = 256;
6579 static Handle<Map> GetPrototypeTransition(Handle<Map> map, 6584 static Handle<Map> GetPrototypeTransition(Handle<Map> map,
6580 Handle<Object> prototype); 6585 Handle<Object> prototype);
(...skipping 4405 matching lines...) Expand 10 before | Expand all | Expand 10 after
10986 } else { 10991 } else {
10987 value &= ~(1 << bit_position); 10992 value &= ~(1 << bit_position);
10988 } 10993 }
10989 return value; 10994 return value;
10990 } 10995 }
10991 }; 10996 };
10992 10997
10993 } } // namespace v8::internal 10998 } } // namespace v8::internal
10994 10999
10995 #endif // V8_OBJECTS_H_ 11000 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698