OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 if (is_working_iterator_) { | 341 if (is_working_iterator_) { |
342 iterator_.Reset(); | 342 iterator_.Reset(); |
343 iteration_done_ = false; | 343 iteration_done_ = false; |
344 } | 344 } |
345 } | 345 } |
346 | 346 |
347 | 347 |
348 // ------------------------------------------------------------------------- | 348 // ------------------------------------------------------------------------- |
349 | 349 |
350 | 350 |
351 #ifdef ENABLE_LOGGING_AND_PROFILING | |
352 SafeStackTraceFrameIterator::SafeStackTraceFrameIterator( | 351 SafeStackTraceFrameIterator::SafeStackTraceFrameIterator( |
353 Isolate* isolate, | 352 Isolate* isolate, |
354 Address fp, Address sp, Address low_bound, Address high_bound) : | 353 Address fp, Address sp, Address low_bound, Address high_bound) : |
355 SafeJavaScriptFrameIterator(isolate, fp, sp, low_bound, high_bound) { | 354 SafeJavaScriptFrameIterator(isolate, fp, sp, low_bound, high_bound) { |
356 if (!done() && !frame()->is_java_script()) Advance(); | 355 if (!done() && !frame()->is_java_script()) Advance(); |
357 } | 356 } |
358 | 357 |
359 | 358 |
360 void SafeStackTraceFrameIterator::Advance() { | 359 void SafeStackTraceFrameIterator::Advance() { |
361 while (true) { | 360 while (true) { |
362 SafeJavaScriptFrameIterator::Advance(); | 361 SafeJavaScriptFrameIterator::Advance(); |
363 if (done()) return; | 362 if (done()) return; |
364 if (frame()->is_java_script()) return; | 363 if (frame()->is_java_script()) return; |
365 } | 364 } |
366 } | 365 } |
367 #endif | |
368 | 366 |
369 | 367 |
370 Code* StackFrame::GetSafepointData(Isolate* isolate, | 368 Code* StackFrame::GetSafepointData(Isolate* isolate, |
371 Address pc, | 369 Address pc, |
372 SafepointEntry* safepoint_entry, | 370 SafepointEntry* safepoint_entry, |
373 unsigned* stack_slots) { | 371 unsigned* stack_slots) { |
374 PcToCodeCache::PcToCodeCacheEntry* entry = | 372 PcToCodeCache::PcToCodeCacheEntry* entry = |
375 isolate->pc_to_code_cache()->GetCacheEntry(pc); | 373 isolate->pc_to_code_cache()->GetCacheEntry(pc); |
376 SafepointEntry cached_safepoint_entry = entry->safepoint_entry; | 374 SafepointEntry cached_safepoint_entry = entry->safepoint_entry; |
377 if (!entry->safepoint_entry.is_valid()) { | 375 if (!entry->safepoint_entry.is_valid()) { |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 ZoneList<StackFrame*> list(10); | 1271 ZoneList<StackFrame*> list(10); |
1274 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1272 for (StackFrameIterator it; !it.done(); it.Advance()) { |
1275 StackFrame* frame = AllocateFrameCopy(it.frame()); | 1273 StackFrame* frame = AllocateFrameCopy(it.frame()); |
1276 list.Add(frame); | 1274 list.Add(frame); |
1277 } | 1275 } |
1278 return list.ToVector(); | 1276 return list.ToVector(); |
1279 } | 1277 } |
1280 | 1278 |
1281 | 1279 |
1282 } } // namespace v8::internal | 1280 } } // namespace v8::internal |
OLD | NEW |