Chromium Code Reviews| Index: src/arm/stub-cache-arm.cc |
| diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
| index f22acb4709e386d75a2a4df18f981624449de2fa..e3e5aa2022ec10b1f8d6a4874712e5aaa939b31b 100644 |
| --- a/src/arm/stub-cache-arm.cc |
| +++ b/src/arm/stub-cache-arm.cc |
| @@ -2897,6 +2897,7 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
| Handle<Code> BaseLoadStubCompiler::CompilePolymorphicIC( |
| MapHandleList* receiver_maps, |
| CodeHandleList* handlers, |
| + int number_of_valid_maps, |
| Handle<Name> name, |
| Code::StubType type, |
| IcCheckType check) { |
| @@ -2912,17 +2913,19 @@ Handle<Code> BaseLoadStubCompiler::CompilePolymorphicIC( |
| int receiver_count = receiver_maps->length(); |
| __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
| for (int current = 0; current < receiver_count; ++current) { |
| - __ mov(ip, Operand(receiver_maps->at(current))); |
| - __ cmp(map_reg, ip); |
| - __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); |
| + Handle<Map> map = receiver_maps->at(current); |
| + if (!map->is_invalid_transition()) { |
|
danno
2013/04/24 15:23:00
how about reversing the sense of the predicate to
|
| + __ mov(ip, Operand(receiver_maps->at(current))); |
| + __ cmp(map_reg, ip); |
| + __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); |
| + } |
| } |
| __ bind(&miss); |
| TailCallBuiltin(masm(), MissBuiltin(kind())); |
| // Return the generated code. |
| - InlineCacheState state = |
| - receiver_maps->length() > 1 ? POLYMORPHIC : MONOMORPHIC; |
| + InlineCacheState state = number_of_valid_maps > 1 ? POLYMORPHIC : MONOMORPHIC; |
| return GetICCode(kind(), type, name, state); |
| } |