| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 state->pc_address = ResolveReturnAddressLocation( | 641 state->pc_address = ResolveReturnAddressLocation( |
| 642 reinterpret_cast<Address*>(sp - 1 * kPCOnStackSize)); | 642 reinterpret_cast<Address*>(sp - 1 * kPCOnStackSize)); |
| 643 // The constant pool recorded in the exit frame is not associated | 643 // The constant pool recorded in the exit frame is not associated |
| 644 // with the pc in this state (the return address into a C entry | 644 // with the pc in this state (the return address into a C entry |
| 645 // stub). ComputeCallerState will retrieve the constant pool | 645 // stub). ComputeCallerState will retrieve the constant pool |
| 646 // together with the associated caller pc. | 646 // together with the associated caller pc. |
| 647 state->constant_pool_address = NULL; | 647 state->constant_pool_address = NULL; |
| 648 } | 648 } |
| 649 | 649 |
| 650 JSFunction* BuiltinExitFrame::function() const { | 650 JSFunction* BuiltinExitFrame::function() const { |
| 651 return JSFunction::cast(function_slot_object()); | 651 return JSFunction::cast(target_slot_object()); |
| 652 } |
| 653 |
| 654 Object* BuiltinExitFrame::receiver() const { return receiver_slot_object(); } |
| 655 |
| 656 bool BuiltinExitFrame::IsConstructor() const { |
| 657 return !new_target_slot_object()->IsUndefined(isolate()); |
| 652 } | 658 } |
| 653 | 659 |
| 654 Address StandardFrame::GetExpressionAddress(int n) const { | 660 Address StandardFrame::GetExpressionAddress(int n) const { |
| 655 const int offset = StandardFrameConstants::kExpressionsOffset; | 661 const int offset = StandardFrameConstants::kExpressionsOffset; |
| 656 return fp() + offset - n * kPointerSize; | 662 return fp() + offset - n * kPointerSize; |
| 657 } | 663 } |
| 658 | 664 |
| 659 Address InterpretedFrame::GetExpressionAddress(int n) const { | 665 Address InterpretedFrame::GetExpressionAddress(int n) const { |
| 660 const int offset = InterpreterFrameConstants::kExpressionsOffset; | 666 const int offset = InterpreterFrameConstants::kExpressionsOffset; |
| 661 return fp() + offset - n * kPointerSize; | 667 return fp() + offset - n * kPointerSize; |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1869 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1864 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1870 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1865 list.Add(frame, zone); | 1871 list.Add(frame, zone); |
| 1866 } | 1872 } |
| 1867 return list.ToVector(); | 1873 return list.ToVector(); |
| 1868 } | 1874 } |
| 1869 | 1875 |
| 1870 | 1876 |
| 1871 } // namespace internal | 1877 } // namespace internal |
| 1872 } // namespace v8 | 1878 } // namespace v8 |
| OLD | NEW |