Commit ed9bbc70 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Remove HandlerKindField and just encode the handlerkind as the only extra-ic-state.

R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 209b17ac
......@@ -426,8 +426,7 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
}
void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- x2 : name
// -- lr : return address
......@@ -435,7 +434,7 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, x0, x2, x3, x4, x5, x6);
......@@ -1217,8 +1216,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
}
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- x0 : value
// -- x1 : receiver
......@@ -1227,8 +1225,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, x1, x2, x3, x4, x5, x6);
......
......@@ -333,8 +333,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm,
}
void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- r2 : name
// -- lr : return address
......@@ -342,7 +341,7 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, r0, r2, r3, r4, r5, r6);
......@@ -1160,8 +1159,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
}
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- r0 : value
// -- r1 : receiver
......@@ -1170,7 +1168,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, r1, r2, r3, r4, r5, r6);
......
......@@ -882,9 +882,7 @@ class HICStub: public HydrogenCodeStub {
class HandlerStub: public HICStub {
public:
virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
virtual ExtraICState GetExtraICState() {
return Code::HandlerKindField::encode(kind());
}
virtual ExtraICState GetExtraICState() { return kind(); }
protected:
HandlerStub() : HICStub() { }
......
......@@ -947,8 +947,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
}
void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- ecx : name
// -- edx : receiver
......@@ -956,7 +955,7 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, edx, ecx, ebx, eax);
......@@ -1062,15 +1061,14 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
}
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- eax : value
// -- ecx : name
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, edx, ecx, ebx, no_reg);
......
......@@ -320,8 +320,7 @@ class LoadIC: public IC {
GenerateMiss(masm);
}
static void GenerateMiss(MacroAssembler* masm);
static void GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state);
static void GenerateMegamorphic(MacroAssembler* masm);
static void GenerateNormal(MacroAssembler* masm);
static void GenerateRuntimeGetProperty(MacroAssembler* masm);
......@@ -482,8 +481,7 @@ class StoreIC: public IC {
GenerateMiss(masm);
}
static void GenerateMiss(MacroAssembler* masm);
static void GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_ic_state);
static void GenerateMegamorphic(MacroAssembler* masm);
static void GenerateNormal(MacroAssembler* masm);
static void GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictModeFlag strict_mode);
......
......@@ -4498,11 +4498,9 @@ Code::Flags Code::ComputeMonomorphicFlags(Kind kind,
Code::Flags Code::ComputeHandlerFlags(Kind handler_kind,
ExtraICState extra_ic_state,
StubType type,
InlineCacheHolderFlag holder) {
ExtraICState extra = HandlerKindField::encode(handler_kind) | extra_ic_state;
return ComputeFlags(Code::HANDLER, MONOMORPHIC, extra, type, holder);
return ComputeFlags(Code::HANDLER, MONOMORPHIC, handler_kind, type, holder);
}
......
......@@ -5385,7 +5385,6 @@ class Code: public HeapObject {
static inline Flags ComputeHandlerFlags(
Kind handler_kind,
ExtraICState extra_ic_state = kNoExtraICState,
StubType type = NORMAL,
InlineCacheHolderFlag holder = OWN_MAP);
......@@ -5613,8 +5612,6 @@ class Code: public HeapObject {
class BackEdgesPatchedForOSRField: public BitField<bool,
kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT
class HandlerKindField: public BitField<Kind, 17, 4> {};
static const int kArgumentsBits = 16;
static const int kMaxArguments = (1 << kArgumentsBits) - 1;
......
......@@ -689,9 +689,7 @@ Handle<Code> StubCompiler::CompileLoadPreMonomorphic(Code::Flags flags) {
Handle<Code> StubCompiler::CompileLoadMegamorphic(Code::Flags flags) {
ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
ContextualMode mode = LoadIC::GetContextualMode(extra_state);
LoadIC::GenerateMegamorphic(masm(), mode);
LoadIC::GenerateMegamorphic(masm());
Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadMegamorphic");
PROFILE(isolate(),
CodeCreateEvent(Logger::LOAD_MEGAMORPHIC_TAG, *code, 0));
......@@ -733,8 +731,7 @@ Handle<Code> StubCompiler::CompileStoreGeneric(Code::Flags flags) {
Handle<Code> StubCompiler::CompileStoreMegamorphic(Code::Flags flags) {
ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
StoreIC::GenerateMegamorphic(masm(), extra_state);
StoreIC::GenerateMegamorphic(masm());
Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic");
PROFILE(isolate(),
CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0));
......@@ -1235,8 +1232,8 @@ Handle<Code> BaseLoadStoreStubCompiler::GetICCode(Code::Kind kind,
Handle<Code> BaseLoadStoreStubCompiler::GetCode(Code::Kind kind,
Code::StubType type,
Handle<Name> name) {
Code::Flags flags = Code::ComputeHandlerFlags(
kind, extra_state(), type, cache_holder_);
ASSERT_EQ(kNoExtraICState, extra_state());
Code::Flags flags = Code::ComputeHandlerFlags(kind, type, cache_holder_);
Handle<Code> code = GetCodeWithFlags(flags, name);
PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name));
JitEvent(name, code);
......
......@@ -973,8 +973,7 @@ void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) {
}
void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- rax : receiver
// -- rcx : name
......@@ -982,7 +981,7 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, rax, rcx, rbx, rdx);
......@@ -1089,8 +1088,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
}
void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
ExtraICState extra_state) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- rax : value
// -- rcx : name
......@@ -1099,7 +1097,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
// -----------------------------------
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
masm->isolate()->stub_cache()->GenerateProbe(
masm, flags, rdx, rcx, rbx, no_reg);
......
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