| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/frames.h" | 5 #include "src/frames.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 | 595 |
| 596 | 596 |
| 597 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { | 597 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { |
| 598 if (fp == 0) return NONE; | 598 if (fp == 0) return NONE; |
| 599 Address sp = ComputeStackPointer(fp); | 599 Address sp = ComputeStackPointer(fp); |
| 600 FillState(fp, sp, state); | 600 FillState(fp, sp, state); |
| 601 DCHECK(*state->pc_address != NULL); | 601 DCHECK(*state->pc_address != NULL); |
| 602 return EXIT; | 602 return EXIT; |
| 603 } | 603 } |
| 604 | 604 |
| 605 | |
| 606 Address ExitFrame::ComputeStackPointer(Address fp) { | 605 Address ExitFrame::ComputeStackPointer(Address fp) { |
| 606 #if defined(USE_SIMULATOR) |
| 607 MSAN_MEMORY_IS_INITIALIZED(fp + ExitFrameConstants::kSPOffset, kPointerSize); |
| 608 #endif |
| 607 return Memory::Address_at(fp + ExitFrameConstants::kSPOffset); | 609 return Memory::Address_at(fp + ExitFrameConstants::kSPOffset); |
| 608 } | 610 } |
| 609 | 611 |
| 610 | |
| 611 void ExitFrame::FillState(Address fp, Address sp, State* state) { | 612 void ExitFrame::FillState(Address fp, Address sp, State* state) { |
| 612 state->sp = sp; | 613 state->sp = sp; |
| 613 state->fp = fp; | 614 state->fp = fp; |
| 614 state->pc_address = ResolveReturnAddressLocation( | 615 state->pc_address = ResolveReturnAddressLocation( |
| 615 reinterpret_cast<Address*>(sp - 1 * kPCOnStackSize)); | 616 reinterpret_cast<Address*>(sp - 1 * kPCOnStackSize)); |
| 616 // The constant pool recorded in the exit frame is not associated | 617 // The constant pool recorded in the exit frame is not associated |
| 617 // with the pc in this state (the return address into a C entry | 618 // with the pc in this state (the return address into a C entry |
| 618 // stub). ComputeCallerState will retrieve the constant pool | 619 // stub). ComputeCallerState will retrieve the constant pool |
| 619 // together with the associated caller pc. | 620 // together with the associated caller pc. |
| 620 state->constant_pool_address = NULL; | 621 state->constant_pool_address = NULL; |
| (...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1788 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1788 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1789 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1789 list.Add(frame, zone); | 1790 list.Add(frame, zone); |
| 1790 } | 1791 } |
| 1791 return list.ToVector(); | 1792 return list.ToVector(); |
| 1792 } | 1793 } |
| 1793 | 1794 |
| 1794 | 1795 |
| 1795 } // namespace internal | 1796 } // namespace internal |
| 1796 } // namespace v8 | 1797 } // namespace v8 |
| OLD | NEW |