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

Unified Diff: src/frames.cc

Issue 20680002: Rebase of partial ia32 implementation of optimized try/catch (started by Kevin Millikin, continued … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix detection of CATCH frames (fixes debuger exception reporting anf breaks another assertion...). Created 7 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/frames-inl.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 5ea0fd84ca3eac49fe61cb92aeefb0dae972a066..196e4579e9a818b8f2645a3d000ebe91316fadac 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -674,8 +674,22 @@ void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const {
uint8_t* safepoint_bits = safepoint_entry.bits();
safepoint_bits += kNumSafepointRegisters >> kBitsPerByteLog2;
- // Visit the rest of the parameters.
- v->VisitPointers(parameters_base, parameters_limit);
+ // Visit the rest of the parameters and the exception handlers.
+ StackHandlerIterator handler_iterator(this, top_handler());
+ Object** next_parameter = parameters_base;
+ while (!handler_iterator.done()) {
+ // For each handler, visit the parameters down to the top of the handler
+ // and the handler itself.
+ StackHandler* handler = handler_iterator.handler();
+ Address handler_top = handler->address();
+ v->VisitPointers(next_parameter, reinterpret_cast<Object**>(handler_top));
+ handler->Iterate(v, code);
+ next_parameter =
+ reinterpret_cast<Object**>(handler_top + StackHandlerConstants::kSize);
+ handler_iterator.Advance();
+ }
+ // And visit all remaining parameters.
+ v->VisitPointers(next_parameter, parameters_limit);
// Visit pointer spill slots and locals.
for (unsigned index = 0; index < stack_slots; index++) {
@@ -719,12 +733,6 @@ int StubFrame::GetNumberOfIncomingArguments() const {
void OptimizedFrame::Iterate(ObjectVisitor* v) const {
-#ifdef DEBUG
- // Make sure that optimized frames do not contain any stack handlers.
- StackHandlerIterator it(this, top_handler());
- ASSERT(it.done());
-#endif
-
IterateCompiledFrame(v);
}
@@ -987,6 +995,7 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
BailoutId ast_id = BailoutId(it.Next());
JSFunction* function = LiteralAt(literal_array, it.Next());
it.Next(); // Skip height.
+ it.Next(); // Skip handler count.
// The translation commands are ordered and the receiver is always
// at the first position. Since we are always at a call when we need
@@ -1111,6 +1120,7 @@ void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
it.Next(); // Skip ast id.
JSFunction* function = LiteralAt(literal_array, it.Next());
it.Next(); // Skip height.
+ it.Next(); // Skip handler count;
functions->Add(function);
} else {
// Skip over operands to advance to the next opcode.
« no previous file with comments | « src/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698