OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // DOM events handlers are reported as OTHER / EXTERNAL entries. | 123 // DOM events handlers are reported as OTHER / EXTERNAL entries. |
124 // To avoid confusing people, let's put all these entries into | 124 // To avoid confusing people, let's put all these entries into |
125 // one bucket. | 125 // one bucket. |
126 case OTHER: | 126 case OTHER: |
127 case EXTERNAL: | 127 case EXTERNAL: |
128 return program_entry_; | 128 return program_entry_; |
129 default: return NULL; | 129 default: return NULL; |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 | |
134 template<class Visitor> | |
135 void HeapEntriesMap::Apply(Visitor* visitor) { | |
136 for (HashMap::Entry* p = entries_.Start(); | |
137 p != NULL; | |
138 p = entries_.Next(p)) { | |
139 if (!IsAlias(p->value)) | |
140 visitor->Apply(reinterpret_cast<HeapEntry*>(p->value)); | |
141 } | |
142 } | |
143 | |
144 } } // namespace v8::internal | 133 } } // namespace v8::internal |
145 | 134 |
146 #endif // ENABLE_LOGGING_AND_PROFILING | 135 #endif // ENABLE_LOGGING_AND_PROFILING |
147 | 136 |
148 #endif // V8_PROFILE_GENERATOR_INL_H_ | 137 #endif // V8_PROFILE_GENERATOR_INL_H_ |
OLD | NEW |