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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 | 67 |
68 const char* GetCopy(const char* src); | 68 const char* GetCopy(const char* src); |
69 const char* GetFormatted(const char* format, ...); | 69 const char* GetFormatted(const char* format, ...); |
70 const char* GetVFormatted(const char* format, va_list args); | 70 const char* GetVFormatted(const char* format, va_list args); |
71 const char* GetName(String* name); | 71 const char* GetName(String* name); |
72 const char* GetName(int index); | 72 const char* GetName(int index); |
73 inline const char* GetFunctionName(String* name); | 73 inline const char* GetFunctionName(String* name); |
74 inline const char* GetFunctionName(const char* name); | 74 inline const char* GetFunctionName(const char* name); |
75 | 75 |
76 private: | 76 private: |
77 static const uint32_t kMaxNameSize; | |
mnaganov (inactive)
2011/11/09 11:45:23
Static consts are preferred to be initialized in t
| |
78 | |
77 INLINE(static bool StringsMatch(void* key1, void* key2)) { | 79 INLINE(static bool StringsMatch(void* key1, void* key2)) { |
78 return strcmp(reinterpret_cast<char*>(key1), | 80 return strcmp(reinterpret_cast<char*>(key1), |
79 reinterpret_cast<char*>(key2)) == 0; | 81 reinterpret_cast<char*>(key2)) == 0; |
80 } | 82 } |
81 const char* AddOrDisposeString(char* str, uint32_t hash); | 83 const char* AddOrDisposeString(char* str, uint32_t hash); |
82 | 84 |
83 // Mapping of strings by String::Hash to const char* strings. | 85 // Mapping of strings by String::Hash to const char* strings. |
84 HashMap names_; | 86 HashMap names_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(StringsStorage); | 88 DISALLOW_COPY_AND_ASSIGN(StringsStorage); |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1126 | 1128 |
1127 friend class HeapSnapshotJSONSerializerEnumerator; | 1129 friend class HeapSnapshotJSONSerializerEnumerator; |
1128 friend class HeapSnapshotJSONSerializerIterator; | 1130 friend class HeapSnapshotJSONSerializerIterator; |
1129 | 1131 |
1130 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1132 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1131 }; | 1133 }; |
1132 | 1134 |
1133 } } // namespace v8::internal | 1135 } } // namespace v8::internal |
1134 | 1136 |
1135 #endif // V8_PROFILE_GENERATOR_H_ | 1137 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |