ager@chromium.org | 9258b6b | 2008-09-11 09:11:10 +0000 | [diff] [blame] | 1 | // Copyright 2006-2008 the V8 project authors. All rights reserved. |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 2 | // Redistribution and use in source and binary forms, with or without |
| 3 | // modification, are permitted provided that the following conditions are |
| 4 | // met: |
| 5 | // |
| 6 | // * Redistributions of source code must retain the above copyright |
| 7 | // notice, this list of conditions and the following disclaimer. |
| 8 | // * Redistributions in binary form must reproduce the above |
| 9 | // copyright notice, this list of conditions and the following |
| 10 | // disclaimer in the documentation and/or other materials provided |
| 11 | // with the distribution. |
| 12 | // * Neither the name of Google Inc. nor the names of its |
| 13 | // contributors may be used to endorse or promote products derived |
| 14 | // from this software without specific prior written permission. |
| 15 | // |
| 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| 28 | #include "v8.h" |
| 29 | |
| 30 | #include "frames-inl.h" |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 31 | #include "mark-compact.h" |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 32 | #include "scopeinfo.h" |
| 33 | #include "string-stream.h" |
| 34 | #include "top.h" |
| 35 | #include "zone-inl.h" |
| 36 | |
kasperl@chromium.org | 71affb5 | 2009-05-26 05:44:31 +0000 | [diff] [blame] | 37 | namespace v8 { |
| 38 | namespace internal { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 39 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 40 | // Iterator that supports traversing the stack handlers of a |
| 41 | // particular frame. Needs to know the top of the handler chain. |
| 42 | class StackHandlerIterator BASE_EMBEDDED { |
| 43 | public: |
| 44 | StackHandlerIterator(const StackFrame* frame, StackHandler* handler) |
| 45 | : limit_(frame->fp()), handler_(handler) { |
| 46 | // Make sure the handler has already been unwound to this frame. |
| 47 | ASSERT(frame->sp() <= handler->address()); |
| 48 | } |
| 49 | |
| 50 | StackHandler* handler() const { return handler_; } |
| 51 | |
ager@chromium.org | eadaf22 | 2009-06-16 09:43:10 +0000 | [diff] [blame] | 52 | bool done() { |
| 53 | return handler_ == NULL || handler_->address() > limit_; |
| 54 | } |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 55 | void Advance() { |
| 56 | ASSERT(!done()); |
| 57 | handler_ = handler_->next(); |
| 58 | } |
| 59 | |
| 60 | private: |
| 61 | const Address limit_; |
| 62 | StackHandler* handler_; |
| 63 | }; |
| 64 | |
| 65 | |
| 66 | // ------------------------------------------------------------------------- |
| 67 | |
| 68 | |
| 69 | #define INITIALIZE_SINGLETON(type, field) field##_(this), |
| 70 | StackFrameIterator::StackFrameIterator() |
| 71 | : STACK_FRAME_TYPE_LIST(INITIALIZE_SINGLETON) |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 72 | frame_(NULL), handler_(NULL), thread_(Top::GetCurrentThread()), |
| 73 | fp_(NULL), sp_(NULL), advance_(&StackFrameIterator::AdvanceWithHandler) { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 74 | Reset(); |
| 75 | } |
| 76 | StackFrameIterator::StackFrameIterator(ThreadLocalTop* t) |
| 77 | : STACK_FRAME_TYPE_LIST(INITIALIZE_SINGLETON) |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 78 | frame_(NULL), handler_(NULL), thread_(t), |
| 79 | fp_(NULL), sp_(NULL), advance_(&StackFrameIterator::AdvanceWithHandler) { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 80 | Reset(); |
| 81 | } |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 82 | StackFrameIterator::StackFrameIterator(bool use_top, Address fp, Address sp) |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 83 | : STACK_FRAME_TYPE_LIST(INITIALIZE_SINGLETON) |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 84 | frame_(NULL), handler_(NULL), |
| 85 | thread_(use_top ? Top::GetCurrentThread() : NULL), |
| 86 | fp_(use_top ? NULL : fp), sp_(sp), |
| 87 | advance_(use_top ? &StackFrameIterator::AdvanceWithHandler : |
| 88 | &StackFrameIterator::AdvanceWithoutHandler) { |
| 89 | if (use_top || fp != NULL) { |
| 90 | Reset(); |
| 91 | } |
kasperl@chromium.org | d1e3e72 | 2009-04-14 13:38:25 +0000 | [diff] [blame] | 92 | JavaScriptFrame_.DisableHeapAccess(); |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 93 | } |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 94 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 95 | #undef INITIALIZE_SINGLETON |
| 96 | |
| 97 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 98 | void StackFrameIterator::AdvanceWithHandler() { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 99 | ASSERT(!done()); |
| 100 | // Compute the state of the calling frame before restoring |
| 101 | // callee-saved registers and unwinding handlers. This allows the |
| 102 | // frame code that computes the caller state to access the top |
| 103 | // handler and the value of any callee-saved register if needed. |
| 104 | StackFrame::State state; |
| 105 | StackFrame::Type type = frame_->GetCallerState(&state); |
| 106 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 107 | // Unwind handlers corresponding to the current frame. |
| 108 | StackHandlerIterator it(frame_, handler_); |
| 109 | while (!it.done()) it.Advance(); |
| 110 | handler_ = it.handler(); |
| 111 | |
| 112 | // Advance to the calling frame. |
| 113 | frame_ = SingletonFor(type, &state); |
| 114 | |
| 115 | // When we're done iterating over the stack frames, the handler |
| 116 | // chain must have been completely unwound. |
| 117 | ASSERT(!done() || handler_ == NULL); |
| 118 | } |
| 119 | |
| 120 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 121 | void StackFrameIterator::AdvanceWithoutHandler() { |
| 122 | // A simpler version of Advance which doesn't care about handler. |
| 123 | ASSERT(!done()); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 124 | StackFrame::State state; |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 125 | StackFrame::Type type = frame_->GetCallerState(&state); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 126 | frame_ = SingletonFor(type, &state); |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | |
| 130 | void StackFrameIterator::Reset() { |
| 131 | StackFrame::State state; |
| 132 | StackFrame::Type type; |
| 133 | if (thread_ != NULL) { |
| 134 | type = ExitFrame::GetStateForFramePointer(Top::c_entry_fp(thread_), &state); |
| 135 | handler_ = StackHandler::FromAddress(Top::handler(thread_)); |
| 136 | } else { |
| 137 | ASSERT(fp_ != NULL); |
| 138 | state.fp = fp_; |
| 139 | state.sp = sp_; |
| 140 | state.pc_address = |
| 141 | reinterpret_cast<Address*>(StandardFrame::ComputePCAddress(fp_)); |
| 142 | type = StackFrame::ComputeType(&state); |
| 143 | if (SingletonFor(type) == NULL) return; |
| 144 | } |
| 145 | frame_ = SingletonFor(type, &state); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | |
| 149 | StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type, |
| 150 | StackFrame::State* state) { |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 151 | if (type == StackFrame::NONE) return NULL; |
| 152 | StackFrame* result = SingletonFor(type); |
| 153 | ASSERT(result != NULL); |
| 154 | result->state_ = *state; |
| 155 | return result; |
| 156 | } |
| 157 | |
| 158 | |
| 159 | StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type) { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 160 | #define FRAME_TYPE_CASE(type, field) \ |
| 161 | case StackFrame::type: result = &field##_; break; |
| 162 | |
| 163 | StackFrame* result = NULL; |
| 164 | switch (type) { |
| 165 | case StackFrame::NONE: return NULL; |
| 166 | STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE) |
| 167 | default: break; |
| 168 | } |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 169 | return result; |
| 170 | |
| 171 | #undef FRAME_TYPE_CASE |
| 172 | } |
| 173 | |
| 174 | |
| 175 | // ------------------------------------------------------------------------- |
| 176 | |
| 177 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 178 | StackTraceFrameIterator::StackTraceFrameIterator() { |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame^] | 179 | if (!done() && !IsValidFrame()) Advance(); |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | |
| 183 | void StackTraceFrameIterator::Advance() { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 184 | while (true) { |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 185 | JavaScriptFrameIterator::Advance(); |
| 186 | if (done()) return; |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame^] | 187 | if (IsValidFrame()) return; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 188 | } |
| 189 | } |
| 190 | |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame^] | 191 | bool StackTraceFrameIterator::IsValidFrame() { |
| 192 | if (!frame()->function()->IsJSFunction()) return false; |
| 193 | Object* script = JSFunction::cast(frame()->function())->shared()->script(); |
| 194 | // Don't show functions from native scripts to user. |
| 195 | return (script->IsScript() && |
| 196 | Script::TYPE_NATIVE != Script::cast(script)->type()->value()); |
| 197 | } |
| 198 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 199 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 200 | // ------------------------------------------------------------------------- |
| 201 | |
| 202 | |
| 203 | SafeStackFrameIterator::SafeStackFrameIterator( |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 204 | Address fp, Address sp, Address low_bound, Address high_bound) : |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 205 | low_bound_(low_bound), high_bound_(high_bound), |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 206 | is_valid_top_( |
| 207 | IsWithinBounds(low_bound, high_bound, |
| 208 | Top::c_entry_fp(Top::GetCurrentThread())) && |
| 209 | Top::handler(Top::GetCurrentThread()) != NULL), |
| 210 | is_valid_fp_(IsWithinBounds(low_bound, high_bound, fp)), |
| 211 | is_working_iterator_(is_valid_top_ || is_valid_fp_), |
| 212 | iteration_done_(!is_working_iterator_), |
| 213 | iterator_(is_valid_top_, is_valid_fp_ ? fp : NULL, sp) { |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | |
| 217 | void SafeStackFrameIterator::Advance() { |
| 218 | ASSERT(is_working_iterator_); |
| 219 | ASSERT(!done()); |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 220 | StackFrame* last_frame = iterator_.frame(); |
| 221 | Address last_sp = last_frame->sp(), last_fp = last_frame->fp(); |
| 222 | // Before advancing to the next stack frame, perform pointer validity tests |
kasperl@chromium.org | d1e3e72 | 2009-04-14 13:38:25 +0000 | [diff] [blame] | 223 | iteration_done_ = !IsValidFrame(last_frame) || |
| 224 | !CanIterateHandles(last_frame, iterator_.handler()) || |
| 225 | !IsValidCaller(last_frame); |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 226 | if (iteration_done_) return; |
| 227 | |
| 228 | iterator_.Advance(); |
| 229 | if (iterator_.done()) return; |
| 230 | // Check that we have actually moved to the previous frame in the stack |
| 231 | StackFrame* prev_frame = iterator_.frame(); |
| 232 | iteration_done_ = prev_frame->sp() < last_sp || prev_frame->fp() < last_fp; |
| 233 | } |
| 234 | |
| 235 | |
kasperl@chromium.org | d1e3e72 | 2009-04-14 13:38:25 +0000 | [diff] [blame] | 236 | bool SafeStackFrameIterator::CanIterateHandles(StackFrame* frame, |
| 237 | StackHandler* handler) { |
| 238 | // If StackIterator iterates over StackHandles, verify that |
| 239 | // StackHandlerIterator can be instantiated (see StackHandlerIterator |
| 240 | // constructor.) |
| 241 | return !is_valid_top_ || (frame->sp() <= handler->address()); |
| 242 | } |
| 243 | |
| 244 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 245 | bool SafeStackFrameIterator::IsValidFrame(StackFrame* frame) const { |
kasperl@chromium.org | d1e3e72 | 2009-04-14 13:38:25 +0000 | [diff] [blame] | 246 | return IsValidStackAddress(frame->sp()) && IsValidStackAddress(frame->fp()); |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | |
| 250 | bool SafeStackFrameIterator::IsValidCaller(StackFrame* frame) { |
| 251 | StackFrame::State state; |
ager@chromium.org | 41826e7 | 2009-03-30 13:30:57 +0000 | [diff] [blame] | 252 | if (frame->is_entry() || frame->is_entry_construct()) { |
| 253 | // See EntryFrame::GetCallerState. It computes the caller FP address |
| 254 | // and calls ExitFrame::GetStateForFramePointer on it. We need to be |
| 255 | // sure that caller FP address is valid. |
| 256 | Address caller_fp = Memory::Address_at( |
| 257 | frame->fp() + EntryFrameConstants::kCallerFPOffset); |
| 258 | if (!IsValidStackAddress(caller_fp)) { |
| 259 | return false; |
| 260 | } |
| 261 | } else if (frame->is_arguments_adaptor()) { |
| 262 | // See ArgumentsAdaptorFrame::GetCallerStackPointer. It assumes that |
| 263 | // the number of arguments is stored on stack as Smi. We need to check |
| 264 | // that it really an Smi. |
| 265 | Object* number_of_args = reinterpret_cast<ArgumentsAdaptorFrame*>(frame)-> |
| 266 | GetExpression(0); |
| 267 | if (!number_of_args->IsSmi()) { |
| 268 | return false; |
| 269 | } |
| 270 | } |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 271 | frame->ComputeCallerState(&state); |
| 272 | return IsValidStackAddress(state.sp) && IsValidStackAddress(state.fp) && |
| 273 | iterator_.SingletonFor(frame->GetCallerState(&state)) != NULL; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 274 | } |
| 275 | |
| 276 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 277 | void SafeStackFrameIterator::Reset() { |
| 278 | if (is_working_iterator_) { |
| 279 | iterator_.Reset(); |
| 280 | iteration_done_ = false; |
| 281 | } |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 285 | // ------------------------------------------------------------------------- |
| 286 | |
| 287 | |
| 288 | #ifdef ENABLE_LOGGING_AND_PROFILING |
| 289 | SafeStackTraceFrameIterator::SafeStackTraceFrameIterator( |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 290 | Address fp, Address sp, Address low_bound, Address high_bound) : |
| 291 | SafeJavaScriptFrameIterator(fp, sp, low_bound, high_bound) { |
kasperl@chromium.org | d1e3e72 | 2009-04-14 13:38:25 +0000 | [diff] [blame] | 292 | if (!done() && !frame()->is_java_script()) Advance(); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 296 | void SafeStackTraceFrameIterator::Advance() { |
| 297 | while (true) { |
| 298 | SafeJavaScriptFrameIterator::Advance(); |
| 299 | if (done()) return; |
kasperl@chromium.org | d1e3e72 | 2009-04-14 13:38:25 +0000 | [diff] [blame] | 300 | if (frame()->is_java_script()) return; |
kasperl@chromium.org | 7be3c99 | 2009-03-12 07:19:55 +0000 | [diff] [blame] | 301 | } |
| 302 | } |
| 303 | #endif |
| 304 | |
| 305 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 306 | // ------------------------------------------------------------------------- |
| 307 | |
| 308 | |
| 309 | void StackHandler::Cook(Code* code) { |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 310 | ASSERT(MarkCompactCollector::IsCompacting()); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 311 | ASSERT(code->contains(pc())); |
| 312 | set_pc(AddressFrom<Address>(pc() - code->instruction_start())); |
| 313 | } |
| 314 | |
| 315 | |
| 316 | void StackHandler::Uncook(Code* code) { |
fschneider@chromium.org | 0c20e67 | 2010-01-14 15:28:53 +0000 | [diff] [blame] | 317 | ASSERT(MarkCompactCollector::HasCompacted()); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 318 | set_pc(code->instruction_start() + OffsetFrom(pc())); |
| 319 | ASSERT(code->contains(pc())); |
| 320 | } |
| 321 | |
| 322 | |
| 323 | // ------------------------------------------------------------------------- |
| 324 | |
| 325 | |
| 326 | bool StackFrame::HasHandler() const { |
| 327 | StackHandlerIterator it(this, top_handler()); |
| 328 | return !it.done(); |
| 329 | } |
| 330 | |
| 331 | |
| 332 | void StackFrame::CookFramesForThread(ThreadLocalTop* thread) { |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 333 | // Only cooking frames when the collector is compacting and thus moving code |
| 334 | // around. |
| 335 | ASSERT(MarkCompactCollector::IsCompacting()); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 336 | ASSERT(!thread->stack_is_cooked()); |
| 337 | for (StackFrameIterator it(thread); !it.done(); it.Advance()) { |
| 338 | it.frame()->Cook(); |
| 339 | } |
| 340 | thread->set_stack_is_cooked(true); |
| 341 | } |
| 342 | |
| 343 | |
| 344 | void StackFrame::UncookFramesForThread(ThreadLocalTop* thread) { |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 345 | // Only uncooking frames when the collector is compacting and thus moving code |
| 346 | // around. |
fschneider@chromium.org | 0c20e67 | 2010-01-14 15:28:53 +0000 | [diff] [blame] | 347 | ASSERT(MarkCompactCollector::HasCompacted()); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 348 | ASSERT(thread->stack_is_cooked()); |
| 349 | for (StackFrameIterator it(thread); !it.done(); it.Advance()) { |
| 350 | it.frame()->Uncook(); |
| 351 | } |
| 352 | thread->set_stack_is_cooked(false); |
| 353 | } |
| 354 | |
| 355 | |
| 356 | void StackFrame::Cook() { |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 357 | Code* code = this->code(); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 358 | for (StackHandlerIterator it(this, top_handler()); !it.done(); it.Advance()) { |
| 359 | it.handler()->Cook(code); |
| 360 | } |
| 361 | ASSERT(code->contains(pc())); |
| 362 | set_pc(AddressFrom<Address>(pc() - code->instruction_start())); |
| 363 | } |
| 364 | |
| 365 | |
| 366 | void StackFrame::Uncook() { |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 367 | Code* code = this->code(); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 368 | for (StackHandlerIterator it(this, top_handler()); !it.done(); it.Advance()) { |
| 369 | it.handler()->Uncook(code); |
| 370 | } |
| 371 | set_pc(code->instruction_start() + OffsetFrom(pc())); |
| 372 | ASSERT(code->contains(pc())); |
| 373 | } |
| 374 | |
| 375 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 376 | StackFrame::Type StackFrame::GetCallerState(State* state) const { |
| 377 | ComputeCallerState(state); |
| 378 | return ComputeType(state); |
| 379 | } |
| 380 | |
| 381 | |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 382 | Code* EntryFrame::code() const { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 383 | return Heap::js_entry_code(); |
| 384 | } |
| 385 | |
| 386 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 387 | void EntryFrame::ComputeCallerState(State* state) const { |
| 388 | GetCallerState(state); |
| 389 | } |
| 390 | |
| 391 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 392 | StackFrame::Type EntryFrame::GetCallerState(State* state) const { |
| 393 | const int offset = EntryFrameConstants::kCallerFPOffset; |
| 394 | Address fp = Memory::Address_at(this->fp() + offset); |
| 395 | return ExitFrame::GetStateForFramePointer(fp, state); |
| 396 | } |
| 397 | |
| 398 | |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 399 | Code* EntryConstructFrame::code() const { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 400 | return Heap::js_construct_entry_code(); |
| 401 | } |
| 402 | |
| 403 | |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 404 | Object*& ExitFrame::code_slot() const { |
| 405 | const int offset = ExitFrameConstants::kCodeOffset; |
| 406 | return Memory::Object_at(fp() + offset); |
| 407 | } |
| 408 | |
| 409 | |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 410 | Code* ExitFrame::code() const { |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 411 | Object* code = code_slot(); |
| 412 | if (code->IsSmi()) { |
sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame^] | 413 | return Heap::debugger_statement_code(); |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 414 | } else { |
| 415 | return Code::cast(code); |
| 416 | } |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 417 | } |
| 418 | |
| 419 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 420 | void ExitFrame::ComputeCallerState(State* state) const { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 421 | // Setup the caller state. |
ager@chromium.org | eadaf22 | 2009-06-16 09:43:10 +0000 | [diff] [blame] | 422 | state->sp = caller_sp(); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 423 | state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 424 | state->pc_address |
| 425 | = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | |
| 429 | Address ExitFrame::GetCallerStackPointer() const { |
ager@chromium.org | eadaf22 | 2009-06-16 09:43:10 +0000 | [diff] [blame] | 430 | return fp() + ExitFrameConstants::kCallerSPDisplacement; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 431 | } |
| 432 | |
| 433 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 434 | Address StandardFrame::GetExpressionAddress(int n) const { |
kasper.lund | 7276f14 | 2008-07-30 08:49:36 +0000 | [diff] [blame] | 435 | const int offset = StandardFrameConstants::kExpressionsOffset; |
| 436 | return fp() + offset - n * kPointerSize; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 437 | } |
| 438 | |
| 439 | |
| 440 | int StandardFrame::ComputeExpressionsCount() const { |
| 441 | const int offset = |
| 442 | StandardFrameConstants::kExpressionsOffset + kPointerSize; |
| 443 | Address base = fp() + offset; |
| 444 | Address limit = sp(); |
| 445 | ASSERT(base >= limit); // stack grows downwards |
| 446 | // Include register-allocated locals in number of expressions. |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 447 | return static_cast<int>((base - limit) / kPointerSize); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 448 | } |
| 449 | |
| 450 | |
ager@chromium.org | bb29dc9 | 2009-03-24 13:25:23 +0000 | [diff] [blame] | 451 | void StandardFrame::ComputeCallerState(State* state) const { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 452 | state->sp = caller_sp(); |
| 453 | state->fp = caller_fp(); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 454 | state->pc_address = reinterpret_cast<Address*>(ComputePCAddress(fp())); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 455 | } |
| 456 | |
| 457 | |
| 458 | bool StandardFrame::IsExpressionInsideHandler(int n) const { |
| 459 | Address address = GetExpressionAddress(n); |
| 460 | for (StackHandlerIterator it(this, top_handler()); !it.done(); it.Advance()) { |
| 461 | if (it.handler()->includes(address)) return true; |
| 462 | } |
| 463 | return false; |
| 464 | } |
| 465 | |
| 466 | |
| 467 | Object* JavaScriptFrame::GetParameter(int index) const { |
| 468 | ASSERT(index >= 0 && index < ComputeParametersCount()); |
| 469 | const int offset = JavaScriptFrameConstants::kParam0Offset; |
ager@chromium.org | eadaf22 | 2009-06-16 09:43:10 +0000 | [diff] [blame] | 470 | return Memory::Object_at(caller_sp() + offset - (index * kPointerSize)); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 471 | } |
| 472 | |
| 473 | |
| 474 | int JavaScriptFrame::ComputeParametersCount() const { |
ager@chromium.org | eadaf22 | 2009-06-16 09:43:10 +0000 | [diff] [blame] | 475 | Address base = caller_sp() + JavaScriptFrameConstants::kReceiverOffset; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 476 | Address limit = fp() + JavaScriptFrameConstants::kSavedRegistersOffset; |
ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 477 | return static_cast<int>((base - limit) / kPointerSize); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 478 | } |
| 479 | |
| 480 | |
| 481 | bool JavaScriptFrame::IsConstructor() const { |
ager@chromium.org | 7c537e2 | 2008-10-16 08:43:32 +0000 | [diff] [blame] | 482 | Address fp = caller_fp(); |
| 483 | if (has_adapted_arguments()) { |
| 484 | // Skip the arguments adaptor frame and look at the real caller. |
| 485 | fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset); |
| 486 | } |
| 487 | return IsConstructFrame(fp); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 488 | } |
| 489 | |
| 490 | |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 491 | Code* JavaScriptFrame::code() const { |
| 492 | JSFunction* function = JSFunction::cast(this->function()); |
| 493 | return function->shared()->code(); |
| 494 | } |
| 495 | |
| 496 | |
| 497 | Code* ArgumentsAdaptorFrame::code() const { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 498 | return Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline); |
| 499 | } |
| 500 | |
| 501 | |
kasperl@chromium.org | 061ef74 | 2009-02-27 12:16:20 +0000 | [diff] [blame] | 502 | Code* InternalFrame::code() const { |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 503 | const int offset = InternalFrameConstants::kCodeOffset; |
| 504 | Object* code = Memory::Object_at(fp() + offset); |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 505 | ASSERT(code != NULL); |
| 506 | return Code::cast(code); |
| 507 | } |
| 508 | |
| 509 | |
| 510 | void StackFrame::PrintIndex(StringStream* accumulator, |
| 511 | PrintMode mode, |
| 512 | int index) { |
| 513 | accumulator->Add((mode == OVERVIEW) ? "%5d: " : "[%d]: ", index); |
| 514 | } |
| 515 | |
| 516 | |
| 517 | void JavaScriptFrame::Print(StringStream* accumulator, |
| 518 | PrintMode mode, |
| 519 | int index) const { |
| 520 | HandleScope scope; |
| 521 | Object* receiver = this->receiver(); |
| 522 | Object* function = this->function(); |
| 523 | |
| 524 | accumulator->PrintSecurityTokenIfChanged(function); |
| 525 | PrintIndex(accumulator, mode, index); |
| 526 | Code* code = NULL; |
| 527 | if (IsConstructor()) accumulator->Add("new "); |
| 528 | accumulator->PrintFunction(function, receiver, &code); |
| 529 | accumulator->Add("(this=%o", receiver); |
| 530 | |
| 531 | // Get scope information for nicer output, if possible. If code is |
| 532 | // NULL, or doesn't contain scope info, info will return 0 for the |
| 533 | // number of parameters, stack slots, or context slots. |
| 534 | ScopeInfo<PreallocatedStorage> info(code); |
| 535 | |
| 536 | // Print the parameters. |
| 537 | int parameters_count = ComputeParametersCount(); |
| 538 | for (int i = 0; i < parameters_count; i++) { |
| 539 | accumulator->Add(","); |
| 540 | // If we have a name for the parameter we print it. Nameless |
| 541 | // parameters are either because we have more actual parameters |
| 542 | // than formal parameters or because we have no scope information. |
| 543 | if (i < info.number_of_parameters()) { |
| 544 | accumulator->PrintName(*info.parameter_name(i)); |
| 545 | accumulator->Add("="); |
| 546 | } |
| 547 | accumulator->Add("%o", GetParameter(i)); |
| 548 | } |
| 549 | |
| 550 | accumulator->Add(")"); |
| 551 | if (mode == OVERVIEW) { |
| 552 | accumulator->Add("\n"); |
| 553 | return; |
| 554 | } |
| 555 | accumulator->Add(" {\n"); |
| 556 | |
| 557 | // Compute the number of locals and expression stack elements. |
| 558 | int stack_locals_count = info.number_of_stack_slots(); |
| 559 | int heap_locals_count = info.number_of_context_slots(); |
| 560 | int expressions_count = ComputeExpressionsCount(); |
| 561 | |
| 562 | // Print stack-allocated local variables. |
| 563 | if (stack_locals_count > 0) { |
| 564 | accumulator->Add(" // stack-allocated locals\n"); |
| 565 | } |
| 566 | for (int i = 0; i < stack_locals_count; i++) { |
| 567 | accumulator->Add(" var "); |
| 568 | accumulator->PrintName(*info.stack_slot_name(i)); |
| 569 | accumulator->Add(" = "); |
| 570 | if (i < expressions_count) { |
| 571 | accumulator->Add("%o", GetExpression(i)); |
| 572 | } else { |
| 573 | accumulator->Add("// no expression found - inconsistent frame?"); |
| 574 | } |
| 575 | accumulator->Add("\n"); |
| 576 | } |
| 577 | |
| 578 | // Try to get hold of the context of this frame. |
| 579 | Context* context = NULL; |
| 580 | if (this->context() != NULL && this->context()->IsContext()) { |
| 581 | context = Context::cast(this->context()); |
| 582 | } |
| 583 | |
| 584 | // Print heap-allocated local variables. |
| 585 | if (heap_locals_count > Context::MIN_CONTEXT_SLOTS) { |
| 586 | accumulator->Add(" // heap-allocated locals\n"); |
| 587 | } |
| 588 | for (int i = Context::MIN_CONTEXT_SLOTS; i < heap_locals_count; i++) { |
| 589 | accumulator->Add(" var "); |
| 590 | accumulator->PrintName(*info.context_slot_name(i)); |
| 591 | accumulator->Add(" = "); |
| 592 | if (context != NULL) { |
| 593 | if (i < context->length()) { |
| 594 | accumulator->Add("%o", context->get(i)); |
| 595 | } else { |
| 596 | accumulator->Add( |
| 597 | "// warning: missing context slot - inconsistent frame?"); |
| 598 | } |
| 599 | } else { |
| 600 | accumulator->Add("// warning: no context found - inconsistent frame?"); |
| 601 | } |
| 602 | accumulator->Add("\n"); |
| 603 | } |
| 604 | |
| 605 | // Print the expression stack. |
kasper.lund | 7276f14 | 2008-07-30 08:49:36 +0000 | [diff] [blame] | 606 | int expressions_start = stack_locals_count; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 607 | if (expressions_start < expressions_count) { |
| 608 | accumulator->Add(" // expression stack (top to bottom)\n"); |
| 609 | } |
| 610 | for (int i = expressions_count - 1; i >= expressions_start; i--) { |
| 611 | if (IsExpressionInsideHandler(i)) continue; |
| 612 | accumulator->Add(" [%02d] : %o\n", i, GetExpression(i)); |
| 613 | } |
| 614 | |
| 615 | // Print details about the function. |
| 616 | if (FLAG_max_stack_trace_source_length != 0 && code != NULL) { |
| 617 | SharedFunctionInfo* shared = JSFunction::cast(function)->shared(); |
| 618 | accumulator->Add("--------- s o u r c e c o d e ---------\n"); |
| 619 | shared->SourceCodePrint(accumulator, FLAG_max_stack_trace_source_length); |
| 620 | accumulator->Add("\n-----------------------------------------\n"); |
| 621 | } |
| 622 | |
| 623 | accumulator->Add("}\n\n"); |
| 624 | } |
| 625 | |
| 626 | |
| 627 | void ArgumentsAdaptorFrame::Print(StringStream* accumulator, |
| 628 | PrintMode mode, |
| 629 | int index) const { |
| 630 | int actual = ComputeParametersCount(); |
| 631 | int expected = -1; |
| 632 | Object* function = this->function(); |
| 633 | if (function->IsJSFunction()) { |
| 634 | expected = JSFunction::cast(function)->shared()->formal_parameter_count(); |
| 635 | } |
| 636 | |
| 637 | PrintIndex(accumulator, mode, index); |
| 638 | accumulator->Add("arguments adaptor frame: %d->%d", actual, expected); |
| 639 | if (mode == OVERVIEW) { |
| 640 | accumulator->Add("\n"); |
| 641 | return; |
| 642 | } |
| 643 | accumulator->Add(" {\n"); |
| 644 | |
| 645 | // Print actual arguments. |
| 646 | if (actual > 0) accumulator->Add(" // actual arguments\n"); |
| 647 | for (int i = 0; i < actual; i++) { |
| 648 | accumulator->Add(" [%02d] : %o", i, GetParameter(i)); |
| 649 | if (expected != -1 && i >= expected) { |
| 650 | accumulator->Add(" // not passed to callee"); |
| 651 | } |
| 652 | accumulator->Add("\n"); |
| 653 | } |
| 654 | |
| 655 | accumulator->Add("}\n\n"); |
| 656 | } |
| 657 | |
| 658 | |
| 659 | void EntryFrame::Iterate(ObjectVisitor* v) const { |
| 660 | StackHandlerIterator it(this, top_handler()); |
| 661 | ASSERT(!it.done()); |
| 662 | StackHandler* handler = it.handler(); |
| 663 | ASSERT(handler->is_entry()); |
| 664 | handler->Iterate(v); |
| 665 | // Make sure that there's the entry frame does not contain more than |
| 666 | // one stack handler. |
ager@chromium.org | 65dad4b | 2009-04-23 08:48:43 +0000 | [diff] [blame] | 667 | #ifdef DEBUG |
| 668 | it.Advance(); |
| 669 | ASSERT(it.done()); |
| 670 | #endif |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 671 | } |
| 672 | |
| 673 | |
| 674 | void StandardFrame::IterateExpressions(ObjectVisitor* v) const { |
| 675 | const int offset = StandardFrameConstants::kContextOffset; |
| 676 | Object** base = &Memory::Object_at(sp()); |
| 677 | Object** limit = &Memory::Object_at(fp() + offset) + 1; |
| 678 | for (StackHandlerIterator it(this, top_handler()); !it.done(); it.Advance()) { |
| 679 | StackHandler* handler = it.handler(); |
| 680 | // Traverse pointers down to - but not including - the next |
| 681 | // handler in the handler chain. Update the base to skip the |
| 682 | // handler and allow the handler to traverse its own pointers. |
| 683 | const Address address = handler->address(); |
| 684 | v->VisitPointers(base, reinterpret_cast<Object**>(address)); |
| 685 | base = reinterpret_cast<Object**>(address + StackHandlerConstants::kSize); |
| 686 | // Traverse the pointers in the handler itself. |
| 687 | handler->Iterate(v); |
| 688 | } |
| 689 | v->VisitPointers(base, limit); |
| 690 | } |
| 691 | |
| 692 | |
| 693 | void JavaScriptFrame::Iterate(ObjectVisitor* v) const { |
| 694 | IterateExpressions(v); |
| 695 | |
| 696 | // Traverse callee-saved registers, receiver, and parameters. |
| 697 | const int kBaseOffset = JavaScriptFrameConstants::kSavedRegistersOffset; |
| 698 | const int kLimitOffset = JavaScriptFrameConstants::kReceiverOffset; |
| 699 | Object** base = &Memory::Object_at(fp() + kBaseOffset); |
ager@chromium.org | eadaf22 | 2009-06-16 09:43:10 +0000 | [diff] [blame] | 700 | Object** limit = &Memory::Object_at(caller_sp() + kLimitOffset) + 1; |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 701 | v->VisitPointers(base, limit); |
| 702 | } |
| 703 | |
| 704 | |
| 705 | void InternalFrame::Iterate(ObjectVisitor* v) const { |
| 706 | // Internal frames only have object pointers on the expression stack |
| 707 | // as they never have any arguments. |
| 708 | IterateExpressions(v); |
| 709 | } |
| 710 | |
| 711 | |
| 712 | // ------------------------------------------------------------------------- |
| 713 | |
| 714 | |
| 715 | JavaScriptFrame* StackFrameLocator::FindJavaScriptFrame(int n) { |
| 716 | ASSERT(n >= 0); |
| 717 | for (int i = 0; i <= n; i++) { |
| 718 | while (!iterator_.frame()->is_java_script()) iterator_.Advance(); |
| 719 | if (i == n) return JavaScriptFrame::cast(iterator_.frame()); |
| 720 | iterator_.Advance(); |
| 721 | } |
| 722 | UNREACHABLE(); |
| 723 | return NULL; |
| 724 | } |
| 725 | |
| 726 | |
| 727 | // ------------------------------------------------------------------------- |
| 728 | |
| 729 | |
| 730 | int NumRegs(RegList reglist) { |
| 731 | int n = 0; |
| 732 | while (reglist != 0) { |
| 733 | n++; |
| 734 | reglist &= reglist - 1; // clear one bit |
| 735 | } |
| 736 | return n; |
| 737 | } |
| 738 | |
| 739 | |
| 740 | int JSCallerSavedCode(int n) { |
| 741 | static int reg_code[kNumJSCallerSaved]; |
| 742 | static bool initialized = false; |
| 743 | if (!initialized) { |
| 744 | initialized = true; |
| 745 | int i = 0; |
| 746 | for (int r = 0; r < kNumRegs; r++) |
| 747 | if ((kJSCallerSaved & (1 << r)) != 0) |
| 748 | reg_code[i++] = r; |
| 749 | |
| 750 | ASSERT(i == kNumJSCallerSaved); |
| 751 | } |
| 752 | ASSERT(0 <= n && n < kNumJSCallerSaved); |
| 753 | return reg_code[n]; |
| 754 | } |
| 755 | |
| 756 | |
christian.plesner.hansen | 43d26ec | 2008-07-03 15:10:15 +0000 | [diff] [blame] | 757 | } } // namespace v8::internal |