| 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/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 731 |
| 732 | 732 |
| 733 Object* JavaScriptFrame::GetOriginalConstructor() const { | 733 Object* JavaScriptFrame::GetOriginalConstructor() const { |
| 734 Address fp = caller_fp(); | 734 Address fp = caller_fp(); |
| 735 if (has_adapted_arguments()) { | 735 if (has_adapted_arguments()) { |
| 736 // Skip the arguments adaptor frame and look at the real caller. | 736 // Skip the arguments adaptor frame and look at the real caller. |
| 737 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset); | 737 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset); |
| 738 } | 738 } |
| 739 DCHECK(IsConstructFrame(fp)); | 739 DCHECK(IsConstructFrame(fp)); |
| 740 STATIC_ASSERT(ConstructFrameConstants::kOriginalConstructorOffset == | 740 STATIC_ASSERT(ConstructFrameConstants::kOriginalConstructorOffset == |
| 741 StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize); | 741 StandardFrameConstants::kExpressionsOffset - 3 * kPointerSize); |
| 742 return GetExpression(fp, 2); | 742 return GetExpression(fp, 3); |
| 743 } | 743 } |
| 744 | 744 |
| 745 | 745 |
| 746 int JavaScriptFrame::GetArgumentsLength() const { | 746 int JavaScriptFrame::GetArgumentsLength() const { |
| 747 // If there is an arguments adaptor frame get the arguments length from it. | 747 // If there is an arguments adaptor frame get the arguments length from it. |
| 748 if (has_adapted_arguments()) { | 748 if (has_adapted_arguments()) { |
| 749 STATIC_ASSERT(ArgumentsAdaptorFrameConstants::kLengthOffset == | 749 STATIC_ASSERT(ArgumentsAdaptorFrameConstants::kLengthOffset == |
| 750 StandardFrameConstants::kExpressionsOffset); | 750 StandardFrameConstants::kExpressionsOffset); |
| 751 return Smi::cast(GetExpression(caller_fp(), 0))->value(); | 751 return Smi::cast(GetExpression(caller_fp(), 0))->value(); |
| 752 } else { | 752 } else { |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1551 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1552 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1552 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1553 list.Add(frame, zone); | 1553 list.Add(frame, zone); |
| 1554 } | 1554 } |
| 1555 return list.ToVector(); | 1555 return list.ToVector(); |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 | 1558 |
| 1559 } // namespace internal | 1559 } // namespace internal |
| 1560 } // namespace v8 | 1560 } // namespace v8 |
| OLD | NEW |