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

Unified Diff: src/frames.cc

Issue 2943002: Reimplement stack manipulations for LiveEdit (Closed)
Patch Set: follow codereview Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 67a20d3cb8d87601e256d21098ac7adb1de7e7fd..907308ecaad1ea36ed7751befa3c44317ffd7122 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -32,6 +32,7 @@
#include "scopeinfo.h"
#include "string-stream.h"
#include "top.h"
+#include "liveedit.h"
namespace v8 {
namespace internal {
@@ -558,10 +559,18 @@ void JavaScriptFrame::Print(StringStream* accumulator,
accumulator->Add("(this=%o", receiver);
+ FunctionScopeState scope_state;
+ if (LiveEdit::IsAtFrameResetPatch(this)) {
+ scope_state = FUNCTION_SCOPE_NOT_ENTERED;
+ accumulator->Add(",<no locals -- function is at restarter patch>");
+ } else {
+ scope_state = FUNCTION_SCOPE_NORMAL;
+ }
+
// Get scope information for nicer output, if possible. If code is
// NULL, or doesn't contain scope info, info will return 0 for the
// number of parameters, stack slots, or context slots.
- ScopeInfo<PreallocatedStorage> info(code);
+ ScopeInfo<PreallocatedStorage> info(code, scope_state);
// Print the parameters.
int parameters_count = ComputeParametersCount();
@@ -720,6 +729,12 @@ void StandardFrame::IterateExpressions(ObjectVisitor* v) const {
}
+void StandardFrame::SetContext(Context* context) {
+ const int offset = StandardFrameConstants::kContextOffset;
+ Memory::Object_at(fp() + offset) = context;
+}
+
+
void JavaScriptFrame::Iterate(ObjectVisitor* v) const {
IterateExpressions(v);
@@ -819,5 +834,17 @@ Vector<StackFrame*> CreateStackMap() {
return list.ToVector();
}
+int GetStackFrameObjectSize(StackFrame* frame) {
+#define FRAME_TYPE_CASE(type, field) \
+ case StackFrame::type: return sizeof(field);
+
+ switch (frame->type()) {
+ STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE)
+ default: UNREACHABLE();
+ }
+#undef FRAME_TYPE_CASE
+ return 0;
+}
+
} } // namespace v8::internal
« no previous file with comments | « src/frames.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698