| Index: src/code-stubs.h
|
| diff --git a/src/code-stubs.h b/src/code-stubs.h
|
| index 03849aae5c600e71ef47b69719dcada0ef690fc8..d5e3bb0482ea5d316266dfd4f9d06a9c31bd4567 100644
|
| --- a/src/code-stubs.h
|
| +++ b/src/code-stubs.h
|
| @@ -52,6 +52,7 @@ namespace internal {
|
| V(CompareNilIC) \
|
| V(MathPow) \
|
| V(StringLength) \
|
| + V(CallIC) \
|
| V(FunctionPrototype) \
|
| V(StoreArrayLength) \
|
| V(RecordWrite) \
|
| @@ -824,6 +825,59 @@ class ICStub: public PlatformCodeStub {
|
| };
|
|
|
|
|
| +class CallICStub: public PlatformCodeStub {
|
| + public:
|
| + explicit CallICStub(const CallIC::State& state)
|
| + : state_(state) {}
|
| +
|
| + int arg_count() const { return state_.arg_count(); }
|
| + CallIC::CallType call_type() const { return state_.call_type(); }
|
| + CallIC::StubType stub_type() const { return state_.stub_type(); }
|
| + CallIC::ArgumentCheck argument_check() const {
|
| + return state_.argument_check();
|
| + }
|
| + CallIC::FunctionAttributes function_attributes() const {
|
| + return state_.function_attributes();
|
| + }
|
| +
|
| + static int ExtractArgcFromMinorKey(int minor_key) {
|
| + CallIC::State state((ExtraICState) minor_key);
|
| + return state.arg_count();
|
| + }
|
| +
|
| + virtual void Generate(MacroAssembler* masm);
|
| +
|
| + virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
|
| + return Code::CALL_IC;
|
| + }
|
| +
|
| + virtual InlineCacheState GetICState() V8_FINAL V8_OVERRIDE {
|
| + return state_.GetICState();
|
| + }
|
| +
|
| + virtual ExtraICState GetExtraICState() V8_FINAL V8_OVERRIDE {
|
| + return state_.GetExtraICState();
|
| + }
|
| +
|
| + static void GenerateAheadOfTime(Isolate* isolate);
|
| +
|
| + protected:
|
| + virtual int MinorKey() { return GetExtraICState(); }
|
| + virtual void PrintState(StringStream* stream) V8_FINAL V8_OVERRIDE;
|
| +
|
| + private:
|
| + virtual CodeStub::Major MajorKey() { return CallIC; }
|
| +
|
| + // Code generation helpers.
|
| + void GenerateCall(MacroAssembler* masm, CallIC::StubType stub_type,
|
| + CallIC::ArgumentCheck argument_check,
|
| + CallIC::FunctionAttributes attributes);
|
| + void GenerateMiss(MacroAssembler* masm);
|
| +
|
| + CallIC::State state_;
|
| +};
|
| +
|
| +
|
| class FunctionPrototypeStub: public ICStub {
|
| public:
|
| explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { }
|
| @@ -1586,7 +1640,10 @@ class RegExpConstructResultStub V8_FINAL : public HydrogenCodeStub {
|
| class CallFunctionStub: public PlatformCodeStub {
|
| public:
|
| CallFunctionStub(int argc, CallFunctionFlags flags)
|
| - : argc_(argc), flags_(flags) { }
|
| + : argc_(argc), flags_(flags) {
|
| + // CallFunctionStub no longer supports RECORD_CALL_TARGET.
|
| + ASSERT(flags != RECORD_CALL_TARGET);
|
| + }
|
|
|
| void Generate(MacroAssembler* masm);
|
|
|
|
|