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/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 const int index = InterpreterFrameConstants::kBytecodeArrayExpressionIndex; | 1246 const int index = InterpreterFrameConstants::kBytecodeArrayExpressionIndex; |
1247 DCHECK_EQ( | 1247 DCHECK_EQ( |
1248 InterpreterFrameConstants::kBytecodeArrayFromFp, | 1248 InterpreterFrameConstants::kBytecodeArrayFromFp, |
1249 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); | 1249 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); |
1250 SetExpression(index, bytecode_array); | 1250 SetExpression(index, bytecode_array); |
1251 } | 1251 } |
1252 | 1252 |
1253 Object* InterpretedFrame::ReadInterpreterRegister(int register_index) const { | 1253 Object* InterpretedFrame::ReadInterpreterRegister(int register_index) const { |
1254 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex; | 1254 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex; |
1255 DCHECK_EQ( | 1255 DCHECK_EQ( |
1256 InterpreterFrameConstants::kRegisterFilePointerFromFp, | 1256 InterpreterFrameConstants::kRegisterFileFromFp, |
1257 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); | 1257 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); |
1258 return GetExpression(index + register_index); | 1258 return GetExpression(index + register_index); |
1259 } | 1259 } |
1260 | 1260 |
1261 void InterpretedFrame::WriteInterpreterRegister(int register_index, | 1261 void InterpretedFrame::WriteInterpreterRegister(int register_index, |
1262 Object* value) { | 1262 Object* value) { |
1263 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex; | 1263 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex; |
1264 DCHECK_EQ( | 1264 DCHECK_EQ( |
1265 InterpreterFrameConstants::kRegisterFilePointerFromFp, | 1265 InterpreterFrameConstants::kRegisterFileFromFp, |
1266 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); | 1266 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); |
1267 return SetExpression(index + register_index, value); | 1267 return SetExpression(index + register_index, value); |
1268 } | 1268 } |
1269 | 1269 |
1270 void InterpretedFrame::Summarize(List<FrameSummary>* functions) const { | 1270 void InterpretedFrame::Summarize(List<FrameSummary>* functions) const { |
1271 DCHECK(functions->length() == 0); | 1271 DCHECK(functions->length() == 0); |
1272 AbstractCode* abstract_code = | 1272 AbstractCode* abstract_code = |
1273 AbstractCode::cast(function()->shared()->bytecode_array()); | 1273 AbstractCode::cast(function()->shared()->bytecode_array()); |
1274 FrameSummary summary(receiver(), function(), abstract_code, | 1274 FrameSummary summary(receiver(), function(), abstract_code, |
1275 GetBytecodeOffset(), IsConstructor()); | 1275 GetBytecodeOffset(), IsConstructor()); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1763 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1764 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1764 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1765 list.Add(frame, zone); | 1765 list.Add(frame, zone); |
1766 } | 1766 } |
1767 return list.ToVector(); | 1767 return list.ToVector(); |
1768 } | 1768 } |
1769 | 1769 |
1770 | 1770 |
1771 } // namespace internal | 1771 } // namespace internal |
1772 } // namespace v8 | 1772 } // namespace v8 |
OLD | NEW |