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

Unified Diff: src/deoptimizer.cc

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization Created 6 years, 4 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/hydrogen.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 e6415f4b238360dedbebd5d89dccfc00721b6312..6b381dade9f84080493b10b15efdb5bbf8da8ebc 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -926,7 +926,7 @@ void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator,
CHECK_EQ(Translation::kSelfLiteralId, closure_id);
function = function_;
}
- unsigned height = iterator->Next();
+ unsigned height = iterator->Next() - 1; // Do not count the context.
unsigned height_in_bytes = height * kPointerSize;
if (trace_scope_ != NULL) {
PrintF(trace_scope_->file(), " translating ");
@@ -1061,12 +1061,12 @@ void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator,
Register context_reg = JavaScriptFrame::context_register();
output_offset -= kPointerSize;
input_offset -= kPointerSize;
- if (is_bottommost) {
- value = input_->GetFrameSlot(input_offset);
- } else {
- value = reinterpret_cast<intptr_t>(function->context());
- }
- output_frame->SetFrameSlot(output_offset, value);
+ // Read the context from the translations.
+ DoTranslateCommand(iterator, frame_index, output_offset);
+ value = output_frame->GetFrameSlot(output_offset);
+ // The context should not be a placeholder for a materialized object.
+ CHECK(value !=
+ reinterpret_cast<intptr_t>(isolate_->heap()->arguments_marker()));
output_frame->SetContext(value);
if (is_topmost) output_frame->SetRegister(context_reg.code(), value);
if (trace_scope_ != NULL) {
@@ -3630,6 +3630,7 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(Deoptimizer* deoptimizer,
bool has_construct_stub) {
FrameDescription* output_frame = deoptimizer->output_[frame_index];
function_ = output_frame->GetFunction();
+ context_ = reinterpret_cast<Object*>(output_frame->GetContext());
has_construct_stub_ = has_construct_stub;
expression_count_ = output_frame->GetExpressionCount();
expression_stack_ = new Object*[expression_count_];
@@ -3663,6 +3664,7 @@ DeoptimizedFrameInfo::~DeoptimizedFrameInfo() {
void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
v->VisitPointer(BitCast<Object**>(&function_));
+ v->VisitPointer(&context_);
v->VisitPointers(parameters_, parameters_ + parameters_count_);
v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
}
« no previous file with comments | « src/deoptimizer.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698