| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index 39b94162285291ebafd899f5fc2446127e404a42..e6c831c4178749aa2250a5230c2d27b162350197 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -598,9 +598,11 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<String> name) {
|
| } else if (state() == PREMONOMORPHIC) {
|
| FunctionPrototypeStub function_prototype_stub(isolate(), kind());
|
| stub = function_prototype_stub.GetCode();
|
| - } else if (state() != MEGAMORPHIC) {
|
| + } else if (!FLAG_compiled_keyed_generic_loads && state() != MEGAMORPHIC) {
|
| ASSERT(state() != GENERIC);
|
| stub = megamorphic_stub();
|
| + } else if (FLAG_compiled_keyed_generic_loads && state() != GENERIC) {
|
| + stub = generic_stub();
|
| }
|
| if (!stub.is_null()) {
|
| set_target(*stub);
|
| @@ -821,6 +823,10 @@ void IC::PatchCache(Handle<HeapType> type,
|
| if (UpdatePolymorphicIC(type, name, code)) break;
|
| CopyICToMegamorphicCache(name);
|
| }
|
| + if (FLAG_compiled_keyed_generic_loads && (kind() == Code::LOAD_IC)) {
|
| + set_target(*generic_stub());
|
| + break;
|
| + }
|
| set_target(*megamorphic_stub());
|
| // Fall through.
|
| case MEGAMORPHIC:
|
| @@ -852,6 +858,11 @@ Handle<Code> LoadIC::megamorphic_stub() {
|
| }
|
|
|
|
|
| +Handle<Code> LoadIC::generic_stub() const {
|
| + return KeyedLoadGenericElementStub(isolate()).GetCode();
|
| +}
|
| +
|
| +
|
| Handle<Code> LoadIC::SimpleFieldLoad(FieldIndex index) {
|
| if (kind() == Code::LOAD_IC) {
|
| LoadFieldStub stub(isolate(), index);
|
|
|