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

Side by Side Diff: src/frames.cc

Issue 1884183002: First version of the new generators implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 } 1237 }
1238 1238
1239 void InterpretedFrame::PatchBytecodeArray(Object* bytecode_array) { 1239 void InterpretedFrame::PatchBytecodeArray(Object* bytecode_array) {
1240 const int index = InterpreterFrameConstants::kBytecodeArrayExpressionIndex; 1240 const int index = InterpreterFrameConstants::kBytecodeArrayExpressionIndex;
1241 DCHECK_EQ( 1241 DCHECK_EQ(
1242 InterpreterFrameConstants::kBytecodeArrayFromFp, 1242 InterpreterFrameConstants::kBytecodeArrayFromFp,
1243 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); 1243 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize);
1244 SetExpression(index, bytecode_array); 1244 SetExpression(index, bytecode_array);
1245 } 1245 }
1246 1246
1247 Object* InterpretedFrame::GetInterpreterRegister(int register_index) const { 1247 Object* InterpretedFrame::ReadInterpreterRegister(int register_index) const {
1248 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex; 1248 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex;
1249 DCHECK_EQ( 1249 DCHECK_EQ(
1250 InterpreterFrameConstants::kRegisterFilePointerFromFp, 1250 InterpreterFrameConstants::kRegisterFilePointerFromFp,
1251 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize); 1251 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize);
1252 return GetExpression(index + register_index); 1252 return GetExpression(index + register_index);
1253 } 1253 }
1254 1254
1255 void InterpretedFrame::WriteInterpreterRegister(int register_index,
1256 Object* value) {
1257 const int index = InterpreterFrameConstants::kRegisterFileExpressionIndex;
1258 DCHECK_EQ(
1259 InterpreterFrameConstants::kRegisterFilePointerFromFp,
1260 InterpreterFrameConstants::kExpressionsOffset - index * kPointerSize);
1261 return SetExpression(index + register_index, value);
1262 }
1263
1255 void InterpretedFrame::Summarize(List<FrameSummary>* functions) const { 1264 void InterpretedFrame::Summarize(List<FrameSummary>* functions) const {
1256 DCHECK(functions->length() == 0); 1265 DCHECK(functions->length() == 0);
1257 AbstractCode* abstract_code = 1266 AbstractCode* abstract_code =
1258 AbstractCode::cast(function()->shared()->bytecode_array()); 1267 AbstractCode::cast(function()->shared()->bytecode_array());
1259 FrameSummary summary(receiver(), function(), abstract_code, 1268 FrameSummary summary(receiver(), function(), abstract_code,
1260 GetBytecodeOffset(), IsConstructor()); 1269 GetBytecodeOffset(), IsConstructor());
1261 functions->Add(summary); 1270 functions->Add(summary);
1262 } 1271 }
1263 1272
1264 int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const { 1273 int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const {
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1757 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1749 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1758 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1750 list.Add(frame, zone); 1759 list.Add(frame, zone);
1751 } 1760 }
1752 return list.ToVector(); 1761 return list.ToVector();
1753 } 1762 }
1754 1763
1755 1764
1756 } // namespace internal 1765 } // namespace internal
1757 } // namespace v8 1766 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/ia32/builtins-ia32.cc » ('j') | src/interpreter/bytecode-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698