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

Unified Diff: src/deoptimizer.cc

Issue 9301030: Add GC handling for new field in DeoptimizedFrameInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 8 years, 11 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/deoptimizer.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 525ccec5bab91ee5be43811162396fd7c322672c..682eb535cefdf491e896d13020826835a077e655 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -1603,7 +1603,11 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(
SetFunction(output_frame->GetFunction());
expression_count_ = output_frame->GetExpressionCount();
expression_stack_ = new Object*[expression_count_];
- pc_ = output_frame->GetPc();
+ // Get the source position using the unoptimized code.
+ Address pc = reinterpret_cast<Address>(output_frame->GetPc());
+ Code* code = Code::cast(Isolate::Current()->heap()->FindCodeObject(pc));
+ source_position_ = code->SourcePosition(pc);
+
for (int i = 0; i < expression_count_; i++) {
SetExpression(i, output_frame->GetExpression(i));
}
@@ -1626,6 +1630,7 @@ DeoptimizedFrameInfo::~DeoptimizedFrameInfo() {
delete[] parameters_;
}
+
void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
v->VisitPointer(BitCast<Object**>(&function_));
v->VisitPointers(parameters_, parameters_ + parameters_count_);
« no previous file with comments | « src/deoptimizer.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698