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 <memory> | 7 #include <memory> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 frame->GetParameter(i)->ShortPrint(file); | 1050 frame->GetParameter(i)->ShortPrint(file); |
1051 } | 1051 } |
1052 PrintF(file, ")"); | 1052 PrintF(file, ")"); |
1053 } | 1053 } |
1054 break; | 1054 break; |
1055 } | 1055 } |
1056 it.Advance(); | 1056 it.Advance(); |
1057 } | 1057 } |
1058 } | 1058 } |
1059 | 1059 |
1060 | |
1061 void JavaScriptFrame::SaveOperandStack(FixedArray* store) const { | |
1062 int operands_count = store->length(); | |
1063 DCHECK_LE(operands_count, ComputeOperandsCount()); | |
1064 for (int i = 0; i < operands_count; i++) { | |
1065 store->set(i, GetOperand(i)); | |
1066 } | |
1067 } | |
1068 | |
1069 Object* JavaScriptFrame::GetParameter(int index) const { | 1060 Object* JavaScriptFrame::GetParameter(int index) const { |
1070 return Memory::Object_at(GetParameterSlot(index)); | 1061 return Memory::Object_at(GetParameterSlot(index)); |
1071 } | 1062 } |
1072 | 1063 |
1073 int JavaScriptFrame::ComputeParametersCount() const { | 1064 int JavaScriptFrame::ComputeParametersCount() const { |
1074 return GetNumberOfIncomingArguments(); | 1065 return GetNumberOfIncomingArguments(); |
1075 } | 1066 } |
1076 | 1067 |
1077 namespace { | 1068 namespace { |
1078 | 1069 |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1988 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1979 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1989 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1980 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1990 list.Add(frame, zone); | 1981 list.Add(frame, zone); |
1991 } | 1982 } |
1992 return list.ToVector(); | 1983 return list.ToVector(); |
1993 } | 1984 } |
1994 | 1985 |
1995 | 1986 |
1996 } // namespace internal | 1987 } // namespace internal |
1997 } // namespace v8 | 1988 } // namespace v8 |
OLD | NEW |