OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 return; | 504 return; |
505 default: | 505 default: |
506 UNREACHABLE(); | 506 UNREACHABLE(); |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
510 | 510 |
511 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target, | 511 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target, |
512 ConstantPoolArray* constant_pool) { | 512 ConstantPoolArray* constant_pool) { |
513 if (IsCleared(target)) return; | 513 if (IsCleared(target)) return; |
514 // Make sure to also clear the map used in inline fast cases. If we | 514 |
515 // do not clear these maps, cached code can keep objects alive | 515 // If the target is the string_stub, then don't clear it. It is the |
516 // through the embedded maps. | 516 // perfect stub if we continue to see strings. Holding this |
517 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate), constant_pool); | 517 // state is not preventing learning new information. |
| 518 if (target != *isolate->builtins()->KeyedLoadIC_String()) { |
| 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 |
| 521 // through the embedded maps. |
| 522 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate), constant_pool); |
| 523 } |
518 } | 524 } |
519 | 525 |
520 | 526 |
521 void CallIC::Clear(Isolate* isolate, Address address, Code* target, | 527 void CallIC::Clear(Isolate* isolate, Address address, Code* target, |
522 ConstantPoolArray* constant_pool) { | 528 ConstantPoolArray* constant_pool) { |
523 // Currently, CallIC doesn't have state changes. | 529 // Currently, CallIC doesn't have state changes. |
524 } | 530 } |
525 | 531 |
526 | 532 |
527 void LoadIC::Clear(Isolate* isolate, Address address, Code* target, | 533 void LoadIC::Clear(Isolate* isolate, Address address, Code* target, |
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2680 static const Address IC_utilities[] = { | 2686 static const Address IC_utilities[] = { |
2681 #define ADDR(name) FUNCTION_ADDR(name), | 2687 #define ADDR(name) FUNCTION_ADDR(name), |
2682 IC_UTIL_LIST(ADDR) NULL | 2688 IC_UTIL_LIST(ADDR) NULL |
2683 #undef ADDR | 2689 #undef ADDR |
2684 }; | 2690 }; |
2685 | 2691 |
2686 | 2692 |
2687 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2693 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
2688 } | 2694 } |
2689 } // namespace v8::internal | 2695 } // namespace v8::internal |
OLD | NEW |