Commit 8898fef8 authored by machenbach's avatar machenbach Committed by Commit bot

Reland of [ic] Don't pollute per-map code cache with CompareIC stubs....

Reland of [ic] Don't pollute per-map code cache with CompareIC stubs. (patchset #1 id:1 of https://codereview.chromium.org/2055793002/ )

Reason for revert:
Not the cause...

Original issue's description:
> Revert of [ic] Don't pollute per-map code cache with CompareIC stubs. (patchset #1 id:20001 of https://codereview.chromium.org/2053583002/ )
>
> Reason for revert:
> [Sheriff] Speculative revert. Tail call test timing out:
> https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/10014
>
> Original issue's description:
> > [ic] Don't pollute per-map code cache with CompareIC stubs.
> >
> > Given that
> > 1) because of code flags mismatch we are not able to fetch any CompareIC stub that was put into the cache (we put MONOMORPHIC stubs but query only UNINITIALIZED ones),
> > 2) it was already broken for a couple of years,
> > 3) we will not need to cache any stub once CompareIC becomes vector-based.
> >
> > Committed: https://crrev.com/172ddf4250e5c4b7510ce352631fb9f8eb291940
> > Cr-Commit-Position: refs/heads/master@{#36854}
>
> TBR=verwaest@chromium.org,jkummerow@chromium.org,ishell@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/1d2ee8fd10adbfa5d213462c46181fa1ca899a61
> Cr-Commit-Position: refs/heads/master@{#36856}

TBR=verwaest@chromium.org,jkummerow@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2051823002
Cr-Commit-Position: refs/heads/master@{#36857}
parent 1d2ee8fd
...@@ -373,40 +373,6 @@ Condition CompareICStub::GetCondition() const { ...@@ -373,40 +373,6 @@ Condition CompareICStub::GetCondition() const {
} }
void CompareICStub::AddToSpecialCache(Handle<Code> new_object) {
DCHECK(*known_map_ != NULL);
Isolate* isolate = new_object->GetIsolate();
Factory* factory = isolate->factory();
return Map::UpdateCodeCache(known_map_,
strict() ?
factory->strict_compare_ic_string() :
factory->compare_ic_string(),
new_object);
}
bool CompareICStub::FindCodeInSpecialCache(Code** code_out) {
Code::Flags flags = Code::ComputeFlags(
GetCodeKind(),
UNINITIALIZED);
Name* name = strict() ? isolate()->heap()->strict_compare_ic_string()
: isolate()->heap()->compare_ic_string();
Code* code = known_map_->LookupInCodeCache(name, flags);
if (code != nullptr) {
*code_out = code;
#ifdef DEBUG
CompareICStub decode((*code_out)->stub_key(), isolate());
DCHECK(op() == decode.op());
DCHECK(left() == decode.left());
DCHECK(right() == decode.right());
DCHECK(state() == decode.state());
#endif
return true;
}
return false;
}
void CompareICStub::Generate(MacroAssembler* masm) { void CompareICStub::Generate(MacroAssembler* masm) {
switch (state()) { switch (state()) {
case CompareICState::UNINITIALIZED: case CompareICState::UNINITIALIZED:
......
...@@ -2028,8 +2028,9 @@ class CompareICStub : public PlatformCodeStub { ...@@ -2028,8 +2028,9 @@ class CompareICStub : public PlatformCodeStub {
bool strict() const { return op() == Token::EQ_STRICT; } bool strict() const { return op() == Token::EQ_STRICT; }
Condition GetCondition() const; Condition GetCondition() const;
void AddToSpecialCache(Handle<Code> new_object) override; // Although we don't cache anything in the special cache we have to define
bool FindCodeInSpecialCache(Code** code_out) override; // this predicate to avoid appearance of code stubs with embedded maps in
// the global stub cache.
bool UseSpecialCache() override { bool UseSpecialCache() override {
return state() == CompareICState::KNOWN_RECEIVER; return state() == CompareICState::KNOWN_RECEIVER;
} }
......
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