Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: src/code-stubs.h

Issue 226233002: Revert "Reland of https://codereview.chromium.org/172523002/" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 41431d16691338a1dd99b0e8818f04fb0d21ff1e..5a88942330e7d8cabbc446ee4d8d96ac87159b72 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -51,7 +51,6 @@ namespace internal {
V(CompareIC) \
V(CompareNilIC) \
V(MathPow) \
- V(CallIC) \
V(FunctionPrototype) \
V(RecordWrite) \
V(StoreBufferOverflow) \
@@ -840,59 +839,6 @@ class ICStub: public PlatformCodeStub {
};
-class CallICStub: public PlatformCodeStub {
- public:
- explicit CallICStub(const CallIC::State& state)
- : state_(state) {}
-
- bool CallAsMethod() const { return state_.CallAsMethod(); }
- bool IsGeneric() const {
- return state_.IsGeneric();
- }
- bool ArgumentsMustMatch() const {
- return state_.ArgumentsMustMatch();
- }
- bool IsSloppy() const {
- return state_.IsSloppy();
- }
-
- int arg_count() const { return state_.arg_count(); }
-
- 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();
- }
-
- 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 GenerateMonomorphicCall(MacroAssembler* masm);
- void GenerateSlowCall(MacroAssembler* masm);
- void GenerateMiss(MacroAssembler* masm);
-
- CallIC::State state_;
-};
-
-
class FunctionPrototypeStub: public ICStub {
public:
explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { }
@@ -1684,6 +1630,10 @@ class CallFunctionStub: public PlatformCodeStub {
void Generate(MacroAssembler* masm);
+ virtual void FinishCode(Handle<Code> code) {
+ code->set_has_function_cache(RecordCallTarget());
+ }
+
static int ExtractArgcFromMinorKey(int minor_key) {
return ArgcBits::decode(minor_key);
}
@@ -1704,6 +1654,10 @@ class CallFunctionStub: public PlatformCodeStub {
return FlagBits::encode(flags_) | ArgcBits::encode(argc_);
}
+ bool RecordCallTarget() {
+ return flags_ == RECORD_CALL_TARGET;
+ }
+
bool CallAsMethod() {
return flags_ == CALL_AS_METHOD || flags_ == WRAP_AND_CALL;
}
@@ -1716,7 +1670,7 @@ class CallFunctionStub: public PlatformCodeStub {
class CallConstructStub: public PlatformCodeStub {
public:
- explicit CallConstructStub(CallConstructorFlags flags) : flags_(flags) {}
+ explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {}
void Generate(MacroAssembler* masm);
@@ -1725,7 +1679,7 @@ class CallConstructStub: public PlatformCodeStub {
}
private:
- CallConstructorFlags flags_;
+ CallFunctionFlags flags_;
virtual void PrintName(StringStream* stream);
@@ -1733,7 +1687,11 @@ class CallConstructStub: public PlatformCodeStub {
int MinorKey() { return flags_; }
bool RecordCallTarget() {
- return (flags_ & RECORD_CONSTRUCTOR_TARGET) != 0;
+ return (flags_ & RECORD_CALL_TARGET) != 0;
+ }
+
+ bool CallAsMethod() {
+ return (flags_ & CALL_AS_METHOD) != 0;
}
};
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698