Commit 39d121d1 authored by verwaest's avatar verwaest Committed by Commit bot

Properly set up the code flags of the turbofan interceptor stubs.

Otherwise they can't be found in the megamorphic cache, leading to repeated misses.

BUG=chromium:596825
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#35393}
parent 78049e9c
......@@ -379,12 +379,6 @@ Callable CodeFactory::SubString(Isolate* isolate) {
}
// static
Callable CodeFactory::StoreInterceptor(Isolate* isolate) {
StoreInterceptorStub stub(isolate);
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
}
// static
Callable CodeFactory::ResumeGenerator(Isolate* isolate) {
return Callable(isolate->builtins()->ResumeGeneratorTrampoline(),
......
......@@ -54,8 +54,6 @@ class CodeFactory final {
Isolate* isolate, LanguageMode mode,
InlineCacheState initialization_state);
static Callable StoreInterceptor(Isolate* isolate);
static Callable ResumeGenerator(Isolate* isolate);
static Callable CompareIC(Isolate* isolate, Token::Value op);
......
......@@ -884,6 +884,8 @@ class StoreInterceptorStub : public TurboFanCodeStub {
void GenerateAssembly(compiler::CodeStubAssembler* assember) const override;
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
ExtraICState GetExtraICState() const override { return Code::STORE_IC; }
InlineCacheState GetICState() const override { return MONOMORPHIC; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub);
......@@ -895,6 +897,8 @@ class LoadIndexedInterceptorStub : public TurboFanCodeStub {
: TurboFanCodeStub(isolate) {}
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const override { return MONOMORPHIC; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub);
......
......@@ -9,7 +9,6 @@
#include "src/api-arguments.h"
#include "src/arguments.h"
#include "src/base/bits.h"
#include "src/code-factory.h"
#include "src/codegen.h"
#include "src/conversions.h"
#include "src/execution.h"
......@@ -1520,7 +1519,8 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup,
case LookupIterator::INTERCEPTOR: {
DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined());
return CodeFactory::StoreInterceptor(isolate()).code();
StoreInterceptorStub stub(isolate());
return stub.GetCode();
}
case LookupIterator::ACCESSOR: {
......
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