| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index a6efdab56b49f041ca9c53cbf49dead9c2f7a65b..4b109cef0282a709d44e7c69abae4e9b0482bb81 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -859,7 +859,11 @@ void LoadIC::UpdateCaches(LookupResult* lookup,
|
| // This is the first time we execute this inline cache.
|
| // Set the target to the pre monomorphic stub to delay
|
| // setting the monomorphic state.
|
| - set_target(*pre_monomorphic_stub());
|
| + // No need to flush the icache since the pre_monomorphic_stub will be the
|
| + // same code as the initialize_stub - it is just used as a marker to
|
| + // identify when we should move to monomorphic, and will be correctly read
|
| + // via raw_target() even if the wrong stub was called.
|
| + set_target(*pre_monomorphic_stub(), SKIP_ICACHE_FLUSH_IF_ATOMIC);
|
| TRACE_IC("LoadIC", name);
|
| return;
|
| }
|
| @@ -1309,7 +1313,11 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object,
|
| if (FLAG_use_ic) {
|
| if (state() == UNINITIALIZED) {
|
| Handle<Code> stub = pre_monomorphic_stub();
|
| - set_target(*stub);
|
| + // No need to flush the icache since the pre_monomorphic_stub will be the
|
| + // same code as the initialize_stub - it is just used as a marker to
|
| + // identify when we should move to monomorphic, and will be correctly read
|
| + // via raw_target() even if the wrong stub was called.
|
| + set_target(*stub, SKIP_ICACHE_FLUSH_IF_ATOMIC);
|
| TRACE_IC("StoreIC", name);
|
| } else if (can_store) {
|
| UpdateCaches(&lookup, receiver, name, value);
|
|
|