[deoptimizer] Fixes to printing, remove unused parameters.

Review URL: https://codereview.chromium.org/1425143008

Cr-Commit-Position: refs/heads/master@{#31870}
This commit is contained in:
jarin 2015-11-08 22:07:41 -08:00 committed by Commit bot
parent ab1d270a72
commit aea89b93d2
2 changed files with 17 additions and 27 deletions

View File

@ -760,23 +760,23 @@ void Deoptimizer::DoComputeOutputFrames() {
int frame_index = static_cast<int>(i); int frame_index = static_cast<int>(i);
switch (translated_state_.frames()[i].kind()) { switch (translated_state_.frames()[i].kind()) {
case TranslatedFrame::kFunction: case TranslatedFrame::kFunction:
DoComputeJSFrame(nullptr, frame_index); DoComputeJSFrame(frame_index);
jsframe_count_++; jsframe_count_++;
break; break;
case TranslatedFrame::kArgumentsAdaptor: case TranslatedFrame::kArgumentsAdaptor:
DoComputeArgumentsAdaptorFrame(nullptr, frame_index); DoComputeArgumentsAdaptorFrame(frame_index);
break; break;
case TranslatedFrame::kConstructStub: case TranslatedFrame::kConstructStub:
DoComputeConstructStubFrame(nullptr, frame_index); DoComputeConstructStubFrame(frame_index);
break; break;
case TranslatedFrame::kGetter: case TranslatedFrame::kGetter:
DoComputeAccessorStubFrame(nullptr, frame_index, false); DoComputeAccessorStubFrame(frame_index, false);
break; break;
case TranslatedFrame::kSetter: case TranslatedFrame::kSetter:
DoComputeAccessorStubFrame(nullptr, frame_index, true); DoComputeAccessorStubFrame(frame_index, true);
break; break;
case TranslatedFrame::kCompiledStub: case TranslatedFrame::kCompiledStub:
DoComputeCompiledStubFrame(nullptr, frame_index); DoComputeCompiledStubFrame(frame_index);
break; break;
case TranslatedFrame::kInvalid: case TranslatedFrame::kInvalid:
FATAL("invalid frame"); FATAL("invalid frame");
@ -806,8 +806,7 @@ void Deoptimizer::DoComputeOutputFrames() {
} }
void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator, void Deoptimizer::DoComputeJSFrame(int frame_index) {
int frame_index) {
TranslatedFrame* translated_frame = TranslatedFrame* translated_frame =
&(translated_state_.frames()[frame_index]); &(translated_state_.frames()[frame_index]);
TranslatedFrame::iterator value_iterator = translated_frame->begin(); TranslatedFrame::iterator value_iterator = translated_frame->begin();
@ -1023,8 +1022,7 @@ void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator,
} }
void Deoptimizer::DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator, void Deoptimizer::DoComputeArgumentsAdaptorFrame(int frame_index) {
int frame_index) {
TranslatedFrame* translated_frame = TranslatedFrame* translated_frame =
&(translated_state_.frames()[frame_index]); &(translated_state_.frames()[frame_index]);
TranslatedFrame::iterator value_iterator = translated_frame->begin(); TranslatedFrame::iterator value_iterator = translated_frame->begin();
@ -1130,8 +1128,7 @@ void Deoptimizer::DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator,
} }
void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator, void Deoptimizer::DoComputeConstructStubFrame(int frame_index) {
int frame_index) {
TranslatedFrame* translated_frame = TranslatedFrame* translated_frame =
&(translated_state_.frames()[frame_index]); &(translated_state_.frames()[frame_index]);
TranslatedFrame::iterator value_iterator = translated_frame->begin(); TranslatedFrame::iterator value_iterator = translated_frame->begin();
@ -1266,8 +1263,7 @@ void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator,
} }
void Deoptimizer::DoComputeAccessorStubFrame(TranslationIterator* iterator, void Deoptimizer::DoComputeAccessorStubFrame(int frame_index,
int frame_index,
bool is_setter_stub_frame) { bool is_setter_stub_frame) {
TranslatedFrame* translated_frame = TranslatedFrame* translated_frame =
&(translated_state_.frames()[frame_index]); &(translated_state_.frames()[frame_index]);
@ -1392,8 +1388,7 @@ void Deoptimizer::DoComputeAccessorStubFrame(TranslationIterator* iterator,
} }
void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator, void Deoptimizer::DoComputeCompiledStubFrame(int frame_index) {
int frame_index) {
// //
// FROM TO // FROM TO
// | .... | | .... | // | .... | | .... |
@ -2706,7 +2701,7 @@ TranslatedFrame TranslatedState::CreateNextTranslatedFrame(
PrintF(trace_file, " reading input frame %s", name.get()); PrintF(trace_file, " reading input frame %s", name.get());
int arg_count = shared_info->internal_formal_parameter_count() + 1; int arg_count = shared_info->internal_formal_parameter_count() + 1;
PrintF(trace_file, " => node=%d, args=%d, height=%d; inputs:\n", PrintF(trace_file, " => node=%d, args=%d, height=%d; inputs:\n",
arg_count, node_id.ToInt(), height); node_id.ToInt(), arg_count, height);
} }
return TranslatedFrame::JSFrame(node_id, shared_info, height); return TranslatedFrame::JSFrame(node_id, shared_info, height);
} }

View File

@ -586,16 +586,11 @@ class Deoptimizer : public Malloced {
void DeleteFrameDescriptions(); void DeleteFrameDescriptions();
void DoComputeOutputFrames(); void DoComputeOutputFrames();
void DoComputeJSFrame(TranslationIterator* iterator, int frame_index); void DoComputeJSFrame(int frame_index);
void DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator, void DoComputeArgumentsAdaptorFrame(int frame_index);
int frame_index); void DoComputeConstructStubFrame(int frame_index);
void DoComputeConstructStubFrame(TranslationIterator* iterator, void DoComputeAccessorStubFrame(int frame_index, bool is_setter_stub_frame);
int frame_index); void DoComputeCompiledStubFrame(int frame_index);
void DoComputeAccessorStubFrame(TranslationIterator* iterator,
int frame_index,
bool is_setter_stub_frame);
void DoComputeCompiledStubFrame(TranslationIterator* iterator,
int frame_index);
void WriteTranslatedValueToOutput( void WriteTranslatedValueToOutput(
TranslatedFrame::iterator* iterator, int* input_index, int frame_index, TranslatedFrame::iterator* iterator, int* input_index, int frame_index,