OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 7844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7855 | 7855 |
7856 private: | 7856 private: |
7857 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); | 7857 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); |
7858 }; | 7858 }; |
7859 #endif // ENABLE_DEBUGGER_SUPPORT | 7859 #endif // ENABLE_DEBUGGER_SUPPORT |
7860 | 7860 |
7861 | 7861 |
7862 #undef DECL_BOOLEAN_ACCESSORS | 7862 #undef DECL_BOOLEAN_ACCESSORS |
7863 #undef DECL_ACCESSORS | 7863 #undef DECL_ACCESSORS |
7864 | 7864 |
| 7865 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ |
| 7866 V(kSymbolTable, "symbol_table", "(Symbols)") \ |
| 7867 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ |
| 7868 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ |
| 7869 V(kSymbol, "symbol", "(Symbol)") \ |
| 7870 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \ |
| 7871 V(kTop, "top", "(Isolate)") \ |
| 7872 V(kRelocatable, "relocatable", "(Relocatable)") \ |
| 7873 V(kDebug, "debug", "(Debugger)") \ |
| 7874 V(kCompilationCache, "compilationcache", "(Compilation cache)") \ |
| 7875 V(kHandleScope, "handlescope", "(Handle scope)") \ |
| 7876 V(kBuiltins, "builtins", "(Builtins)") \ |
| 7877 V(kGlobalHandles, "globalhandles", "(Global handles)") \ |
| 7878 V(kThreadManager, "threadmanager", "(Thread manager)") \ |
| 7879 V(kExtensions, "Extensions", "(Extensions)") |
| 7880 |
| 7881 class VisitorSynchronization : public AllStatic { |
| 7882 public: |
| 7883 #define DECLARE_ENUM(enum_item, ignore1, ignore2) enum_item, |
| 7884 enum SyncTag { |
| 7885 VISITOR_SYNCHRONIZATION_TAGS_LIST(DECLARE_ENUM) |
| 7886 kNumberOfSyncTags |
| 7887 }; |
| 7888 #undef DECLARE_ENUM |
| 7889 |
| 7890 static const char* const kTags[kNumberOfSyncTags]; |
| 7891 static const char* const kTagNames[kNumberOfSyncTags]; |
| 7892 }; |
7865 | 7893 |
7866 // Abstract base class for visiting, and optionally modifying, the | 7894 // Abstract base class for visiting, and optionally modifying, the |
7867 // pointers contained in Objects. Used in GC and serialization/deserialization. | 7895 // pointers contained in Objects. Used in GC and serialization/deserialization. |
7868 class ObjectVisitor BASE_EMBEDDED { | 7896 class ObjectVisitor BASE_EMBEDDED { |
7869 public: | 7897 public: |
7870 virtual ~ObjectVisitor() {} | 7898 virtual ~ObjectVisitor() {} |
7871 | 7899 |
7872 // Visits a contiguous arrays of pointers in the half-open range | 7900 // Visits a contiguous arrays of pointers in the half-open range |
7873 // [start, end). Any or all of the values may be modified on return. | 7901 // [start, end). Any or all of the values may be modified on return. |
7874 virtual void VisitPointers(Object** start, Object** end) = 0; | 7902 virtual void VisitPointers(Object** start, Object** end) = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7910 | 7938 |
7911 virtual void VisitExternalReference(RelocInfo* rinfo); | 7939 virtual void VisitExternalReference(RelocInfo* rinfo); |
7912 | 7940 |
7913 inline void VisitExternalReference(Address* p) { | 7941 inline void VisitExternalReference(Address* p) { |
7914 VisitExternalReferences(p, p + 1); | 7942 VisitExternalReferences(p, p + 1); |
7915 } | 7943 } |
7916 | 7944 |
7917 // Visits a handle that has an embedder-assigned class ID. | 7945 // Visits a handle that has an embedder-assigned class ID. |
7918 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {} | 7946 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {} |
7919 | 7947 |
7920 #ifdef DEBUG | |
7921 // Intended for serialization/deserialization checking: insert, or | 7948 // Intended for serialization/deserialization checking: insert, or |
7922 // check for the presence of, a tag at this position in the stream. | 7949 // check for the presence of, a tag at this position in the stream. |
7923 virtual void Synchronize(const char* tag) {} | 7950 // Also used for marking up GC roots in heap snapshots. |
7924 #else | 7951 virtual void Synchronize(VisitorSynchronization::SyncTag tag) {} |
7925 inline void Synchronize(const char* tag) {} | |
7926 #endif | |
7927 }; | 7952 }; |
7928 | 7953 |
7929 | 7954 |
7930 class StructBodyDescriptor : public | 7955 class StructBodyDescriptor : public |
7931 FlexibleBodyDescriptor<HeapObject::kHeaderSize> { | 7956 FlexibleBodyDescriptor<HeapObject::kHeaderSize> { |
7932 public: | 7957 public: |
7933 static inline int SizeOf(Map* map, HeapObject* object) { | 7958 static inline int SizeOf(Map* map, HeapObject* object) { |
7934 return map->instance_size(); | 7959 return map->instance_size(); |
7935 } | 7960 } |
7936 }; | 7961 }; |
(...skipping 21 matching lines...) Expand all Loading... |
7958 } else { | 7983 } else { |
7959 value &= ~(1 << bit_position); | 7984 value &= ~(1 << bit_position); |
7960 } | 7985 } |
7961 return value; | 7986 return value; |
7962 } | 7987 } |
7963 }; | 7988 }; |
7964 | 7989 |
7965 } } // namespace v8::internal | 7990 } } // namespace v8::internal |
7966 | 7991 |
7967 #endif // V8_OBJECTS_H_ | 7992 #endif // V8_OBJECTS_H_ |
OLD | NEW |