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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 if (IsCleared(target)) return; | 554 if (IsCleared(target)) return; |
555 Code* code = PropertyICCompiler::FindPreMonomorphic(isolate, Code::STORE_IC, | 555 Code* code = PropertyICCompiler::FindPreMonomorphic(isolate, Code::STORE_IC, |
556 target->extra_ic_state()); | 556 target->extra_ic_state()); |
557 SetTargetAtAddress(address, code, constant_pool); | 557 SetTargetAtAddress(address, code, constant_pool); |
558 } | 558 } |
559 | 559 |
560 | 560 |
561 void KeyedStoreIC::Clear(Isolate* isolate, Address address, Code* target, | 561 void KeyedStoreIC::Clear(Isolate* isolate, Address address, Code* target, |
562 ConstantPoolArray* constant_pool) { | 562 ConstantPoolArray* constant_pool) { |
563 if (IsCleared(target)) return; | 563 if (IsCleared(target)) return; |
564 SetTargetAtAddress( | 564 Handle<Code> code = pre_monomorphic_stub( |
565 address, *pre_monomorphic_stub( | 565 isolate, StoreICState::GetLanguageMode(target->extra_ic_state())); |
566 isolate, StoreIC::GetLanguageMode(target->extra_ic_state())), | 566 SetTargetAtAddress(address, *code, constant_pool); |
567 constant_pool); | |
568 } | 567 } |
569 | 568 |
570 | 569 |
571 void CompareIC::Clear(Isolate* isolate, Address address, Code* target, | 570 void CompareIC::Clear(Isolate* isolate, Address address, Code* target, |
572 ConstantPoolArray* constant_pool) { | 571 ConstantPoolArray* constant_pool) { |
573 DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC); | 572 DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC); |
574 CompareICStub stub(target->stub_key(), isolate); | 573 CompareICStub stub(target->stub_key(), isolate); |
575 // Only clear CompareICs that can retain objects. | 574 // Only clear CompareICs that can retain objects. |
576 if (stub.state() != CompareICState::KNOWN_OBJECT) return; | 575 if (stub.state() != CompareICState::KNOWN_OBJECT) return; |
577 SetTargetAtAddress(address, | 576 SetTargetAtAddress(address, |
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2912 static const Address IC_utilities[] = { | 2911 static const Address IC_utilities[] = { |
2913 #define ADDR(name) FUNCTION_ADDR(name), | 2912 #define ADDR(name) FUNCTION_ADDR(name), |
2914 IC_UTIL_LIST(ADDR) NULL | 2913 IC_UTIL_LIST(ADDR) NULL |
2915 #undef ADDR | 2914 #undef ADDR |
2916 }; | 2915 }; |
2917 | 2916 |
2918 | 2917 |
2919 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2918 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
2920 } | 2919 } |
2921 } // namespace v8::internal | 2920 } // namespace v8::internal |
OLD | NEW |