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

Side by Side Diff: src/objects.h

Issue 11365174: A change in the way we place TransitionElementKinds in the tree. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Now have instruction writing, map check updating. Created 8 years 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 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 4678 matching lines...) Expand 10 before | Expand all | Expand 10 after
4689 4689
4690 // Code aging -- platform-specific 4690 // Code aging -- platform-specific
4691 byte* FindPlatformCodeAgeSequence(); 4691 byte* FindPlatformCodeAgeSequence();
4692 static void PatchPlatformCodeAge(byte* sequence, Age age, 4692 static void PatchPlatformCodeAge(byte* sequence, Age age,
4693 MarkingParity parity); 4693 MarkingParity parity);
4694 4694
4695 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 4695 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
4696 }; 4696 };
4697 4697
4698 4698
4699 Map* FindClosestElementsTransition(Map* map, ElementsKind to_kind);
4700
4701
4699 // All heap objects have a Map that describes their structure. 4702 // All heap objects have a Map that describes their structure.
4700 // A Map contains information about: 4703 // A Map contains information about:
4701 // - Size information about the object 4704 // - Size information about the object
4702 // - How to iterate over an object (for garbage collection) 4705 // - How to iterate over an object (for garbage collection)
4703 class Map: public HeapObject { 4706 class Map: public HeapObject {
4704 public: 4707 public:
4705 // Instance size. 4708 // Instance size.
4706 // Size in bytes or kVariableSizeSentinel if instances do not have 4709 // Size in bytes or kVariableSizeSentinel if instances do not have
4707 // a fixed size. 4710 // a fixed size.
4708 inline int instance_size(); 4711 inline int instance_size();
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4867 inline bool HasTransitionArray(); 4870 inline bool HasTransitionArray();
4868 inline bool HasElementsTransition(); 4871 inline bool HasElementsTransition();
4869 inline Map* elements_transition_map(); 4872 inline Map* elements_transition_map();
4870 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map( 4873 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map(
4871 Map* transitioned_map); 4874 Map* transitioned_map);
4872 inline void SetTransition(int transition_index, Map* target); 4875 inline void SetTransition(int transition_index, Map* target);
4873 inline Map* GetTransition(int transition_index); 4876 inline Map* GetTransition(int transition_index);
4874 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, 4877 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key,
4875 Map* target, 4878 Map* target,
4876 SimpleTransitionFlag flag); 4879 SimpleTransitionFlag flag);
4880 MaybeObject* AddMissingElementsTransitions(ElementsKind to_kind);
4877 DECL_ACCESSORS(transitions, TransitionArray) 4881 DECL_ACCESSORS(transitions, TransitionArray)
4878 inline void ClearTransitions(Heap* heap, 4882 inline void ClearTransitions(Heap* heap,
4879 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 4883 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
4880 4884
4881 // Tells whether the map is attached to SharedFunctionInfo 4885 // Tells whether the map is attached to SharedFunctionInfo
4882 // (for inobject slack tracking). 4886 // (for inobject slack tracking).
4883 inline void set_attached_to_shared_function_info(bool value); 4887 inline void set_attached_to_shared_function_info(bool value);
4884 4888
4885 inline bool attached_to_shared_function_info(); 4889 inline bool attached_to_shared_function_info();
4886 4890
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
5108 // Returns the map that this map transitions to if its elements_kind 5112 // Returns the map that this map transitions to if its elements_kind
5109 // is changed to |elements_kind|, or NULL if no such map is cached yet. 5113 // is changed to |elements_kind|, or NULL if no such map is cached yet.
5110 // |safe_to_add_transitions| is set to false if adding transitions is not 5114 // |safe_to_add_transitions| is set to false if adding transitions is not
5111 // allowed. 5115 // allowed.
5112 Map* LookupElementsTransitionMap(ElementsKind elements_kind); 5116 Map* LookupElementsTransitionMap(ElementsKind elements_kind);
5113 5117
5114 // Returns the transitioned map for this map with the most generic 5118 // Returns the transitioned map for this map with the most generic
5115 // elements_kind that's found in |candidates|, or null handle if no match is 5119 // elements_kind that's found in |candidates|, or null handle if no match is
5116 // found at all. 5120 // found at all.
5117 Handle<Map> FindTransitionedMap(MapHandleList* candidates); 5121 Handle<Map> FindTransitionedMap(MapHandleList* candidates);
5118 Map* FindTransitionedMap(MapList* candidates);
5119 5122
5120 // Zaps the contents of backing data structures. Note that the 5123 // Zaps the contents of backing data structures. Note that the
5121 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects 5124 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects
5122 // holding weak references when incremental marking is used, because it also 5125 // holding weak references when incremental marking is used, because it also
5123 // iterates over objects that are otherwise unreachable. 5126 // iterates over objects that are otherwise unreachable.
5124 // In general we only want to call these functions in release mode when 5127 // In general we only want to call these functions in release mode when
5125 // heap verification is turned on. 5128 // heap verification is turned on.
5126 void ZapPrototypeTransitions(); 5129 void ZapPrototypeTransitions();
5127 void ZapTransitions(); 5130 void ZapTransitions();
5128 5131
(...skipping 3880 matching lines...) Expand 10 before | Expand all | Expand 10 after
9009 } else { 9012 } else {
9010 value &= ~(1 << bit_position); 9013 value &= ~(1 << bit_position);
9011 } 9014 }
9012 return value; 9015 return value;
9013 } 9016 }
9014 }; 9017 };
9015 9018
9016 } } // namespace v8::internal 9019 } } // namespace v8::internal
9017 9020
9018 #endif // V8_OBJECTS_H_ 9021 #endif // V8_OBJECTS_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698