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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Clearing these is tricky and does not | 482 // Clearing these is tricky and does not |
483 // make any performance difference. | 483 // make any performance difference. |
484 return; | 484 return; |
485 default: UNREACHABLE(); | 485 default: UNREACHABLE(); |
486 } | 486 } |
487 } | 487 } |
488 | 488 |
489 | 489 |
490 void CallICBase::Clear(Address address, Code* target) { | 490 void CallICBase::Clear(Address address, Code* target) { |
491 if (IsCleared(target)) return; | 491 if (IsCleared(target)) return; |
492 ContextualMode mode = IC::GetContextualMode(target->extra_ic_state()); | |
493 Code* code = target->GetIsolate()->stub_cache()->FindCallInitialize( | 492 Code* code = target->GetIsolate()->stub_cache()->FindCallInitialize( |
494 target->arguments_count(), mode, target->kind()); | 493 target->arguments_count(), target->kind()); |
495 SetTargetAtAddress(address, code); | 494 SetTargetAtAddress(address, code); |
496 } | 495 } |
497 | 496 |
498 | 497 |
499 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target) { | 498 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target) { |
500 if (IsCleared(target)) return; | 499 if (IsCleared(target)) return; |
501 // Make sure to also clear the map used in inline fast cases. If we | 500 // Make sure to also clear the map used in inline fast cases. If we |
502 // do not clear these maps, cached code can keep objects alive | 501 // do not clear these maps, cached code can keep objects alive |
503 // through the embedded maps. | 502 // through the embedded maps. |
504 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate)); | 503 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate)); |
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3221 #undef ADDR | 3220 #undef ADDR |
3222 }; | 3221 }; |
3223 | 3222 |
3224 | 3223 |
3225 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3224 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
3226 return IC_utilities[id]; | 3225 return IC_utilities[id]; |
3227 } | 3226 } |
3228 | 3227 |
3229 | 3228 |
3230 } } // namespace v8::internal | 3229 } } // namespace v8::internal |
OLD | NEW |