| 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 e5e8d54fd7e1b0105eb6791d8be1e1f49d6249ea..e81ed770a2608520d752629fd19010fba9c6f561 100644
|
| --- a/src/ic/ppc/handler-compiler-ppc.cc
|
| +++ b/src/ic/ppc/handler-compiler-ppc.cc
|
| @@ -402,10 +402,9 @@ void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
|
| }
|
| }
|
|
|
| -
|
| Register PropertyHandlerCompiler::CheckPrototypes(
|
| Register object_reg, Register holder_reg, Register scratch1,
|
| - Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check,
|
| + Register scratch2, Handle<Name> name, Label* miss,
|
| ReturnHolder return_what) {
|
| Handle<Map> receiver_map = map();
|
|
|
| @@ -424,17 +423,6 @@ Register PropertyHandlerCompiler::CheckPrototypes(
|
| __ bne(miss);
|
| }
|
|
|
| - // The prototype chain of primitives (and their JSValue wrappers) depends
|
| - // on the native context, which can't be guarded by validity cells.
|
| - // |object_reg| holds the native context specific prototype in this case;
|
| - // we need to check its map.
|
| - if (check == CHECK_ALL_MAPS) {
|
| - __ LoadP(scratch1, FieldMemOperand(object_reg, HeapObject::kMapOffset));
|
| - Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map);
|
| - __ CmpWeakValue(scratch1, cell, scratch2);
|
| - __ b(ne, miss);
|
| - }
|
| -
|
| // Keep track of the current object in register reg.
|
| Register reg = object_reg;
|
| int depth = 0;
|
| @@ -444,8 +432,8 @@ Register PropertyHandlerCompiler::CheckPrototypes(
|
| current = isolate()->global_object();
|
| }
|
|
|
| - Handle<JSObject> prototype = Handle<JSObject>::null();
|
| - Handle<Map> current_map = receiver_map;
|
| + Handle<Map> current_map(receiver_map->GetPrototypeChainRootMap(isolate()),
|
| + isolate());
|
| Handle<Map> holder_map(holder()->map());
|
| // Traverse the prototype chain and check the maps in the prototype chain for
|
| // fast and global objects or do negative lookup for normal objects.
|
| @@ -457,7 +445,6 @@ Register PropertyHandlerCompiler::CheckPrototypes(
|
| DCHECK(current_map->IsJSGlobalProxyMap() ||
|
| !current_map->is_access_check_needed());
|
|
|
| - prototype = handle(JSObject::cast(current_map->prototype()));
|
| if (current_map->IsJSGlobalObjectMap()) {
|
| GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current),
|
| name, scratch2, miss);
|
| @@ -479,7 +466,7 @@ Register PropertyHandlerCompiler::CheckPrototypes(
|
|
|
| reg = holder_reg; // From now on the object will be in holder_reg.
|
| // Go to the next object in the prototype chain.
|
| - current = prototype;
|
| + current = handle(JSObject::cast(current_map->prototype()));
|
| current_map = handle(current->map());
|
| }
|
|
|
|
|