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

Unified Diff: src/code-stubs.h

Issue 408193002: Move function prototype handling into a special handler rather than IC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't ensure that the IC state is monomorphic, but rather that the stubcache only contains handlers Created 6 years, 5 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/ast.h ('k') | src/hydrogen.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 973818470d9778dfc42a5efe61063d13e26a4329..f50abda45ff23227cc6d03723b62dde3d5748cfc 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -899,14 +899,26 @@ class CallIC_ArrayStub: public CallICStub {
};
-class FunctionPrototypeStub: public ICStub {
+// TODO(verwaest): Translate to hydrogen code stub.
+class FunctionPrototypeStub : public PlatformCodeStub {
public:
FunctionPrototypeStub(Isolate* isolate, Code::Kind kind)
- : ICStub(isolate, kind) { }
+ : PlatformCodeStub(isolate) {
+ bit_field_ = KindBits::encode(kind);
+ }
virtual void Generate(MacroAssembler* masm);
+ virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
+ virtual InlineCacheState GetICState() { return MONOMORPHIC; }
+ virtual ExtraICState GetExtraICState() const { return kind(); }
+
+ protected:
+ class KindBits : public BitField<Code::Kind, 0, 4> {};
+ virtual Code::Kind kind() const { return KindBits::decode(bit_field_); }
private:
virtual CodeStub::Major MajorKey() const { return FunctionPrototype; }
+ virtual int MinorKey() const { return bit_field_; }
+ int bit_field_;
};
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698