| Index: src/ic/ppc/handler-compiler-ppc.cc
|
| diff --git a/src/ic/ppc/handler-compiler-ppc.cc b/src/ic/ppc/handler-compiler-ppc.cc
|
| index aafdc77c9b0824f11122926b1f78df8253a3f436..86abbc67e4e874bc26ce347cf5cfa32c2a808a0c 100644
|
| --- a/src/ic/ppc/handler-compiler-ppc.cc
|
| +++ b/src/ic/ppc/handler-compiler-ppc.cc
|
| @@ -481,8 +481,9 @@ Register PropertyHandlerCompiler::CheckPrototypes(
|
| NameDictionary::kNotFound);
|
|
|
| if (depth > 1) {
|
| - // TODO(jkummerow): Cache and re-use weak cell.
|
| - __ LoadWeakValue(reg, isolate()->factory()->NewWeakCell(current), miss);
|
| + Handle<WeakCell> weak_cell =
|
| + Map::GetOrCreatePrototypeWeakCell(current, isolate());
|
| + __ LoadWeakValue(reg, weak_cell, miss);
|
| }
|
| GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1,
|
| scratch2);
|
| @@ -501,7 +502,9 @@ Register PropertyHandlerCompiler::CheckPrototypes(
|
|
|
| bool return_holder = return_what == RETURN_HOLDER;
|
| if (return_holder && depth != 0) {
|
| - __ LoadWeakValue(reg, isolate()->factory()->NewWeakCell(current), miss);
|
| + Handle<WeakCell> weak_cell =
|
| + Map::GetOrCreatePrototypeWeakCell(current, isolate());
|
| + __ LoadWeakValue(reg, weak_cell, miss);
|
| }
|
|
|
| // Return the register containing the holder.
|
|
|