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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 inline bool StackHandler::includes(Address address) const { | 62 inline bool StackHandler::includes(Address address) const { |
63 Address start = this->address(); | 63 Address start = this->address(); |
64 Address end = start + StackHandlerConstants::kSize; | 64 Address end = start + StackHandlerConstants::kSize; |
65 return start <= address && address <= end; | 65 return start <= address && address <= end; |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 inline void StackHandler::Iterate(ObjectVisitor* v) const { | 69 inline void StackHandler::Iterate(ObjectVisitor* v) const { |
70 // Stack handlers do not contain any pointers that need to be | 70 // Stack handlers do not contain any pointers that need to be |
71 // traversed. The only field that have to worry about is the code | 71 // traversed. |
72 // field which is unused and should always be uninitialized. | |
73 #ifdef DEBUG | |
74 const int offset = StackHandlerConstants::kCodeOffset; | |
75 Object* code = Memory::Object_at(address() + offset); | |
76 ASSERT(Smi::cast(code)->value() == StackHandler::kCodeNotPresent); | |
77 #endif | |
78 } | 72 } |
79 | 73 |
80 | 74 |
81 inline StackHandler* StackHandler::FromAddress(Address address) { | 75 inline StackHandler* StackHandler::FromAddress(Address address) { |
82 return reinterpret_cast<StackHandler*>(address); | 76 return reinterpret_cast<StackHandler*>(address); |
83 } | 77 } |
84 | 78 |
85 | 79 |
86 inline StackHandler::State StackHandler::state() const { | 80 inline StackHandler::State StackHandler::state() const { |
87 const int offset = StackHandlerConstants::kStateOffset; | 81 const int offset = StackHandlerConstants::kStateOffset; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 template<typename Iterator> | 214 template<typename Iterator> |
221 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { | 215 void JavaScriptFrameIteratorTemp<Iterator>::Reset() { |
222 iterator_.Reset(); | 216 iterator_.Reset(); |
223 if (!done()) Advance(); | 217 if (!done()) Advance(); |
224 } | 218 } |
225 | 219 |
226 | 220 |
227 } } // namespace v8::internal | 221 } } // namespace v8::internal |
228 | 222 |
229 #endif // V8_FRAMES_INL_H_ | 223 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |