Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1100)

Side by Side Diff: src/frames.cc

Issue 1239593003: Fix memento initialization when constructing from new call (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/frames.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698