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

Side by Side Diff: src/frames.cc

Issue 1990803005: [runtime] set AsyncFunctionNext/Throw to adapt arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rework to support all functions without arguments adapter frames Created 4 years, 7 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
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/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 827
828 Code* JavaScriptFrame::unchecked_code() const { 828 Code* JavaScriptFrame::unchecked_code() const {
829 return function()->code(); 829 return function()->code();
830 } 830 }
831 831
832 832
833 int JavaScriptFrame::GetNumberOfIncomingArguments() const { 833 int JavaScriptFrame::GetNumberOfIncomingArguments() const {
834 DCHECK(can_access_heap_objects() && 834 DCHECK(can_access_heap_objects() &&
835 isolate()->heap()->gc_state() == Heap::NOT_IN_GC); 835 isolate()->heap()->gc_state() == Heap::NOT_IN_GC);
836 836
837 return function()->shared()->internal_formal_parameter_count(); 837 int param_count = function()->shared()->internal_formal_parameter_count();
838 if (param_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel) {
839 param_count = function()->shared()->length();
840 }
841 return param_count;
Dan Ehrenberg 2016/05/18 18:58:02 Why is this change needed?
caitp (gmail) 2016/05/18 19:03:43 for anything with DontAdaptArguments() called on t
838 } 842 }
839 843
840 844
841 Address JavaScriptFrame::GetCallerStackPointer() const { 845 Address JavaScriptFrame::GetCallerStackPointer() const {
842 return fp() + StandardFrameConstants::kCallerSPOffset; 846 return fp() + StandardFrameConstants::kCallerSPOffset;
843 } 847 }
844 848
845 849
846 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) const { 850 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) const {
847 DCHECK(functions->length() == 0); 851 DCHECK(functions->length() == 0);
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1796 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1793 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1797 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1794 list.Add(frame, zone); 1798 list.Add(frame, zone);
1795 } 1799 }
1796 return list.ToVector(); 1800 return list.ToVector();
1797 } 1801 }
1798 1802
1799 1803
1800 } // namespace internal 1804 } // namespace internal
1801 } // namespace v8 1805 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698