Changeset 276290 in webkit
- Timestamp:
- Apr 20, 2021, 12:26:08 AM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
bytecode/CodeBlock.h (modified) (1 diff)
-
bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp (modified) (1 diff)
-
bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h (modified) (1 diff)
-
llint/LLIntSlowPaths.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r276259 r276290 1 2021-04-20 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Use FixedVector for LLIntPrototypeLoadAdaptiveStructureWatchpoint vector 4 https://bugs.webkit.org/show_bug.cgi?id=224729 5 6 Reviewed by Darin Adler. 7 8 Replace Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> with FixedVector. 9 10 * bytecode/CodeBlock.h: 11 * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp: 12 (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint): 13 (JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::initialize): 14 * bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h: 15 * llint/LLIntSlowPaths.cpp: 16 (JSC::LLInt::setupGetByIdPrototypeCache): 17 1 18 2021-04-19 Mark Lam <mark.lam@apple.com> 2 19 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r276102 r276290 670 670 } 671 671 672 typedef HashMap<std::tuple<StructureID, unsigned>, Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint>> StructureWatchpointMap;672 typedef HashMap<std::tuple<StructureID, unsigned>, FixedVector<LLIntPrototypeLoadAdaptiveStructureWatchpoint>> StructureWatchpointMap; 673 673 StructureWatchpointMap& llintGetByIdWatchpointMap() { return m_llintGetByIdWatchpointMap; } 674 674 -
trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp
r261895 r276290 41 41 RELEASE_ASSERT(key.watchingRequiresStructureTransitionWatchpoint()); 42 42 RELEASE_ASSERT(!key.watchingRequiresReplacementWatchpoint()); 43 } 44 45 LLIntPrototypeLoadAdaptiveStructureWatchpoint::LLIntPrototypeLoadAdaptiveStructureWatchpoint() 46 : Watchpoint(Watchpoint::Type::LLIntPrototypeLoadAdaptiveStructure) 47 , m_owner(nullptr) 48 , m_bytecodeOffset(0) 49 { 50 } 51 52 void LLIntPrototypeLoadAdaptiveStructureWatchpoint::initialize(CodeBlock* codeBlock, const ObjectPropertyCondition& key, unsigned bytecodeOffset) 53 { 54 m_owner = codeBlock; 55 m_bytecodeOffset = bytecodeOffset; 56 m_key = key; 43 57 } 44 58 -
trunk/Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h
r260323 r276290 37 37 public: 38 38 LLIntPrototypeLoadAdaptiveStructureWatchpoint(CodeBlock*, const ObjectPropertyCondition&, unsigned bytecodeOffset); 39 LLIntPrototypeLoadAdaptiveStructureWatchpoint(); 40 41 void initialize(CodeBlock*, const ObjectPropertyCondition&, unsigned bytecodeOffset); 39 42 40 43 void install(VM&); -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r275995 r276290 724 724 PropertyOffset offset = invalidOffset; 725 725 CodeBlock::StructureWatchpointMap& watchpointMap = codeBlock->llintGetByIdWatchpointMap(); 726 Vector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> watchpoints;727 watchpoints.reserveInitialCapacity(conditions.size());726 FixedVector<LLIntPrototypeLoadAdaptiveStructureWatchpoint> watchpoints(conditions.size()); 727 unsigned index = 0; 728 728 for (ObjectPropertyCondition condition : conditions) { 729 auto& watchpoint = watchpoints[index++]; 729 730 if (!condition.isWatchable()) 730 731 return; 731 732 if (condition.condition().kind() == PropertyCondition::Presence) 732 733 offset = condition.condition().offset(); 733 watchpoint s.uncheckedConstructAndAppend(codeBlock, condition, bytecodeOffset);734 watchpoint s.last().install(vm);734 watchpoint.initialize(codeBlock, condition, bytecodeOffset); 735 watchpoint.install(vm); 735 736 } 736 737
Note:
See TracChangeset
for help on using the changeset viewer.