Commit 2d566c71 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Merge UpdateStoreCaches into a single function dispatching on...

Merge UpdateStoreCaches into a single function dispatching on ComputeStoreMonorphic and UpdateMegamorphicCache.

Review URL: https://chromiumcodereview.appspot.com/12057003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a7e88a34
This diff is collapsed.
......@@ -165,6 +165,21 @@ class IC {
static inline void SetTargetAtAddress(Address address, Code* target);
static void PostPatching(Address address, Code* target, Code* old_target);
void PatchCache(State state,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name,
Handle<Code> code);
virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code);
virtual Handle<Code> megamorphic_stub() {
UNREACHABLE();
return Handle<Code>::null();
}
virtual Handle<Code> megamorphic_stub_strict() {
UNREACHABLE();
return Handle<Code>::null();
}
private:
// Frame pointer for the frame that uses (calls) the IC.
Address fp_;
......@@ -361,7 +376,6 @@ class LoadIC: public IC {
virtual Handle<Code> ComputeLoadMonomorphic(LookupResult* lookup,
Handle<JSObject> receiver,
Handle<String> name);
virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code);
private:
// Stub accessors.
......@@ -502,12 +516,19 @@ class StoreIC: public IC {
// Update the inline cache and the global stub cache based on the
// lookup result.
virtual void UpdateStoreCaches(LookupResult* lookup,
State state,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name,
Handle<Object> value);
void UpdateCaches(LookupResult* lookup,
State state,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name,
Handle<Object> value);
// Compute the code stub for this store; used for rewriting to
// monomorphic state and making sure that the code stub is in the
// stub cache.
virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name);
private:
void set_target(Code* code) {
......@@ -607,13 +628,11 @@ class KeyedStoreIC: public StoreIC {
protected:
virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; }
// Update the inline cache.
virtual void UpdateStoreCaches(LookupResult* lookup,
State state,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name,
Handle<Object> value);
virtual Handle<Code> ComputeStoreMonomorphic(LookupResult* lookup,
StrictModeFlag strict_mode,
Handle<JSObject> receiver,
Handle<String> name);
virtual void UpdateMegamorphicCache(Map* map, String* name, Code* code) { }
virtual Handle<Code> megamorphic_stub() {
return isolate()->builtins()->KeyedStoreIC_Generic();
......
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