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

Unified Diff: src/ic.h

Issue 478043006: Rewrite StoreIC handling using the LookupIterator. Continued from patch 494153002 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.h
diff --git a/src/ic.h b/src/ic.h
index eb844cf747123faa74eff7d6291e0c69642dd359..8d41f803b4b0669bdf8dd988714bda11a5e774eb 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -183,29 +183,14 @@ class IC {
static void PostPatching(Address address, Code* target, Code* old_target);
// Compute the handler either by compiling or by retrieving a cached version.
- Handle<Code> ComputeHandler(LookupIterator* lookup, Handle<Object> object,
- Handle<Name> name,
+ Handle<Code> ComputeHandler(LookupIterator* lookup,
Handle<Object> value = Handle<Code>::null());
virtual Handle<Code> CompileHandler(LookupIterator* lookup,
- Handle<Object> object,
- Handle<Name> name, Handle<Object> value,
+ Handle<Object> value,
CacheHolderFlag cache_holder) {
UNREACHABLE();
return Handle<Code>::null();
}
- // Temporary copy of the above, but using a LookupResult.
- // TODO(jkummerow): Migrate callers to LookupIterator and delete these.
- Handle<Code> ComputeStoreHandler(LookupResult* lookup, Handle<Object> object,
- Handle<Name> name,
- Handle<Object> value = Handle<Code>::null());
- virtual Handle<Code> CompileStoreHandler(LookupResult* lookup,
- Handle<Object> object,
- Handle<Name> name,
- Handle<Object> value,
- CacheHolderFlag cache_holder) {
- UNREACHABLE();
- return Handle<Code>::null();
- }
void UpdateMonomorphicIC(Handle<Code> handler, Handle<Name> name);
bool UpdatePolymorphicIC(Handle<Name> name, Handle<Code> code);
@@ -235,6 +220,9 @@ class IC {
}
Handle<HeapType> receiver_type() { return receiver_type_; }
+ void update_receiver_type(Handle<Object> receiver) {
+ receiver_type_ = CurrentTypeOf(receiver, isolate_);
+ }
void TargetMaps(MapHandleList* list) {
FindTargetMaps();
@@ -493,12 +481,9 @@ class LoadIC: public IC {
// Update the inline cache and the global stub cache based on the
// lookup result.
- void UpdateCaches(LookupIterator* lookup, Handle<Object> object,
- Handle<Name> name);
+ void UpdateCaches(LookupIterator* lookup);
virtual Handle<Code> CompileHandler(LookupIterator* lookup,
- Handle<Object> object,
- Handle<Name> name,
Handle<Object> unused,
CacheHolderFlag cache_holder);
@@ -633,6 +618,9 @@ class StoreIC: public IC {
JSReceiver::StoreFromKeyed store_mode =
JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED);
+ bool LookupForWrite(LookupIterator* it, Handle<Object> value,
+ JSReceiver::StoreFromKeyed store_mode);
+
protected:
virtual Handle<Code> megamorphic_stub();
@@ -652,15 +640,11 @@ class StoreIC: public IC {
// Update the inline cache and the global stub cache based on the
// lookup result.
- void UpdateCaches(LookupResult* lookup,
- Handle<JSObject> receiver,
- Handle<Name> name,
- Handle<Object> value);
- virtual Handle<Code> CompileStoreHandler(LookupResult* lookup,
- Handle<Object> object,
- Handle<Name> name,
- Handle<Object> value,
- CacheHolderFlag cache_holder);
+ void UpdateCaches(LookupIterator* lookup, Handle<Object> value,
+ JSReceiver::StoreFromKeyed store_mode);
+ virtual Handle<Code> CompileHandler(LookupIterator* lookup,
+ Handle<Object> value,
+ CacheHolderFlag cache_holder);
private:
void set_target(Code* code) {
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698