Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 03849aae5c600e71ef47b69719dcada0ef690fc8..e54192ee0b575b9580176eb48a7ced09aff54eed 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,53 @@ 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(); } |
| + bool call_as_method() const { return state_.call_as_method(); } |
| + bool monomorphic() const { return state_.monomorphic(); } |
| + bool args_match() const { return state_.args_match(); } |
| + bool strict_native() const { return state_.strict_native(); } |
|
Toon Verwaest
2014/03/10 13:50:44
is_strict_or_native?
mvstanton
2014/03/20 15:51:53
The move to enums addressed this satisfactorily I
|
| + |
| + static int ExtractArgcFromMinorKey(int minor_key) { |
| + return CallIC::State::ExtractArgcFromMinorKey(minor_key); |
| + } |
| + |
| + 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, bool monomorphic, |
| + bool args_match, bool strict_or_native); |
| + void GenerateMiss(MacroAssembler* masm); |
| + |
| + CallIC::State state_; |
| +}; |
| + |
| + |
| class FunctionPrototypeStub: public ICStub { |
| public: |
| explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { } |
| @@ -1586,7 +1634,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); |