Commit 6de51c4d authored by jarin's avatar jarin Committed by Commit bot

Remove the JS_FRAME_FUNCTION deoptimizer translation.

JS_FRAME_FUNCTION can be expressed using the STACK_SLOT translation.

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

Cr-Commit-Position: refs/heads/master@{#33882}
parent f6db0566
......@@ -2360,14 +2360,13 @@ void Translation::StoreArgumentsObject(bool args_known,
void Translation::StoreJSFrameFunction() {
buffer_->Add(JS_FRAME_FUNCTION, zone());
StoreStackSlot((StandardFrameConstants::kCallerPCOffset -
StandardFrameConstants::kMarkerOffset) /
kPointerSize);
}
int Translation::NumberOfOperandsFor(Opcode opcode) {
switch (opcode) {
case JS_FRAME_FUNCTION:
return 0;
case GETTER_STUB_FRAME:
case SETTER_STUB_FRAME:
case DUPLICATED_OBJECT:
......@@ -3060,7 +3059,6 @@ TranslatedFrame TranslatedState::CreateNextTranslatedFrame(
case Translation::BOOL_STACK_SLOT:
case Translation::DOUBLE_STACK_SLOT:
case Translation::LITERAL:
case Translation::JS_FRAME_FUNCTION:
break;
}
FATAL("We should never get here - unexpected deopt info.");
......@@ -3263,16 +3261,6 @@ TranslatedValue TranslatedState::CreateNextTranslatedValue(
return TranslatedValue::NewTagged(this, value);
}
case Translation::JS_FRAME_FUNCTION: {
int slot_offset = JavaScriptFrameConstants::kFunctionOffset;
intptr_t value = *(reinterpret_cast<intptr_t*>(fp + slot_offset));
if (trace_file != nullptr) {
PrintF(trace_file, "0x%08" V8PRIxPTR " ; (frame function) ", value);
reinterpret_cast<Object*>(value)->ShortPrint(trace_file);
}
return TranslatedValue::NewTagged(this, reinterpret_cast<Object*>(value));
}
}
FATAL("We should never get here - unexpected deopt info.");
......
......@@ -953,7 +953,6 @@ class TranslationIterator BASE_EMBEDDED {
int index_;
};
#define TRANSLATION_OPCODE_LIST(V) \
V(BEGIN) \
V(JS_FRAME) \
......@@ -976,9 +975,7 @@ class TranslationIterator BASE_EMBEDDED {
V(UINT32_STACK_SLOT) \
V(BOOL_STACK_SLOT) \
V(DOUBLE_STACK_SLOT) \
V(LITERAL) \
V(JS_FRAME_FUNCTION)
V(LITERAL)
class Translation BASE_EMBEDDED {
public:
......
......@@ -969,11 +969,9 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
JSFunction* function;
if (opcode == Translation::LITERAL) {
function = JSFunction::cast(literal_array->get(it.Next()));
} else if (opcode == Translation::STACK_SLOT) {
function = JSFunction::cast(StackSlotAt(it.Next()));
} else {
CHECK_EQ(Translation::JS_FRAME_FUNCTION, opcode);
function = this->function();
CHECK_EQ(opcode, Translation::STACK_SLOT);
function = JSFunction::cast(StackSlotAt(it.Next()));
}
DCHECK_EQ(shared_info, function->shared());
......@@ -987,8 +985,6 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
receiver = literal_array->get(it.Next());
} else if (opcode == Translation::STACK_SLOT) {
receiver = StackSlotAt(it.Next());
} else if (opcode == Translation::JS_FRAME_FUNCTION) {
receiver = this->function();
} else {
// The receiver is not in a stack slot nor in a literal. We give up.
it.Skip(Translation::NumberOfOperandsFor(opcode));
......@@ -1112,11 +1108,9 @@ void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const {
Object* function;
if (opcode == Translation::LITERAL) {
function = literal_array->get(it.Next());
} else if (opcode == Translation::STACK_SLOT) {
function = StackSlotAt(it.Next());
} else {
CHECK_EQ(Translation::JS_FRAME_FUNCTION, opcode);
function = this->function();
CHECK_EQ(Translation::STACK_SLOT, opcode);
function = StackSlotAt(it.Next());
}
functions->Add(JSFunction::cast(function));
}
......
......@@ -14842,11 +14842,6 @@ void DeoptimizationInputData::DeoptimizationInputDataPrint(
break;
}
case Translation::JS_FRAME_FUNCTION: {
os << "{function}";
break;
}
case Translation::COMPILED_STUB_FRAME: {
Code::Kind stub_kind = static_cast<Code::Kind>(iterator.Next());
os << "{kind=" << stub_kind << "}";
......
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