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

Side by Side Diff: src/frames.cc

Issue 1212813008: [turbofan] Port initialization of new.target variable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 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/runtime/runtime.h » ('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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 bool JavaScriptFrame::IsConstructor() const { 723 bool JavaScriptFrame::IsConstructor() const {
724 Address fp = caller_fp(); 724 Address fp = caller_fp();
725 if (has_adapted_arguments()) { 725 if (has_adapted_arguments()) {
726 // Skip the arguments adaptor frame and look at the real caller. 726 // Skip the arguments adaptor frame and look at the real caller.
727 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset); 727 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset);
728 } 728 }
729 return IsConstructFrame(fp); 729 return IsConstructFrame(fp);
730 } 730 }
731 731
732 732
733 Object* JavaScriptFrame::GetOriginalConstructor() const {
734 Address fp = caller_fp();
735 if (has_adapted_arguments()) {
736 // Skip the arguments adaptor frame and look at the real caller.
737 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset);
738 }
739 DCHECK(IsConstructFrame(fp));
740 return GetExpression(fp, 2);
741 }
742
743
733 int JavaScriptFrame::GetArgumentsLength() const { 744 int JavaScriptFrame::GetArgumentsLength() const {
734 // If there is an arguments adaptor frame get the arguments length from it. 745 // If there is an arguments adaptor frame get the arguments length from it.
735 if (has_adapted_arguments()) { 746 if (has_adapted_arguments()) {
736 return Smi::cast(GetExpression(caller_fp(), 0))->value(); 747 return Smi::cast(GetExpression(caller_fp(), 0))->value();
737 } else { 748 } else {
738 return GetNumberOfIncomingArguments(); 749 return GetNumberOfIncomingArguments();
739 } 750 }
740 } 751 }
741 752
742 753
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1547 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1537 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1548 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1538 list.Add(frame, zone); 1549 list.Add(frame, zone);
1539 } 1550 }
1540 return list.ToVector(); 1551 return list.ToVector();
1541 } 1552 }
1542 1553
1543 1554
1544 } // namespace internal 1555 } // namespace internal
1545 } // namespace v8 1556 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698