Commit 0f3b19f4 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[ic] Remove obsolete IC::FrameDepth.

The CallIC class is obsolete and unused for a long time, and the
IC::FrameDepth was only there to support the additional frame
that was imposed by the CallFunctionStub. All of that is long gone, so
we don't need that here.

Bug: v8:7754
Change-Id: Ic82f68b325e3e10e285e30111053ffffd547f965
Reviewed-on: https://chromium-review.googlesource.com/1061354Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53206}
parent 1950cf7f
......@@ -148,9 +148,7 @@ void IC::TraceIC(const char* type, Handle<Object> name, State old_state,
ICStats::instance()->End();
}
IC::IC(FrameDepth depth, Isolate* isolate, Handle<FeedbackVector> vector,
FeedbackSlot slot)
IC::IC(Isolate* isolate, Handle<FeedbackVector> vector, FeedbackSlot slot)
: isolate_(isolate),
vector_set_(false),
kind_(FeedbackSlotKind::kInvalid),
......@@ -169,21 +167,9 @@ IC::IC(FrameDepth depth, Isolate* isolate, Handle<FeedbackVector> vector,
Address* pc_address =
reinterpret_cast<Address*>(entry + ExitFrameConstants::kCallerPCOffset);
Address fp = Memory::Address_at(entry + ExitFrameConstants::kCallerFPOffset);
// If there's another JavaScript frame on the stack we need to look one frame
// further down the stack to find the frame pointer and the return address
// stack slot.
if (depth == EXTRA_CALL_FRAME) {
if (FLAG_enable_embedded_constant_pool) {
constant_pool = reinterpret_cast<Address*>(
fp + StandardFrameConstants::kConstantPoolOffset);
}
const int kCallerPCOffset = StandardFrameConstants::kCallerPCOffset;
pc_address = reinterpret_cast<Address*>(fp + kCallerPCOffset);
fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset);
}
#ifdef DEBUG
StackFrameIterator it(isolate);
for (int i = 0; i < depth + 1; i++) it.Advance();
for (int i = 0; i < 1; i++) it.Advance();
StackFrame* frame = it.frame();
DCHECK(fp == frame->fp() && pc_address == frame->pc_address());
#endif
......
......@@ -27,10 +27,6 @@ class IC {
// Alias the inline cache state type to make the IC code more readable.
typedef InlineCacheState State;
// The IC code is either invoked with no extra frames on the stack
// or with a single extra frame for supporting calls.
enum FrameDepth { NO_EXTRA_FRAME = 0, EXTRA_CALL_FRAME = 1 };
static constexpr int kMaxKeyedPolymorphism = 4;
// A polymorphic IC can handle at most 4 distinct maps before transitioning
......@@ -39,8 +35,7 @@ class IC {
// Construct the IC structure with the given number of extra
// JavaScript frames on the stack.
IC(FrameDepth depth, Isolate* isolate, Handle<FeedbackVector> vector,
FeedbackSlot slot);
IC(Isolate* isolate, Handle<FeedbackVector> vector, FeedbackSlot slot);
virtual ~IC() {}
State state() const { return state_; }
......@@ -216,17 +211,10 @@ class IC {
};
class CallIC : public IC {
public:
CallIC(Isolate* isolate, Handle<FeedbackVector> vector, FeedbackSlot slot)
: IC(EXTRA_CALL_FRAME, isolate, vector, slot) {}
};
class LoadIC : public IC {
public:
LoadIC(Isolate* isolate, Handle<FeedbackVector> vector, FeedbackSlot slot)
: IC(NO_EXTRA_FRAME, isolate, vector, slot) {
: IC(isolate, vector, slot) {
DCHECK(IsAnyLoad());
}
......@@ -305,7 +293,7 @@ class KeyedLoadIC : public LoadIC {
class StoreIC : public IC {
public:
StoreIC(Isolate* isolate, Handle<FeedbackVector> vector, FeedbackSlot slot)
: IC(NO_EXTRA_FRAME, isolate, vector, slot) {
: IC(isolate, vector, slot) {
DCHECK(IsAnyStore());
}
......
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