| Index: src/ic.cc
|
| ===================================================================
|
| --- src/ic.cc (revision 2476)
|
| +++ src/ic.cc (working copy)
|
| @@ -365,10 +365,13 @@
|
| return TypeError("undefined_method", object, name);
|
| }
|
|
|
| + // TODO(X64): Enable inline cache for calls.
|
| +#ifndef V8_TARGET_ARCH_X64
|
| // Lookup is valid: Update inline cache and stub cache.
|
| if (FLAG_use_ic && lookup.IsLoaded()) {
|
| UpdateCaches(&lookup, state, object, name);
|
| }
|
| +#endif
|
|
|
| // Get the property.
|
| PropertyAttributes attr;
|
| @@ -609,10 +612,13 @@
|
| }
|
| }
|
|
|
| + // TODO(X64): Enable inline cache for load.
|
| + #ifndef V8_TARGET_ARCH_X64
|
| // Update inline cache and stub cache.
|
| if (FLAG_use_ic && lookup.IsLoaded()) {
|
| UpdateCaches(&lookup, state, object, name);
|
| }
|
| + #endif
|
|
|
| PropertyAttributes attr;
|
| if (lookup.IsValid() && lookup.type() == INTERCEPTOR) {
|
| @@ -737,7 +743,9 @@
|
| return TypeError("non_object_property_load", object, name);
|
| }
|
|
|
| - if (FLAG_use_ic) {
|
| + // TODO(X64): Enable specialized stubs for length and prototype lookup.
|
| +#ifndef V8_TARGET_ARCH_X64
|
| + if (false && FLAG_use_ic) {
|
| // Use specialized code for getting the length of strings.
|
| if (object->IsString() && name->Equals(Heap::length_symbol())) {
|
| Handle<String> string = Handle<String>::cast(object);
|
| @@ -747,7 +755,7 @@
|
| set_target(Code::cast(code));
|
| #ifdef DEBUG
|
| TraceIC("KeyedLoadIC", name, state, target());
|
| -#endif
|
| +#endif // DEBUG
|
| return Smi::FromInt(string->length());
|
| }
|
|
|
| @@ -759,7 +767,7 @@
|
| set_target(Code::cast(code));
|
| #ifdef DEBUG
|
| TraceIC("KeyedLoadIC", name, state, target());
|
| -#endif
|
| +#endif // DEBUG
|
| return JSArray::cast(*object)->length();
|
| }
|
|
|
| @@ -772,10 +780,11 @@
|
| set_target(Code::cast(code));
|
| #ifdef DEBUG
|
| TraceIC("KeyedLoadIC", name, state, target());
|
| -#endif
|
| +#endif // DEBUG
|
| return Accessors::FunctionGetPrototype(*object, 0);
|
| }
|
| }
|
| +#endif // !V8_TARGET_ARCH_X64
|
|
|
| // Check if the name is trivially convertible to an index and get
|
| // the element or char if so.
|
| @@ -798,10 +807,13 @@
|
| }
|
| }
|
|
|
| + // TODO(X64): Enable inline caching for load.
|
| +#ifndef V8_TARGET_ARCH_X64
|
| // Update the inline cache.
|
| if (FLAG_use_ic && lookup.IsLoaded()) {
|
| UpdateCaches(&lookup, state, object, name);
|
| }
|
| +#endif
|
|
|
| PropertyAttributes attr;
|
| if (lookup.IsValid() && lookup.type() == INTERCEPTOR) {
|
| @@ -972,6 +984,10 @@
|
| return *value;
|
| }
|
|
|
| + // TODO(X64): Enable inline cache for StoreIC.
|
| +#ifdef V8_TARGET_ARCH_X64
|
| + USE(&LookupForWrite); // The compiler complains otherwise.
|
| +#else
|
| // Lookup the property locally in the receiver.
|
| if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
|
| LookupResult lookup;
|
| @@ -979,6 +995,7 @@
|
| UpdateCaches(&lookup, state, receiver, name, value);
|
| }
|
| }
|
| +#endif
|
|
|
| // Set the property.
|
| return receiver->SetProperty(*name, *value, NONE);
|
| @@ -1097,10 +1114,13 @@
|
| LookupResult lookup;
|
| receiver->LocalLookup(*name, &lookup);
|
|
|
| + // TODO(X64): Enable inline cache for KeyedStoreIC.
|
| +#ifndef V8_TARGET_ARCH_X64
|
| // Update inline cache and stub cache.
|
| if (FLAG_use_ic && lookup.IsLoaded()) {
|
| UpdateCaches(&lookup, state, receiver, name, value);
|
| }
|
| +#endif
|
|
|
| // Set the property.
|
| return receiver->SetProperty(*name, *value, NONE);
|
|
|