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

Unified Diff: src/ic.h

Issue 494153002: Avoid one repeated property lookup when computing store ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments (triggering a bug in doing so) 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..0115df2df9f58fc062e050916c274befdb09a113 100644
--- a/src/ic.h
+++ b/src/ic.h
@@ -193,19 +193,6 @@ class IC {
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 +222,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();
@@ -633,6 +623,10 @@ class StoreIC: public IC {
JSReceiver::StoreFromKeyed store_mode =
JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED);
+ bool LookupForWrite(Handle<Object> object, Handle<Name> name,
+ Handle<Object> value, LookupIterator* it,
+ JSReceiver::StoreFromKeyed store_mode);
+
protected:
virtual Handle<Code> megamorphic_stub();
@@ -652,15 +646,12 @@ 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<JSObject> receiver,
+ Handle<Name> name, Handle<Object> value);
+ virtual Handle<Code> CompileHandler(LookupIterator* lookup,
+ Handle<Object> object, Handle<Name> name,
+ 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