OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 516 |
517 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target) { | 517 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target) { |
518 if (IsCleared(target)) return; | 518 if (IsCleared(target)) return; |
519 // Make sure to also clear the map used in inline fast cases. If we | 519 // Make sure to also clear the map used in inline fast cases. If we |
520 // do not clear these maps, cached code can keep objects alive | 520 // do not clear these maps, cached code can keep objects alive |
521 // through the embedded maps. | 521 // through the embedded maps. |
522 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate)); | 522 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate)); |
523 } | 523 } |
524 | 524 |
525 | 525 |
| 526 Handle<Code> KeyedLoadIC::megamorphic_stub() { |
| 527 if (FLAG_compiled_keyed_generic_loads) { |
| 528 return KeyedLoadGenericElementStub().GetCode(isolate()); |
| 529 } else { |
| 530 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 531 } |
| 532 } |
| 533 |
| 534 Handle<Code> KeyedLoadIC::generic_stub() const { |
| 535 if (FLAG_compiled_keyed_generic_loads) { |
| 536 return KeyedLoadGenericElementStub().GetCode(isolate()); |
| 537 } else { |
| 538 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 539 } |
| 540 } |
| 541 |
| 542 |
526 void LoadIC::Clear(Isolate* isolate, Address address, Code* target) { | 543 void LoadIC::Clear(Isolate* isolate, Address address, Code* target) { |
527 if (IsCleared(target)) return; | 544 if (IsCleared(target)) return; |
528 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate)); | 545 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate)); |
529 } | 546 } |
530 | 547 |
531 | 548 |
532 void StoreIC::Clear(Isolate* isolate, Address address, Code* target) { | 549 void StoreIC::Clear(Isolate* isolate, Address address, Code* target) { |
533 if (IsCleared(target)) return; | 550 if (IsCleared(target)) return; |
534 SetTargetAtAddress(address, | 551 SetTargetAtAddress(address, |
535 *pre_monomorphic_stub( | 552 *pre_monomorphic_stub( |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2768 #undef ADDR | 2785 #undef ADDR |
2769 }; | 2786 }; |
2770 | 2787 |
2771 | 2788 |
2772 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2789 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2773 return IC_utilities[id]; | 2790 return IC_utilities[id]; |
2774 } | 2791 } |
2775 | 2792 |
2776 | 2793 |
2777 } } // namespace v8::internal | 2794 } } // namespace v8::internal |
OLD | NEW |