Commit 38c3b71c authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[deoptimizer] Add missing tracing for arguments objects.

R=tebbi@chromium.org

Change-Id: I28cdf18616e16a681e2cab3f36263f3c09953b8b
Reviewed-on: https://chromium-review.googlesource.com/476612
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44648}
parent 0010be5b
......@@ -3429,7 +3429,8 @@ Address TranslatedState::ComputeArgumentsPosition(Address input_frame_pointer,
// objects for the fields are not read from the TranslationIterator, but instead
// created on-the-fly based on dynamic information in the optimized frame.
void TranslatedState::CreateArgumentsElementsTranslatedValues(
int frame_index, Address input_frame_pointer, bool is_rest) {
int frame_index, Address input_frame_pointer, bool is_rest,
FILE* trace_file) {
TranslatedFrame& frame = frames_[frame_index];
int length;
......@@ -3438,6 +3439,11 @@ void TranslatedState::CreateArgumentsElementsTranslatedValues(
int object_index = static_cast<int>(object_positions_.size());
int value_index = static_cast<int>(frame.values_.size());
if (trace_file != nullptr) {
PrintF(trace_file,
"arguments elements object #%d (is_rest = %d, length = %d)",
object_index, is_rest, length);
}
object_positions_.push_back({frame_index, value_index});
frame.Add(TranslatedValue::NewDeferredObject(
this, length + FixedArray::kHeaderSize / kPointerSize, object_index));
......@@ -3515,7 +3521,8 @@ int TranslatedState::CreateNextTranslatedValue(
case Translation::ARGUMENTS_ELEMENTS: {
bool is_rest = iterator->Next();
CreateArgumentsElementsTranslatedValues(frame_index, fp, is_rest);
CreateArgumentsElementsTranslatedValues(frame_index, fp, is_rest,
trace_file);
return 0;
}
......@@ -3523,6 +3530,10 @@ int TranslatedState::CreateNextTranslatedValue(
bool is_rest = iterator->Next();
int length;
ComputeArgumentsPosition(fp, is_rest, &length);
if (trace_file != nullptr) {
PrintF(trace_file, "arguments length field (is_rest = %d, length = %d)",
is_rest, length);
}
frame.Add(TranslatedValue::NewInt32(this, length));
return 0;
}
......
......@@ -322,7 +322,7 @@ class TranslatedState {
int* length);
void CreateArgumentsElementsTranslatedValues(int frame_index,
Address input_frame_pointer,
bool is_rest);
bool is_rest, FILE* trace_file);
void UpdateFromPreviouslyMaterializedObjects();
Handle<Object> MaterializeAt(int frame_index, int* value_index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment