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

Unified Diff: src/frames.cc

Issue 11528003: Re-land Crankshaft-generated KeyedLoad stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits Created 8 years 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
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index cb9ffba8c913a47d6d7ac09e664ceb1e4de4dd5e..e46c9d4dd1571bc65b01baa7802e92ac495664d5 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -617,28 +617,22 @@ bool StandardFrame::IsExpressionInsideHandler(int n) const {
}
-void CompiledFrame::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
-
+void IterateCompiledFrame(const StandardFrame* frame, ObjectVisitor* v) {
// Make sure that we're not doing "safe" stack frame iteration. We cannot
// possibly find pointers in optimized frames in that state.
- ASSERT(!SafeStackFrameIterator::is_active(isolate()));
+ ASSERT(!SafeStackFrameIterator::is_active(frame->isolate()));
// Compute the safepoint information.
unsigned stack_slots = 0;
SafepointEntry safepoint_entry;
Code* code = StackFrame::GetSafepointData(
- isolate(), pc(), &safepoint_entry, &stack_slots);
+ frame->isolate(), frame->pc(), &safepoint_entry, &stack_slots);
unsigned slot_space = stack_slots * kPointerSize;
// Visit the outgoing parameters.
- Object** parameters_base = &Memory::Object_at(sp());
+ Object** parameters_base = &Memory::Object_at(frame->sp());
Object** parameters_limit = &Memory::Object_at(
- fp() + JavaScriptFrameConstants::kFunctionOffset - slot_space);
+ frame->fp() + JavaScriptFrameConstants::kFunctionOffset - slot_space);
// Visit the parameters that may be on top of the saved registers.
if (safepoint_entry.argument_count() > 0) {
@@ -682,17 +676,38 @@ void CompiledFrame::Iterate(ObjectVisitor* v) const {
}
// Visit the return address in the callee and incoming arguments.
- IteratePc(v, pc_address(), code);
+ frame->IteratePc(v, frame->pc_address(), code);
}
void StubFrame::Iterate(ObjectVisitor* v) const {
- CompiledFrame::Iterate(v);
+ IterateCompiledFrame(this, v);
+}
+
+
+Code* StubFrame::unchecked_code() const {
+ return static_cast<Code*>(isolate()->heap()->FindCodeObject(pc()));
+}
+
+
+Address StubFrame::GetCallerStackPointer() const {
+ return fp() + ExitFrameConstants::kCallerSPDisplacement;
+}
+
+
+int StubFrame::GetNumberOfIncomingArguments() const {
+ return 0;
}
void OptimizedFrame::Iterate(ObjectVisitor* v) const {
- CompiledFrame::Iterate(v);
+#ifdef DEBUG
+ // Make sure that optimized frames do not contain any stack handlers.
+ StackHandlerIterator it(this, top_handler());
+ ASSERT(it.done());
+#endif
+
+ IterateCompiledFrame(this, v);
// Visit the context and the function.
Object** fixed_base = &Memory::Object_at(

Powered by Google App Engine
This is Rietveld 408576698