| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 MapList target_receiver_maps; | 1625 MapList target_receiver_maps; |
| 1626 GetReceiverMapsForStub(target(), &target_receiver_maps); | 1626 GetReceiverMapsForStub(target(), &target_receiver_maps); |
| 1627 if (!AddOneReceiverMapIfMissing(&target_receiver_maps, receiver->map())) { | 1627 if (!AddOneReceiverMapIfMissing(&target_receiver_maps, receiver->map())) { |
| 1628 // If the miss wasn't due to an unseen map, a MEGAMORPHIC stub | 1628 // If the miss wasn't due to an unseen map, a MEGAMORPHIC stub |
| 1629 // won't help, use the generic stub. | 1629 // won't help, use the generic stub. |
| 1630 return generic_stub; | 1630 return generic_stub; |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 // If the maximum number of receiver maps has been exceeded, use the generic | 1633 // If the maximum number of receiver maps has been exceeded, use the generic |
| 1634 // version of the IC. | 1634 // version of the IC. |
| 1635 if (target_receiver_maps.length() > KeyedIC::kMaxKeyedPolymorphism) { | 1635 if (target_receiver_maps.length() > kMaxKeyedPolymorphism) { |
| 1636 return generic_stub; | 1636 return generic_stub; |
| 1637 } | 1637 } |
| 1638 | 1638 |
| 1639 PolymorphicCodeCache* cache = isolate()->heap()->polymorphic_code_cache(); | 1639 PolymorphicCodeCache* cache = isolate()->heap()->polymorphic_code_cache(); |
| 1640 Code::Flags flags = Code::ComputeFlags(this->kind(), | 1640 Code::Flags flags = Code::ComputeFlags(this->kind(), |
| 1641 NOT_IN_LOOP, | 1641 NOT_IN_LOOP, |
| 1642 MEGAMORPHIC, | 1642 MEGAMORPHIC, |
| 1643 strict_mode); | 1643 strict_mode); |
| 1644 Object* maybe_cached_stub = cache->Lookup(&target_receiver_maps, flags); | 1644 Object* maybe_cached_stub = cache->Lookup(&target_receiver_maps, flags); |
| 1645 // If there is a cached stub, use it. | 1645 // If there is a cached stub, use it. |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2516 #undef ADDR | 2516 #undef ADDR |
| 2517 }; | 2517 }; |
| 2518 | 2518 |
| 2519 | 2519 |
| 2520 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2520 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2521 return IC_utilities[id]; | 2521 return IC_utilities[id]; |
| 2522 } | 2522 } |
| 2523 | 2523 |
| 2524 | 2524 |
| 2525 } } // namespace v8::internal | 2525 } } // namespace v8::internal |
| OLD | NEW |