| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 25 matching lines...) Expand all Loading... |
| 36 #include "x64/frames-x64.h" | 36 #include "x64/frames-x64.h" |
| 37 #elif V8_TARGET_ARCH_ARM | 37 #elif V8_TARGET_ARCH_ARM |
| 38 #include "arm/frames-arm.h" | 38 #include "arm/frames-arm.h" |
| 39 #endif | 39 #endif |
| 40 | 40 |
| 41 namespace v8 { | 41 namespace v8 { |
| 42 namespace internal { | 42 namespace internal { |
| 43 | 43 |
| 44 | 44 |
| 45 inline Address StackHandler::address() const { | 45 inline Address StackHandler::address() const { |
| 46 // NOTE: There's an obvious problem with the address of the NULL | 46 return reinterpret_cast<Address>(const_cast<StackHandler*>(this)); |
| 47 // stack handler. Right now, it benefits us that the subtraction | |
| 48 // leads to a very high address (above everything else on the | |
| 49 // stack), but maybe we should stop relying on it? | |
| 50 const int displacement = StackHandlerConstants::kAddressDisplacement; | |
| 51 Address address = reinterpret_cast<Address>(const_cast<StackHandler*>(this)); | |
| 52 return address + displacement; | |
| 53 } | 47 } |
| 54 | 48 |
| 55 | 49 |
| 56 inline StackHandler* StackHandler::next() const { | 50 inline StackHandler* StackHandler::next() const { |
| 57 const int offset = StackHandlerConstants::kNextOffset; | 51 const int offset = StackHandlerConstants::kNextOffset; |
| 58 return FromAddress(Memory::Address_at(address() + offset)); | 52 return FromAddress(Memory::Address_at(address() + offset)); |
| 59 } | 53 } |
| 60 | 54 |
| 61 | 55 |
| 62 inline bool StackHandler::includes(Address address) const { | 56 inline bool StackHandler::includes(Address address) const { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 template<typename Iterator> | 208 template<typename Iterator> |
| 215 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { | 209 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { |
| 216 iterator_.Reset(); | 210 iterator_.Reset(); |
| 217 if (!done()) Advance(); | 211 if (!done()) Advance(); |
| 218 } | 212 } |
| 219 | 213 |
| 220 | 214 |
| 221 } } // namespace v8::internal | 215 } } // namespace v8::internal |
| 222 | 216 |
| 223 #endif // V8_FRAMES_INL_H_ | 217 #endif // V8_FRAMES_INL_H_ |
| OLD | NEW |