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

Side by Side Diff: src/deoptimizer.cc

Issue 140683011: Improve positions tracking inside the HGraphBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 // We rely on this function not causing a GC. It is called from generated code 725 // We rely on this function not causing a GC. It is called from generated code
726 // without having a real stack frame in place. 726 // without having a real stack frame in place.
727 void Deoptimizer::DoComputeOutputFrames() { 727 void Deoptimizer::DoComputeOutputFrames() {
728 // Print some helpful diagnostic information. 728 // Print some helpful diagnostic information.
729 if (FLAG_log_timer_events && 729 if (FLAG_log_timer_events &&
730 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) { 730 compiled_code_->kind() == Code::OPTIMIZED_FUNCTION) {
731 LOG(isolate(), CodeDeoptEvent(compiled_code_)); 731 LOG(isolate(), CodeDeoptEvent(compiled_code_));
732 } 732 }
733 ElapsedTimer timer; 733 ElapsedTimer timer;
734
735 // Determine basic deoptimization information. The optimized frame is
736 // described by the input data.
737 DeoptimizationInputData* input_data =
738 DeoptimizationInputData::cast(compiled_code_->deoptimization_data());
739
734 if (trace_scope_ != NULL) { 740 if (trace_scope_ != NULL) {
735 timer.Start(); 741 timer.Start();
736 PrintF(trace_scope_->file(), 742 PrintF(trace_scope_->file(),
737 "[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ", 743 "[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ",
738 MessageFor(bailout_type_), 744 MessageFor(bailout_type_),
739 reinterpret_cast<intptr_t>(function_)); 745 reinterpret_cast<intptr_t>(function_));
740 PrintFunctionName(); 746 PrintFunctionName();
741 PrintF(trace_scope_->file(), 747 PrintF(trace_scope_->file(),
742 " @%d, FP to SP delta: %d]\n", 748 " (opt #%d) @%d, FP to SP delta: %d]\n",
749 input_data->OptimizationId()->value(),
743 bailout_id_, 750 bailout_id_,
744 fp_to_sp_delta_); 751 fp_to_sp_delta_);
745 if (bailout_type_ == EAGER || bailout_type_ == SOFT) { 752 if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
746 compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_); 753 compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
747 } 754 }
748 } 755 }
749 756
750 // Determine basic deoptimization information. The optimized frame is
751 // described by the input data.
752 DeoptimizationInputData* input_data =
753 DeoptimizationInputData::cast(compiled_code_->deoptimization_data());
754 BailoutId node_id = input_data->AstId(bailout_id_); 757 BailoutId node_id = input_data->AstId(bailout_id_);
755 ByteArray* translations = input_data->TranslationByteArray(); 758 ByteArray* translations = input_data->TranslationByteArray();
756 unsigned translation_index = 759 unsigned translation_index =
757 input_data->TranslationIndex(bailout_id_)->value(); 760 input_data->TranslationIndex(bailout_id_)->value();
758 761
759 // Do the input frame to output frame(s) translation. 762 // Do the input frame to output frame(s) translation.
760 TranslationIterator iterator(translations, translation_index); 763 TranslationIterator iterator(translations, translation_index);
761 Translation::Opcode opcode = 764 Translation::Opcode opcode =
762 static_cast<Translation::Opcode>(iterator.Next()); 765 static_cast<Translation::Opcode>(iterator.Next());
763 ASSERT(Translation::BEGIN == opcode); 766 ASSERT(Translation::BEGIN == opcode);
(...skipping 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after
3460 3463
3461 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3464 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3462 v->VisitPointer(BitCast<Object**>(&function_)); 3465 v->VisitPointer(BitCast<Object**>(&function_));
3463 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3466 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3464 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3467 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3465 } 3468 }
3466 3469
3467 #endif // ENABLE_DEBUGGER_SUPPORT 3470 #endif // ENABLE_DEBUGGER_SUPPORT
3468 3471
3469 } } // namespace v8::internal 3472 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698