OLD | NEW |
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 290 |
291 virtual void Iterate(ObjectVisitor* v) const = 0; | 291 virtual void Iterate(ObjectVisitor* v) const = 0; |
292 static void IteratePc(ObjectVisitor* v, Address* pc_address, Code* holder); | 292 static void IteratePc(ObjectVisitor* v, Address* pc_address, Code* holder); |
293 | 293 |
294 // Sets a callback function for return-address rewriting profilers | 294 // Sets a callback function for return-address rewriting profilers |
295 // to resolve the location of a return address to the location of the | 295 // to resolve the location of a return address to the location of the |
296 // profiler's stashed return address. | 296 // profiler's stashed return address. |
297 static void SetReturnAddressLocationResolver( | 297 static void SetReturnAddressLocationResolver( |
298 ReturnAddressLocationResolver resolver); | 298 ReturnAddressLocationResolver resolver); |
299 | 299 |
300 // Resolves pc_address through the resolution address function if one is set. | |
301 static inline Address* ResolveReturnAddressLocation(Address* pc_address); | |
302 | |
303 | |
304 // Printing support. | 300 // Printing support. |
305 enum PrintMode { OVERVIEW, DETAILS }; | 301 enum PrintMode { OVERVIEW, DETAILS }; |
306 virtual void Print(StringStream* accumulator, | 302 virtual void Print(StringStream* accumulator, |
307 PrintMode mode, | 303 PrintMode mode, |
308 int index) const { } | 304 int index) const { } |
309 | 305 |
310 Isolate* isolate() const { return isolate_; } | 306 Isolate* isolate() const { return isolate_; } |
311 | 307 |
312 protected: | 308 protected: |
313 inline explicit StackFrame(StackFrameIteratorBase* iterator); | 309 inline explicit StackFrame(StackFrameIteratorBase* iterator); |
(...skipping 15 matching lines...) Expand all Loading... |
329 | 325 |
330 #ifdef DEBUG | 326 #ifdef DEBUG |
331 bool can_access_heap_objects() const; | 327 bool can_access_heap_objects() const; |
332 #endif | 328 #endif |
333 | 329 |
334 private: | 330 private: |
335 const StackFrameIteratorBase* iterator_; | 331 const StackFrameIteratorBase* iterator_; |
336 Isolate* isolate_; | 332 Isolate* isolate_; |
337 State state_; | 333 State state_; |
338 | 334 |
339 static ReturnAddressLocationResolver return_address_location_resolver_; | |
340 | |
341 // Fill in the state of the calling frame. | 335 // Fill in the state of the calling frame. |
342 virtual void ComputeCallerState(State* state) const = 0; | 336 virtual void ComputeCallerState(State* state) const = 0; |
343 | 337 |
344 // Get the type and the state of the calling frame. | 338 // Get the type and the state of the calling frame. |
345 virtual Type GetCallerState(State* state) const; | 339 virtual Type GetCallerState(State* state) const; |
346 | 340 |
347 static const intptr_t kIsolateTag = 1; | 341 static const intptr_t kIsolateTag = 1; |
348 | 342 |
349 friend class StackFrameIterator; | 343 friend class StackFrameIterator; |
350 friend class StackFrameIteratorBase; | 344 friend class StackFrameIteratorBase; |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 }; | 909 }; |
916 | 910 |
917 | 911 |
918 // Reads all frames on the current stack and copies them into the current | 912 // Reads all frames on the current stack and copies them into the current |
919 // zone memory. | 913 // zone memory. |
920 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 914 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
921 | 915 |
922 } } // namespace v8::internal | 916 } } // namespace v8::internal |
923 | 917 |
924 #endif // V8_FRAMES_H_ | 918 #endif // V8_FRAMES_H_ |
OLD | NEW |