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

Unified Diff: src/frames.cc

Issue 7523027: Provisional implementation of stack allocated catch variables. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/ast-inl.h ('k') | src/full-codegen.cc » ('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 bebd10a8060945cd50ea80c0fc03a08ede221206..16fef9202df3afab80905a0d62db7bab7e04cd87 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -988,6 +988,7 @@ void JavaScriptFrame::Print(StringStream* accumulator,
// Compute the number of locals and expression stack elements.
int stack_locals_count = info.number_of_stack_slots();
+ int first_stack_index = info.first_stack_index();
int heap_locals_count = info.number_of_context_slots();
int expressions_count = ComputeExpressionsCount();
@@ -999,8 +1000,8 @@ void JavaScriptFrame::Print(StringStream* accumulator,
accumulator->Add(" var ");
accumulator->PrintName(*info.stack_slot_name(i));
accumulator->Add(" = ");
- if (i < expressions_count) {
- accumulator->Add("%o", GetExpression(i));
+ if (i + first_stack_index < expressions_count) {
+ accumulator->Add("%o", GetExpression(i + first_stack_index));
} else {
accumulator->Add("// no expression found - inconsistent frame?");
}
« no previous file with comments | « src/ast-inl.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698