WebKit Bugzilla
Attachment 359246 Details for
Bug 193481
: Add 'inline' specifier for declarations for which definitions are defined in separate headers (…Inlines.h)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch
193481.diff (text/plain), 84.86 KB, created by
Fujii Hironori
on 2019-01-15 19:15:42 PST
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-01-15 19:15:42 PST
Size:
84.86 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/b3/B3BasicBlock.h b/Source/JavaScriptCore/b3/B3BasicBlock.h >index 1805857a7a8..a8ca5840c5d 100644 >--- a/Source/JavaScriptCore/b3/B3BasicBlock.h >+++ b/Source/JavaScriptCore/b3/B3BasicBlock.h >@@ -121,14 +121,14 @@ public: > bool replaceSuccessor(BasicBlock* from, BasicBlock* to); > > // This is only valid for Jump and Branch. >- const FrequentedBlock& taken() const; >- FrequentedBlock& taken(); >+ inline const FrequentedBlock& taken() const; >+ inline FrequentedBlock& taken(); > // This is only valid for Branch. >- const FrequentedBlock& notTaken() const; >- FrequentedBlock& notTaken(); >+ inline const FrequentedBlock& notTaken() const; >+ inline FrequentedBlock& notTaken(); > // This is only valid for Branch and Switch. >- const FrequentedBlock& fallThrough() const; >- FrequentedBlock& fallThrough(); >+ inline const FrequentedBlock& fallThrough() const; >+ inline FrequentedBlock& fallThrough(); > > unsigned numPredecessors() const { return m_predecessors.size(); } > BasicBlock* predecessor(unsigned index) const { return m_predecessors[index]; } >diff --git a/Source/JavaScriptCore/b3/B3CaseCollection.h b/Source/JavaScriptCore/b3/B3CaseCollection.h >index c45cc641d80..8d1597a2e63 100644 >--- a/Source/JavaScriptCore/b3/B3CaseCollection.h >+++ b/Source/JavaScriptCore/b3/B3CaseCollection.h >@@ -48,10 +48,10 @@ public: > { > } > >- const FrequentedBlock& fallThrough() const; >+ inline const FrequentedBlock& fallThrough() const; > >- unsigned size() const; >- SwitchCase at(unsigned index) const; >+ inline unsigned size() const; >+ inline SwitchCase at(unsigned index) const; > > SwitchCase operator[](unsigned index) const > { >diff --git a/Source/JavaScriptCore/b3/B3MemoryValue.h b/Source/JavaScriptCore/b3/B3MemoryValue.h >index 6af3b267a59..77c79307867 100644 >--- a/Source/JavaScriptCore/b3/B3MemoryValue.h >+++ b/Source/JavaScriptCore/b3/B3MemoryValue.h >@@ -53,12 +53,12 @@ public: > typename = typename std::enable_if<std::is_integral<Int>::value>::type, > typename = typename std::enable_if<std::is_signed<Int>::value>::type > > >- bool isLegalOffset(Int offset) const { return isLegalOffsetImpl(offset); } >+ inline bool isLegalOffset(Int offset) const { return isLegalOffsetImpl(offset); } > > // A necessary consequence of MemoryValue having an offset is that it participates in instruction > // selection. This tells you if this will get lowered to something that requires an offsetless > // address. >- bool requiresSimpleAddr() const; >+ inline bool requiresSimpleAddr() const; > > const HeapRange& range() const { return m_range; } > void setRange(const HeapRange& range) { m_range = range; } >@@ -80,7 +80,7 @@ public: > Bank accessBank() const; > size_t accessByteSize() const; > >- Width accessWidth() const; >+ inline Width accessWidth() const; > > bool isCanonicalWidth() const { return B3::isCanonicalWidth(accessWidth()); } > >diff --git a/Source/JavaScriptCore/b3/B3ValueKey.h b/Source/JavaScriptCore/b3/B3ValueKey.h >index 18b092c59b8..3b36607c7fa 100644 >--- a/Source/JavaScriptCore/b3/B3ValueKey.h >+++ b/Source/JavaScriptCore/b3/B3ValueKey.h >@@ -56,11 +56,11 @@ public: > { > } > >- ValueKey(Kind, Type, Value* child); >+ inline ValueKey(Kind, Type, Value* child); > >- ValueKey(Kind, Type, Value* left, Value* right); >+ inline ValueKey(Kind, Type, Value* left, Value* right); > >- ValueKey(Kind, Type, Value* a, Value* b, Value* c); >+ inline ValueKey(Kind, Type, Value* a, Value* b, Value* c); > > ValueKey(Kind kind, Type type, int64_t value) > : m_kind(kind) >@@ -89,7 +89,7 @@ public: > Opcode opcode() const { return kind().opcode(); } > Type type() const { return m_type; } > unsigned childIndex(unsigned index) const { return u.indices[index]; } >- Value* child(Procedure&, unsigned index) const; >+ inline Value* child(Procedure&, unsigned index) const; > int64_t value() const { return u.value; } > double doubleValue() const { return u.doubleValue; } > double floatValue() const { return u.floatValue; } >diff --git a/Source/JavaScriptCore/b3/air/AirInst.h b/Source/JavaScriptCore/b3/air/AirInst.h >index b572339e830..d8d601fcd8e 100644 >--- a/Source/JavaScriptCore/b3/air/AirInst.h >+++ b/Source/JavaScriptCore/b3/air/AirInst.h >@@ -127,8 +127,8 @@ struct Inst { > > // Reports any additional registers clobbered by this operation. Note that for efficiency, > // extraClobberedRegs() only works for the Patch opcode. >- RegisterSet extraClobberedRegs(); >- RegisterSet extraEarlyClobberedRegs(); >+ inline RegisterSet extraClobberedRegs(); >+ inline RegisterSet extraEarlyClobberedRegs(); > > // Iterate over all Def's that happen at the end of an instruction. You supply a pair > // instructions. The instructions must appear next to each other, in that order, in some basic >@@ -152,7 +152,7 @@ struct Inst { > > // Use this to report which registers are live. This should be done just before codegen. Note > // that for efficiency, reportUsedRegisters() only works for the Patch opcode. >- void reportUsedRegisters(const RegisterSet&); >+ inline void reportUsedRegisters(const RegisterSet&); > > // Is this instruction in one of the valid forms right now? This function is auto-generated by > // opcode_generator.rb. >@@ -166,10 +166,10 @@ struct Inst { > // > // This function is auto-generated by opcode_generator.rb. > bool admitsStack(unsigned argIndex); >- bool admitsStack(Arg&); >+ inline bool admitsStack(Arg&); > > bool admitsExtendedOffsetAddr(unsigned argIndex); >- bool admitsExtendedOffsetAddr(Arg&); >+ inline bool admitsExtendedOffsetAddr(Arg&); > > // Defined by opcode_generator.rb. > bool isTerminal(); >@@ -199,7 +199,7 @@ struct Inst { > // For example, > // Add Tmp1, Tmp2, Tmp3 > // returns 2 if 0 and 1 benefit from aliasing to Tmp3. >- Optional<unsigned> shouldTryAliasingDef(); >+ inline Optional<unsigned> shouldTryAliasingDef(); > > // This computes a hash for comparing this to JSAir's Inst. > unsigned jsHash() const; >diff --git a/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h b/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h >index a70753a7b99..6d9a75495cb 100644 >--- a/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h >+++ b/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h >@@ -49,7 +49,7 @@ public: > > bool isNull() { return !m_structure; } > >- void initializeProfile(VM&, JSGlobalObject*, JSCell* owner, JSObject* prototype, unsigned inferredInlineCapacity, JSFunction* constructor = nullptr, FunctionRareData* = nullptr); >+ ALWAYS_INLINE void initializeProfile(VM&, JSGlobalObject*, JSCell* owner, JSObject* prototype, unsigned inferredInlineCapacity, JSFunction* constructor = nullptr, FunctionRareData* = nullptr); > > Structure* structure() > { >@@ -83,7 +83,7 @@ public: > } > > private: >- unsigned possibleDefaultPropertyCount(VM&, JSObject* prototype); >+ ALWAYS_INLINE unsigned possibleDefaultPropertyCount(VM&, JSObject* prototype); > > Allocator m_allocator; // Precomputed to make things easier for generated code. > WriteBarrier<Structure> m_structure; >diff --git a/Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.h b/Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.h >index 3e3e8dfb4d5..abce3c53b7b 100644 >--- a/Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.h >+++ b/Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.h >@@ -42,21 +42,21 @@ public: > unsigned refCount; > }; > >- UnlinkedMetadataTable(); >- ~UnlinkedMetadataTable(); >+ ALWAYS_INLINE UnlinkedMetadataTable(); >+ ALWAYS_INLINE ~UnlinkedMetadataTable(); > >- unsigned addEntry(OpcodeID); >+ ALWAYS_INLINE unsigned addEntry(OpcodeID); > >- size_t sizeInBytes(); >+ ALWAYS_INLINE size_t sizeInBytes(); > >- void finalize(); >+ ALWAYS_INLINE void finalize(); > >- RefPtr<MetadataTable> link(); >+ ALWAYS_INLINE RefPtr<MetadataTable> link(); > > private: >- void unlink(MetadataTable&); >+ ALWAYS_INLINE void unlink(MetadataTable&); > >- size_t sizeInBytes(MetadataTable&); >+ ALWAYS_INLINE size_t sizeInBytes(MetadataTable&); > > using Offset = unsigned; > >diff --git a/Source/JavaScriptCore/dfg/DFGBlockSet.h b/Source/JavaScriptCore/dfg/DFGBlockSet.h >index 60b4496d084..f78d6d86d05 100644 >--- a/Source/JavaScriptCore/dfg/DFGBlockSet.h >+++ b/Source/JavaScriptCore/dfg/DFGBlockSet.h >@@ -72,7 +72,7 @@ public: > return *this; > } > >- BasicBlock* operator*() const; >+ inline BasicBlock* operator*() const; > > bool operator==(const iterator& other) const > { >diff --git a/Source/JavaScriptCore/heap/Allocator.h b/Source/JavaScriptCore/heap/Allocator.h >index 229158fce42..96bfac8e78f 100644 >--- a/Source/JavaScriptCore/heap/Allocator.h >+++ b/Source/JavaScriptCore/heap/Allocator.h >@@ -45,7 +45,7 @@ public: > { > } > >- void* allocate(GCDeferralContext*, AllocationFailureMode) const; >+ ALWAYS_INLINE void* allocate(GCDeferralContext*, AllocationFailureMode) const; > > unsigned cellSize() const; > >diff --git a/Source/JavaScriptCore/heap/CellContainer.h b/Source/JavaScriptCore/heap/CellContainer.h >index e4f2ff2872f..f2c8e15d06b 100644 >--- a/Source/JavaScriptCore/heap/CellContainer.h >+++ b/Source/JavaScriptCore/heap/CellContainer.h >@@ -58,8 +58,8 @@ public: > { > } > >- VM* vm() const; >- Heap* heap() const; >+ inline VM* vm() const; >+ inline Heap* heap() const; > > explicit operator bool() const { return !!m_encodedPointer; } > >@@ -78,20 +78,20 @@ public: > return *bitwise_cast<LargeAllocation*>(m_encodedPointer - isLargeAllocationBit); > } > >- void aboutToMark(HeapVersion markingVersion); >- bool areMarksStale() const; >+ inline void aboutToMark(HeapVersion markingVersion); >+ inline bool areMarksStale() const; > >- bool isMarked(HeapCell*) const; >- bool isMarked(HeapVersion markingVersion, HeapCell*) const; >+ inline bool isMarked(HeapCell*) const; >+ inline bool isMarked(HeapVersion markingVersion, HeapCell*) const; > > bool isNewlyAllocated(HeapCell*) const; > >- void noteMarked(); >- void assertValidCell(VM&, HeapCell*) const; >+ inline void noteMarked(); >+ inline void assertValidCell(VM&, HeapCell*) const; > >- size_t cellSize() const; >+ inline size_t cellSize() const; > >- WeakSet& weakSet() const; >+ inline WeakSet& weakSet() const; > > private: > static const uintptr_t isLargeAllocationBit = 1; >diff --git a/Source/JavaScriptCore/heap/GCDeferralContext.h b/Source/JavaScriptCore/heap/GCDeferralContext.h >index c60dd0a7609..ece2cf672be 100644 >--- a/Source/JavaScriptCore/heap/GCDeferralContext.h >+++ b/Source/JavaScriptCore/heap/GCDeferralContext.h >@@ -36,8 +36,8 @@ class GCDeferralContext { > friend class BlockDirectory; > friend class LocalAllocator; > public: >- inline GCDeferralContext(Heap&); >- inline ~GCDeferralContext(); >+ ALWAYS_INLINE GCDeferralContext(Heap&); >+ ALWAYS_INLINE ~GCDeferralContext(); > > private: > Heap& m_heap; >diff --git a/Source/JavaScriptCore/heap/GCSegmentedArray.h b/Source/JavaScriptCore/heap/GCSegmentedArray.h >index 359e83e1b35..9d8ab58c47d 100644 >--- a/Source/JavaScriptCore/heap/GCSegmentedArray.h >+++ b/Source/JavaScriptCore/heap/GCSegmentedArray.h >@@ -42,8 +42,8 @@ public: > { > } > >- static GCArraySegment* create(); >- static void destroy(GCArraySegment*); >+ static inline GCArraySegment* create(); >+ static inline void destroy(GCArraySegment*); > > T* data() > { >@@ -71,14 +71,14 @@ public: > GCSegmentedArray(); > ~GCSegmentedArray(); > >- void append(T); >+ inline void append(T); > >- bool canRemoveLast(); >- const T removeLast(); >+ inline bool canRemoveLast(); >+ inline const T removeLast(); > bool refill(); > >- size_t size(); >- bool isEmpty(); >+ inline size_t size(); >+ inline bool isEmpty(); > > void fillVector(Vector<T>&); > void clear(); >@@ -94,13 +94,13 @@ protected: > > void expand(); > >- size_t postIncTop(); >- size_t preDecTop(); >- void setTopForFullSegment(); >- void setTopForEmptySegment(); >- size_t top(); >+ inline size_t postIncTop(); >+ inline size_t preDecTop(); >+ inline void setTopForFullSegment(); >+ inline void setTopForEmptySegment(); >+ inline size_t top(); > >- void validatePrevious(); >+ inline void validatePrevious(); > > DoublyLinkedList<GCArraySegment<T>> m_segments; > >diff --git a/Source/JavaScriptCore/heap/HandleBlock.h b/Source/JavaScriptCore/heap/HandleBlock.h >index ef64433bb07..83c1c898116 100644 >--- a/Source/JavaScriptCore/heap/HandleBlock.h >+++ b/Source/JavaScriptCore/heap/HandleBlock.h >@@ -35,23 +35,23 @@ class HandleNode; > class HandleBlock : public DoublyLinkedListNode<HandleBlock> { > friend class WTF::DoublyLinkedListNode<HandleBlock>; > public: >- static HandleBlock* create(HandleSet*); >- static void destroy(HandleBlock*); >+ static inline HandleBlock* create(HandleSet*); >+ static inline void destroy(HandleBlock*); > static HandleBlock* blockFor(HandleNode*); > > static const size_t blockSize = 4 * KB; > > HandleSet* handleSet(); > >- HandleNode* nodes(); >- HandleNode* nodeAtIndex(unsigned); >- unsigned nodeCapacity(); >+ inline HandleNode* nodes(); >+ inline HandleNode* nodeAtIndex(unsigned); >+ inline unsigned nodeCapacity(); > > private: >- HandleBlock(HandleSet*); >+ inline HandleBlock(HandleSet*); > >- char* payload(); >- char* payloadEnd(); >+ inline char* payload(); >+ inline char* payloadEnd(); > > static const size_t s_blockMask = ~(blockSize - 1); > >diff --git a/Source/JavaScriptCore/heap/Heap.h b/Source/JavaScriptCore/heap/Heap.h >index af0f004c1e6..0ecdc3c53b4 100644 >--- a/Source/JavaScriptCore/heap/Heap.h >+++ b/Source/JavaScriptCore/heap/Heap.h >@@ -106,8 +106,8 @@ class Heap { > public: > friend class JIT; > friend class DFG::SpeculativeJIT; >- static Heap* heap(const JSValue); // 0 for immediate values >- static Heap* heap(const HeapCell*); >+ static inline Heap* heap(const JSValue); // 0 for immediate values >+ static ALWAYS_INLINE Heap* heap(const HeapCell*); > > // This constant determines how many blocks we iterate between checks of our > // deadline when calling Heap::isPagedOut. Decreasing it will cause us to detect >@@ -136,7 +136,7 @@ public: > void lastChanceToFinalize(); > void releaseDelayedReleasedObjects(); > >- VM* vm() const; >+ ALWAYS_INLINE VM* vm() const; > > MarkedSpace& objectSpace() { return m_objectSpace; } > MachineThreads& machineThreads() { return *m_machineThreads; } >@@ -154,8 +154,8 @@ public: > > MutatorState mutatorState() const { return m_mutatorState; } > Optional<CollectionScope> collectionScope() const { return m_collectionScope; } >- bool hasHeapAccess() const; >- bool worldIsStopped() const; >+ inline bool hasHeapAccess() const; >+ inline bool worldIsStopped() const; > bool worldIsRunning() const { return !worldIsStopped(); } > > // We're always busy on the collection threads. On the main thread, this returns true if we're >diff --git a/Source/JavaScriptCore/heap/IsoCellSet.h b/Source/JavaScriptCore/heap/IsoCellSet.h >index dada672c491..2e119247831 100644 >--- a/Source/JavaScriptCore/heap/IsoCellSet.h >+++ b/Source/JavaScriptCore/heap/IsoCellSet.h >@@ -45,11 +45,11 @@ public: > IsoCellSet(IsoSubspace& subspace); > ~IsoCellSet(); > >- bool add(HeapCell* cell); // Returns true if the cell was newly added. >+ inline bool add(HeapCell* cell); // Returns true if the cell was newly added. > >- bool remove(HeapCell* cell); // Returns true if the cell was previously present and got removed. >+ inline bool remove(HeapCell* cell); // Returns true if the cell was previously present and got removed. > >- bool contains(HeapCell* cell) const; >+ inline bool contains(HeapCell* cell) const; > > JS_EXPORT_PRIVATE Ref<SharedTask<MarkedBlock::Handle*()>> parallelNotEmptyMarkedBlockSource(); > >diff --git a/Source/JavaScriptCore/heap/IsoSubspace.h b/Source/JavaScriptCore/heap/IsoSubspace.h >index efd5cd3828e..2bbbf9ac90d 100644 >--- a/Source/JavaScriptCore/heap/IsoSubspace.h >+++ b/Source/JavaScriptCore/heap/IsoSubspace.h >@@ -45,7 +45,7 @@ public: > Allocator allocatorForNonVirtual(size_t, AllocatorForMode); > > void* allocate(VM&, size_t, GCDeferralContext*, AllocationFailureMode) override; >- void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode); >+ ALWAYS_INLINE void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode); > > private: > friend class IsoCellSet; >diff --git a/Source/JavaScriptCore/heap/LocalAllocator.h b/Source/JavaScriptCore/heap/LocalAllocator.h >index 9d8f5a4cef0..f2bee197e5e 100644 >--- a/Source/JavaScriptCore/heap/LocalAllocator.h >+++ b/Source/JavaScriptCore/heap/LocalAllocator.h >@@ -41,7 +41,7 @@ public: > LocalAllocator(BlockDirectory*); > ~LocalAllocator(); > >- void* allocate(GCDeferralContext*, AllocationFailureMode); >+ ALWAYS_INLINE void* allocate(GCDeferralContext*, AllocationFailureMode); > > unsigned cellSize() const { return m_cellSize; } > >diff --git a/Source/JavaScriptCore/heap/MarkedBlock.h b/Source/JavaScriptCore/heap/MarkedBlock.h >index e240f0ae2d7..3f5a2d13cb3 100644 >--- a/Source/JavaScriptCore/heap/MarkedBlock.h >+++ b/Source/JavaScriptCore/heap/MarkedBlock.h >@@ -115,14 +115,14 @@ public: > > void* cellAlign(void*); > >- bool isEmpty(); >+ inline bool isEmpty(); > > void lastChanceToFinalize(); > > BlockDirectory* directory() const; > Subspace* subspace() const; > AlignedMemoryAllocator* alignedMemoryAllocator() const; >- Heap* heap() const; >+ inline Heap* heap() const; > inline MarkedSpace* space() const; > VM* vm() const; > WeakSet& weakSet(); >@@ -171,13 +171,13 @@ public: > size_t markCount(); > size_t size(); > >- bool isAllocated(); >+ inline bool isAllocated(); > >- bool isLive(HeapVersion markingVersion, HeapVersion newlyAllocatedVersion, bool isMarking, const HeapCell*); >+ ALWAYS_INLINE bool isLive(HeapVersion markingVersion, HeapVersion newlyAllocatedVersion, bool isMarking, const HeapCell*); > inline bool isLiveCell(HeapVersion markingVersion, HeapVersion newlyAllocatedVersion, bool isMarking, const void*); > >- bool isLive(const HeapCell*); >- bool isLiveCell(const void*); >+ inline bool isLive(const HeapCell*); >+ inline bool isLiveCell(const void*); > > bool isFreeListedCell(const void* target) const; > >@@ -187,7 +187,7 @@ public: > template <typename Functor> inline IterationStatus forEachMarkedCell(const Functor&); > > JS_EXPORT_PRIVATE bool areMarksStale(); >- bool areMarksStaleForSweep(); >+ inline bool areMarksStaleForSweep(); > > void assertMarksNotStale(); > >@@ -211,11 +211,11 @@ public: > enum NewlyAllocatedMode { HasNewlyAllocated, DoesNotHaveNewlyAllocated }; > enum MarksMode { MarksStale, MarksNotStale }; > >- SweepDestructionMode sweepDestructionMode(); >- EmptyMode emptyMode(); >- ScribbleMode scribbleMode(); >- NewlyAllocatedMode newlyAllocatedMode(); >- MarksMode marksMode(); >+ inline SweepDestructionMode sweepDestructionMode(); >+ inline EmptyMode emptyMode(); >+ inline ScribbleMode scribbleMode(); >+ inline NewlyAllocatedMode newlyAllocatedMode(); >+ inline MarksMode marksMode(); > > template<bool, EmptyMode, SweepMode, SweepDestructionMode, ScribbleMode, NewlyAllocatedMode, MarksMode, typename DestroyFunc> > void specializedSweep(FreeList*, EmptyMode, SweepMode, SweepDestructionMode, ScribbleMode, NewlyAllocatedMode, MarksMode, const DestroyFunc&); >diff --git a/Source/JavaScriptCore/heap/SlotVisitor.h b/Source/JavaScriptCore/heap/SlotVisitor.h >index 0d2e6e0aa6f..1a422d2da40 100644 >--- a/Source/JavaScriptCore/heap/SlotVisitor.h >+++ b/Source/JavaScriptCore/heap/SlotVisitor.h >@@ -82,17 +82,17 @@ public: > const MarkStackArray& collectorMarkStack() const { return m_collectorStack; } > const MarkStackArray& mutatorMarkStack() const { return m_mutatorStack; } > >- VM& vm(); >- const VM& vm() const; >- Heap* heap() const; >+ inline VM& vm(); >+ inline const VM& vm() const; >+ inline Heap* heap() const; > > void append(ConservativeRoots&); > > template<typename T, typename Traits> void append(const WriteBarrierBase<T, Traits>&); > template<typename T, typename Traits> void appendHidden(const WriteBarrierBase<T, Traits>&); > template<typename Iterator> void append(Iterator begin , Iterator end); >- void appendValues(const WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>*, size_t count); >- void appendValuesHidden(const WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>*, size_t count); >+ ALWAYS_INLINE void appendValues(const WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>*, size_t count); >+ ALWAYS_INLINE void appendValuesHidden(const WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>*, size_t count); > > // These don't require you to prove that you have a WriteBarrier<>. That makes sense > // for: >@@ -103,19 +103,19 @@ public: > // > // If you are not a root and you don't know what kind of barrier you have, then you > // shouldn't call these methods. >- void appendUnbarriered(JSValue); >- void appendUnbarriered(JSValue*, size_t); >- void appendUnbarriered(JSCell*); >+ ALWAYS_INLINE void appendUnbarriered(JSValue); >+ ALWAYS_INLINE void appendUnbarriered(JSValue*, size_t); >+ ALWAYS_INLINE void appendUnbarriered(JSCell*); > > template<typename T> > void append(const Weak<T>& weak); > >- void appendHiddenUnbarriered(JSValue); >- void appendHiddenUnbarriered(JSCell*); >+ ALWAYS_INLINE void appendHiddenUnbarriered(JSValue); >+ ALWAYS_INLINE void appendHiddenUnbarriered(JSCell*); > >- bool addOpaqueRoot(void*); // Returns true if the root was new. >+ inline bool addOpaqueRoot(void*); // Returns true if the root was new. > >- bool containsOpaqueRoot(void*) const; >+ inline bool containsOpaqueRoot(void*) const; > > bool isEmpty() { return m_collectorStack.isEmpty() && m_mutatorStack.isEmpty(); } > >@@ -151,9 +151,9 @@ public: > // this then the space will be freed at end of GC. > void markAuxiliary(const void* base); > >- void reportExtraMemoryVisited(size_t); >+ inline void reportExtraMemoryVisited(size_t); > #if ENABLE(RESOURCE_USAGE) >- void reportExternalMemoryVisited(size_t); >+ inline void reportExternalMemoryVisited(size_t); > #endif > > void dump(PrintStream&) const; >diff --git a/Source/JavaScriptCore/heap/WeakBlock.h b/Source/JavaScriptCore/heap/WeakBlock.h >index 6d4ff0709d3..c5e124d7b67 100644 >--- a/Source/JavaScriptCore/heap/WeakBlock.h >+++ b/Source/JavaScriptCore/heap/WeakBlock.h >@@ -77,7 +77,7 @@ private: > void specializedVisit(ContainerType&, SlotVisitor&); > > explicit WeakBlock(CellContainer); >- void finalize(WeakImpl*); >+ inline void finalize(WeakImpl*); > WeakImpl* weakImpls(); > size_t weakImplCount(); > void addToFreeList(FreeCell**, WeakImpl*); >diff --git a/Source/JavaScriptCore/heap/WeakSet.h b/Source/JavaScriptCore/heap/WeakSet.h >index ddcf743b533..055b91c1268 100644 >--- a/Source/JavaScriptCore/heap/WeakSet.h >+++ b/Source/JavaScriptCore/heap/WeakSet.h >@@ -38,7 +38,7 @@ class WeakSet : public BasicRawSentinelNode<WeakSet> { > friend class LLIntOffsetsExtractor; > > public: >- static WeakImpl* allocate(JSValue, WeakHandleOwner* = 0, void* context = 0); >+ inline static WeakImpl* allocate(JSValue, WeakHandleOwner* = 0, void* context = 0); > static void deallocate(WeakImpl*); > > WeakSet(VM*, CellContainer); >diff --git a/Source/JavaScriptCore/interpreter/CLoopStack.h b/Source/JavaScriptCore/interpreter/CLoopStack.h >index 1f4d99d8b43..fe28d5d1909 100644 >--- a/Source/JavaScriptCore/interpreter/CLoopStack.h >+++ b/Source/JavaScriptCore/interpreter/CLoopStack.h >@@ -51,7 +51,7 @@ namespace JSC { > CLoopStack(VM&); > ~CLoopStack(); > >- bool ensureCapacityFor(Register* newTopOfStack); >+ inline bool ensureCapacityFor(Register* newTopOfStack); > > bool containsAddress(Register* address) { return (lowAddress() <= address && address < highAddress()); } > static size_t committedByteCount(); >@@ -88,7 +88,7 @@ namespace JSC { > void releaseExcessCapacity(); > void addToCommittedByteCount(long); > >- void setCLoopStackLimit(Register* newTopOfStack); >+ inline void setCLoopStackLimit(Register* newTopOfStack); > > VM& m_vm; > CallFrame*& m_topCallFrame; >diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h >index 6c9d3bb41b0..55ffb5ae173 100644 >--- a/Source/JavaScriptCore/jit/JIT.h >+++ b/Source/JavaScriptCore/jit/JIT.h >@@ -305,12 +305,12 @@ namespace JSC { > > void privateCompileExceptionHandlers(); > >- void addSlowCase(Jump); >- void addSlowCase(const JumpList&); >- void addSlowCase(); >- void addJump(Jump, int); >- void addJump(const JumpList&, int); >- void emitJumpSlowToHot(Jump, int); >+ ALWAYS_INLINE void addSlowCase(Jump); >+ ALWAYS_INLINE void addSlowCase(const JumpList&); >+ ALWAYS_INLINE void addSlowCase(); >+ ALWAYS_INLINE void addJump(Jump, int); >+ ALWAYS_INLINE void addJump(const JumpList&, int); >+ ALWAYS_INLINE void emitJumpSlowToHot(Jump, int); > > template<typename Op> > void compileOpCall(const Instruction*, unsigned callLinkInfoIndex); >@@ -343,10 +343,10 @@ namespace JSC { > void compileOpStrictEqJump(const Instruction*, CompileOpStrictEqType); > enum class CompileOpEqType { Eq, NEq }; > void compileOpEqJumpSlow(Vector<SlowCaseEntry>::iterator&, CompileOpEqType, int jumpTarget); >- bool isOperandConstantDouble(int src); >+ ALWAYS_INLINE bool isOperandConstantDouble(int src); > >- void emitLoadDouble(int index, FPRegisterID value); >- void emitLoadInt32ToDouble(int index, FPRegisterID value); >+ inline void emitLoadDouble(int index, FPRegisterID value); >+ inline void emitLoadInt32ToDouble(int index, FPRegisterID value); > > enum WriteBarrierMode { UnconditionalWriteBarrier, ShouldFilterBase, ShouldFilterValue, ShouldFilterBaseAndValue }; > // value register in write barrier is used before any scratch registers >@@ -357,18 +357,18 @@ namespace JSC { > > // This assumes that the value to profile is in regT0 and that regT3 is available for > // scratch. >- void emitValueProfilingSite(ValueProfile&); >+ inline void emitValueProfilingSite(ValueProfile&); > template<typename Metadata> void emitValueProfilingSite(Metadata&); > void emitValueProfilingSiteIfProfiledOpcode(...); > template<typename Op> > std::enable_if_t<std::is_same<decltype(Op::Metadata::profile), ValueProfile>::value, void> > emitValueProfilingSiteIfProfiledOpcode(Op bytecode); > >- void emitArrayProfilingSiteWithCell(RegisterID cell, RegisterID indexingType, ArrayProfile*); >- void emitArrayProfileStoreToHoleSpecialCase(ArrayProfile*); >- void emitArrayProfileOutOfBoundsSpecialCase(ArrayProfile*); >+ inline void emitArrayProfilingSiteWithCell(RegisterID cell, RegisterID indexingType, ArrayProfile*); >+ inline void emitArrayProfileStoreToHoleSpecialCase(ArrayProfile*); >+ inline void emitArrayProfileOutOfBoundsSpecialCase(ArrayProfile*); > >- JITArrayMode chooseArrayMode(ArrayProfile*); >+ inline JITArrayMode chooseArrayMode(ArrayProfile*); > > // Property is in regT1, base is in regT0. regT2 contains indexing type. > // Property is int-checked and zero extended. Base is cell checked. >@@ -378,12 +378,12 @@ namespace JSC { > JumpList emitDoubleLoad(const Instruction*, PatchableJump& badType); > JumpList emitContiguousLoad(const Instruction*, PatchableJump& badType, IndexingType expectedShape = ContiguousShape); > JumpList emitArrayStorageLoad(const Instruction*, PatchableJump& badType); >- JumpList emitLoadForArrayMode(const Instruction*, JITArrayMode, PatchableJump& badType); >+ ALWAYS_INLINE JumpList emitLoadForArrayMode(const Instruction*, JITArrayMode, PatchableJump& badType); > > JumpList emitInt32GetByVal(const Instruction* instruction, PatchableJump& badType) { return emitContiguousGetByVal(instruction, badType, Int32Shape); } >- JumpList emitDoubleGetByVal(const Instruction*, PatchableJump& badType); >- JumpList emitContiguousGetByVal(const Instruction*, PatchableJump& badType, IndexingType expectedShape = ContiguousShape); >- JumpList emitArrayStorageGetByVal(const Instruction*, PatchableJump& badType); >+ inline JumpList emitDoubleGetByVal(const Instruction*, PatchableJump& badType); >+ inline JumpList emitContiguousGetByVal(const Instruction*, PatchableJump& badType, IndexingType expectedShape = ContiguousShape); >+ inline JumpList emitArrayStorageGetByVal(const Instruction*, PatchableJump& badType); > JumpList emitDirectArgumentsGetByVal(const Instruction*, PatchableJump& badType); > JumpList emitScopedArgumentsGetByVal(const Instruction*, PatchableJump& badType); > JumpList emitIntTypedArrayGetByVal(const Instruction*, PatchableJump& badType, TypedArrayType); >@@ -427,31 +427,31 @@ namespace JSC { > enum FinalObjectMode { MayBeFinal, KnownNotFinal }; > > void emitGetVirtualRegister(int src, JSValueRegs dst); >- void emitPutVirtualRegister(int dst, JSValueRegs src); >+ ALWAYS_INLINE void emitPutVirtualRegister(int dst, JSValueRegs src); > >- int32_t getOperandConstantInt(int src); >- double getOperandConstantDouble(int src); >+ ALWAYS_INLINE int32_t getOperandConstantInt(int src); >+ ALWAYS_INLINE double getOperandConstantDouble(int src); > > #if USE(JSVALUE32_64) >- bool getOperandConstantInt(int op1, int op2, int& op, int32_t& constant); >+ ALWAYS_INLINE bool getOperandConstantInt(int op1, int op2, int& op, int32_t& constant); > >- void emitLoadTag(int index, RegisterID tag); >- void emitLoadPayload(int index, RegisterID payload); >+ inline void emitLoadTag(int index, RegisterID tag); >+ inline void emitLoadPayload(int index, RegisterID payload); > >- void emitLoad(const JSValue& v, RegisterID tag, RegisterID payload); >- void emitLoad(int index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister); >- void emitLoad2(int index1, RegisterID tag1, RegisterID payload1, int index2, RegisterID tag2, RegisterID payload2); >+ inline void emitLoad(const JSValue& v, RegisterID tag, RegisterID payload); >+ inline void emitLoad(int index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister); >+ inline void emitLoad2(int index1, RegisterID tag1, RegisterID payload1, int index2, RegisterID tag2, RegisterID payload2); > >- void emitStore(int index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister); >- void emitStore(int index, const JSValue constant, RegisterID base = callFrameRegister); >- void emitStoreInt32(int index, RegisterID payload, bool indexIsInt32 = false); >- void emitStoreInt32(int index, TrustedImm32 payload, bool indexIsInt32 = false); >- void emitStoreCell(int index, RegisterID payload, bool indexIsCell = false); >- void emitStoreBool(int index, RegisterID payload, bool indexIsBool = false); >- void emitStoreDouble(int index, FPRegisterID value); >+ inline void emitStore(int index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister); >+ inline void emitStore(int index, const JSValue constant, RegisterID base = callFrameRegister); >+ inline void emitStoreInt32(int index, RegisterID payload, bool indexIsInt32 = false); >+ inline void emitStoreInt32(int index, TrustedImm32 payload, bool indexIsInt32 = false); >+ inline void emitStoreCell(int index, RegisterID payload, bool indexIsCell = false); >+ inline void emitStoreBool(int index, RegisterID payload, bool indexIsBool = false); >+ inline void emitStoreDouble(int index, FPRegisterID value); > >- void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex); >- void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex, RegisterID tag); >+ inline void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex); >+ inline void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex, RegisterID tag); > > void compileGetByIdHotPath(const Identifier*); > >@@ -460,11 +460,11 @@ namespace JSC { > void emitBinaryDoubleOp(const Instruction *, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true); > > #else // USE(JSVALUE32_64) >- void emitGetVirtualRegister(int src, RegisterID dst); >- void emitGetVirtualRegister(VirtualRegister src, RegisterID dst); >- void emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2); >- void emitGetVirtualRegisters(VirtualRegister src1, RegisterID dst1, VirtualRegister src2, RegisterID dst2); >- void emitPutVirtualRegister(int dst, RegisterID from = regT0); >+ ALWAYS_INLINE void emitGetVirtualRegister(int src, RegisterID dst); >+ ALWAYS_INLINE void emitGetVirtualRegister(VirtualRegister src, RegisterID dst); >+ ALWAYS_INLINE void emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2); >+ ALWAYS_INLINE void emitGetVirtualRegisters(VirtualRegister src1, RegisterID dst1, VirtualRegister src2, RegisterID dst2); >+ ALWAYS_INLINE void emitPutVirtualRegister(int dst, RegisterID from = regT0); > void emitPutVirtualRegister(VirtualRegister dst, RegisterID from = regT0); > void emitStoreCell(int dst, RegisterID payload, bool /* only used in JSValue32_64 */ = false) > { >@@ -475,15 +475,15 @@ namespace JSC { > emitPutVirtualRegister(dst, payload); > } > >- Jump emitJumpIfBothJSCells(RegisterID, RegisterID, RegisterID); >- void emitJumpSlowCaseIfJSCell(RegisterID); >- void emitJumpSlowCaseIfNotJSCell(RegisterID); >- void emitJumpSlowCaseIfNotJSCell(RegisterID, int VReg); >- Jump emitJumpIfNotInt(RegisterID, RegisterID, RegisterID scratch); >- PatchableJump emitPatchableJumpIfNotInt(RegisterID); >- void emitJumpSlowCaseIfNotInt(RegisterID); >- void emitJumpSlowCaseIfNotNumber(RegisterID); >- void emitJumpSlowCaseIfNotInt(RegisterID, RegisterID, RegisterID scratch); >+ ALWAYS_INLINE Jump emitJumpIfBothJSCells(RegisterID, RegisterID, RegisterID); >+ ALWAYS_INLINE void emitJumpSlowCaseIfJSCell(RegisterID); >+ ALWAYS_INLINE void emitJumpSlowCaseIfNotJSCell(RegisterID); >+ ALWAYS_INLINE void emitJumpSlowCaseIfNotJSCell(RegisterID, int VReg); >+ ALWAYS_INLINE Jump emitJumpIfNotInt(RegisterID, RegisterID, RegisterID scratch); >+ ALWAYS_INLINE PatchableJump emitPatchableJumpIfNotInt(RegisterID); >+ ALWAYS_INLINE void emitJumpSlowCaseIfNotInt(RegisterID); >+ ALWAYS_INLINE void emitJumpSlowCaseIfNotNumber(RegisterID); >+ ALWAYS_INLINE void emitJumpSlowCaseIfNotInt(RegisterID, RegisterID, RegisterID scratch); > > void compileGetByIdHotPath(int baseVReg, const Identifier*); > >@@ -714,13 +714,13 @@ namespace JSC { > void emitPutGlobalVariableIndirect(JSValue** addressOfOperand, int value, WatchpointSet**); > void emitPutClosureVar(int scope, uintptr_t operand, int value, WatchpointSet*); > >- void emitInitRegister(int dst); >+ ALWAYS_INLINE void emitInitRegister(int dst); > >- void emitPutIntToCallFrameHeader(RegisterID from, int entry); >+ ALWAYS_INLINE void emitPutIntToCallFrameHeader(RegisterID from, int entry); > >- JSValue getConstantOperand(int src); >- bool isOperandConstantInt(int src); >- bool isOperandConstantChar(int src); >+ ALWAYS_INLINE JSValue getConstantOperand(int src); >+ ALWAYS_INLINE bool isOperandConstantInt(int src); >+ ALWAYS_INLINE bool isOperandConstantChar(int src); > > template <typename Op, typename Generator, typename ProfiledFunction, typename NonProfiledFunction> > void emitMathICFast(JITUnaryMathIC<Generator>*, const Instruction*, ProfiledFunction, NonProfiledFunction); >@@ -747,7 +747,7 @@ namespace JSC { > ASSERT(!iter->from.isSet()); > ++iter; > } >- void linkSlowCaseIfNotJSCell(Vector<SlowCaseEntry>::iterator&, int virtualRegisterIndex); >+ ALWAYS_INLINE void linkSlowCaseIfNotJSCell(Vector<SlowCaseEntry>::iterator&, int virtualRegisterIndex); > void linkAllSlowCasesForBytecodeOffset(Vector<SlowCaseEntry>& slowCases, > Vector<SlowCaseEntry>::iterator&, unsigned bytecodeOffset); > >@@ -756,12 +756,12 @@ namespace JSC { > linkAllSlowCasesForBytecodeOffset(m_slowCases, iter, m_bytecodeOffset); > } > >- MacroAssembler::Call appendCallWithExceptionCheck(const FunctionPtr<CFunctionPtrTag>); >+ ALWAYS_INLINE MacroAssembler::Call appendCallWithExceptionCheck(const FunctionPtr<CFunctionPtrTag>); > #if OS(WINDOWS) && CPU(X86_64) >- MacroAssembler::Call appendCallWithExceptionCheckAndSlowPathReturnType(const FunctionPtr<CFunctionPtrTag>); >+ ALWAYS_INLINE MacroAssembler::Call appendCallWithExceptionCheckAndSlowPathReturnType(const FunctionPtr<CFunctionPtrTag>); > #endif >- MacroAssembler::Call appendCallWithCallFrameRollbackOnException(const FunctionPtr<CFunctionPtrTag>); >- MacroAssembler::Call appendCallWithExceptionCheckSetJSValueResult(const FunctionPtr<CFunctionPtrTag>, int); >+ ALWAYS_INLINE MacroAssembler::Call appendCallWithCallFrameRollbackOnException(const FunctionPtr<CFunctionPtrTag>); >+ ALWAYS_INLINE MacroAssembler::Call appendCallWithExceptionCheckSetJSValueResult(const FunctionPtr<CFunctionPtrTag>, int); > template<typename Metadata> > MacroAssembler::Call appendCallWithExceptionCheckSetJSValueResultWithProfile(Metadata&, const FunctionPtr<CFunctionPtrTag>, int); > >@@ -854,15 +854,15 @@ namespace JSC { > template<typename Op> > void emitRightShiftFastPath(const Instruction* currentInstruction, JITRightShiftGenerator::ShiftType); > >- void updateTopCallFrame(); >+ ALWAYS_INLINE void updateTopCallFrame(); > >- Call emitNakedCall(CodePtr<NoPtrTag> function = CodePtr<NoPtrTag>()); >- Call emitNakedTailCall(CodePtr<NoPtrTag> function = CodePtr<NoPtrTag>()); >+ ALWAYS_INLINE Call emitNakedCall(CodePtr<NoPtrTag> function = CodePtr<NoPtrTag>()); >+ ALWAYS_INLINE Call emitNakedTailCall(CodePtr<NoPtrTag> function = CodePtr<NoPtrTag>()); > > // Loads the character value of a single character string into dst. >- void emitLoadCharacterString(RegisterID src, RegisterID dst, JumpList& failures); >+ ALWAYS_INLINE void emitLoadCharacterString(RegisterID src, RegisterID dst, JumpList& failures); > >- int jumpTarget(const Instruction*, int target); >+ ALWAYS_INLINE int jumpTarget(const Instruction*, int target); > > #if ENABLE(DFG_JIT) > void emitEnterOptimizationCheck(); >@@ -875,20 +875,20 @@ namespace JSC { > #endif > > #if ENABLE(SAMPLING_FLAGS) >- void setSamplingFlag(int32_t); >- void clearSamplingFlag(int32_t); >+ ALWAYS_INLINE void setSamplingFlag(int32_t); >+ ALWAYS_INLINE void clearSamplingFlag(int32_t); > #endif > > #if ENABLE(SAMPLING_COUNTERS) >- void emitCount(AbstractSamplingCounter&, int32_t = 1); >+ ALWAYS_INLINE void emitCount(AbstractSamplingCounter&, int32_t = 1); > #endif > > #if ENABLE(OPCODE_SAMPLING) >- void sampleInstruction(const Instruction*, bool = false); >+ ALWAYS_INLINE void sampleInstruction(const Instruction*, bool = false); > #endif > > #if ENABLE(CODEBLOCK_SAMPLING) >- void sampleCodeBlock(CodeBlock*); >+ ALWAYS_INLINE void sampleCodeBlock(CodeBlock*); > #else > void sampleCodeBlock(CodeBlock*) {} > #endif >@@ -911,7 +911,7 @@ namespace JSC { > // If you need to check a value from the metadata table and you need it to > // be consistent across the fast and slow path, then you want to use this. > // It will give the slow path the same value read by the fast path. >- GetPutInfo copiedGetPutInfo(OpPutToScope); >+ ALWAYS_INLINE GetPutInfo copiedGetPutInfo(OpPutToScope); > template<typename BinaryOp> > ArithProfile copiedArithProfile(BinaryOp); > >diff --git a/Source/JavaScriptCore/jit/JITCode.h b/Source/JavaScriptCore/jit/JITCode.h >index e70647ffb57..3b85cbf570f 100644 >--- a/Source/JavaScriptCore/jit/JITCode.h >+++ b/Source/JavaScriptCore/jit/JITCode.h >@@ -185,7 +185,7 @@ public: > > virtual void validateReferences(const TrackedReferences&); > >- JSValue execute(VM*, ProtoCallFrame*); >+ ALWAYS_INLINE JSValue execute(VM*, ProtoCallFrame*); > > void* start() { return dataAddressAtOffset(0); } > virtual size_t size() = 0; >diff --git a/Source/JavaScriptCore/runtime/Butterfly.h b/Source/JavaScriptCore/runtime/Butterfly.h >index 50ff8f08fd9..ec8611a0cca 100644 >--- a/Source/JavaScriptCore/runtime/Butterfly.h >+++ b/Source/JavaScriptCore/runtime/Butterfly.h >@@ -147,10 +147,10 @@ public: > } > > ALWAYS_INLINE static unsigned availableContiguousVectorLength(size_t propertyCapacity, unsigned vectorLength); >- static unsigned availableContiguousVectorLength(Structure*, unsigned vectorLength); >+ ALWAYS_INLINE static unsigned availableContiguousVectorLength(Structure*, unsigned vectorLength); > > ALWAYS_INLINE static unsigned optimalContiguousVectorLength(size_t propertyCapacity, unsigned vectorLength); >- static unsigned optimalContiguousVectorLength(Structure*, unsigned vectorLength); >+ ALWAYS_INLINE static unsigned optimalContiguousVectorLength(Structure*, unsigned vectorLength); > > // This method is here not just because it's handy, but to remind you that > // the whole point of butterflies is to do evil pointer arithmetic. >@@ -166,12 +166,12 @@ public: > static ptrdiff_t offsetOfPublicLength() { return offsetOfIndexingHeader() + IndexingHeader::offsetOfPublicLength(); } > static ptrdiff_t offsetOfVectorLength() { return offsetOfIndexingHeader() + IndexingHeader::offsetOfVectorLength(); } > >- static Butterfly* tryCreateUninitialized(VM&, JSObject* intendedOwner, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, size_t indexingPayloadSizeInBytes, GCDeferralContext* = nullptr); >- static Butterfly* createUninitialized(VM&, JSObject* intendedOwner, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, size_t indexingPayloadSizeInBytes); >+ inline static Butterfly* tryCreateUninitialized(VM&, JSObject* intendedOwner, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, size_t indexingPayloadSizeInBytes, GCDeferralContext* = nullptr); >+ inline static Butterfly* createUninitialized(VM&, JSObject* intendedOwner, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, size_t indexingPayloadSizeInBytes); > >- static Butterfly* tryCreate(VM& vm, JSObject*, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, const IndexingHeader& indexingHeader, size_t indexingPayloadSizeInBytes); >- static Butterfly* create(VM&, JSObject* intendedOwner, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, const IndexingHeader&, size_t indexingPayloadSizeInBytes); >- static Butterfly* create(VM&, JSObject* intendedOwner, Structure*); >+ inline static Butterfly* tryCreate(VM& vm, JSObject*, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, const IndexingHeader& indexingHeader, size_t indexingPayloadSizeInBytes); >+ inline static Butterfly* create(VM&, JSObject* intendedOwner, size_t preCapacity, size_t propertyCapacity, bool hasIndexingHeader, const IndexingHeader&, size_t indexingPayloadSizeInBytes); >+ inline static Butterfly* create(VM&, JSObject* intendedOwner, Structure*); > > IndexingHeader* indexingHeader() { return IndexingHeader::from(this); } > const IndexingHeader* indexingHeader() const { return IndexingHeader::from(this); } >@@ -207,9 +207,9 @@ public: > } > > void* base(size_t preCapacity, size_t propertyCapacity) { return propertyStorage() - propertyCapacity - preCapacity; } >- void* base(Structure*); >+ inline void* base(Structure*); > >- static Butterfly* createOrGrowArrayRight( >+ inline static Butterfly* createOrGrowArrayRight( > Butterfly*, VM&, JSObject* intendedOwner, Structure* oldStructure, > size_t propertyCapacity, bool hadIndexingHeader, > size_t oldIndexingPayloadSizeInBytes, size_t newIndexingPayloadSizeInBytes); >@@ -219,13 +219,13 @@ public: > // methods is not exhaustive and is not intended to encapsulate all possible allocation > // modes of butterflies - there are code paths that allocate butterflies by calling > // directly into Heap::tryAllocateStorage. >- static Butterfly* createOrGrowPropertyStorage(Butterfly*, VM&, JSObject* intendedOwner, Structure*, size_t oldPropertyCapacity, size_t newPropertyCapacity); >- Butterfly* growArrayRight(VM&, JSObject* intendedOwner, Structure* oldStructure, size_t propertyCapacity, bool hadIndexingHeader, size_t oldIndexingPayloadSizeInBytes, size_t newIndexingPayloadSizeInBytes); // Assumes that preCapacity is zero, and asserts as much. >- Butterfly* growArrayRight(VM&, JSObject* intendedOwner, Structure*, size_t newIndexingPayloadSizeInBytes); >- Butterfly* resizeArray(VM&, JSObject* intendedOwner, size_t propertyCapacity, bool oldHasIndexingHeader, size_t oldIndexingPayloadSizeInBytes, size_t newPreCapacity, bool newHasIndexingHeader, size_t newIndexingPayloadSizeInBytes); >- Butterfly* resizeArray(VM&, JSObject* intendedOwner, Structure*, size_t newPreCapacity, size_t newIndexingPayloadSizeInBytes); // Assumes that you're not changing whether or not the object has an indexing header. >- Butterfly* unshift(Structure*, size_t numberOfSlots); >- Butterfly* shift(Structure*, size_t numberOfSlots); >+ inline static Butterfly* createOrGrowPropertyStorage(Butterfly*, VM&, JSObject* intendedOwner, Structure*, size_t oldPropertyCapacity, size_t newPropertyCapacity); >+ inline Butterfly* growArrayRight(VM&, JSObject* intendedOwner, Structure* oldStructure, size_t propertyCapacity, bool hadIndexingHeader, size_t oldIndexingPayloadSizeInBytes, size_t newIndexingPayloadSizeInBytes); // Assumes that preCapacity is zero, and asserts as much. >+ inline Butterfly* growArrayRight(VM&, JSObject* intendedOwner, Structure*, size_t newIndexingPayloadSizeInBytes); >+ inline Butterfly* resizeArray(VM&, JSObject* intendedOwner, size_t propertyCapacity, bool oldHasIndexingHeader, size_t oldIndexingPayloadSizeInBytes, size_t newPreCapacity, bool newHasIndexingHeader, size_t newIndexingPayloadSizeInBytes); >+ inline Butterfly* resizeArray(VM&, JSObject* intendedOwner, Structure*, size_t newPreCapacity, size_t newIndexingPayloadSizeInBytes); // Assumes that you're not changing whether or not the object has an indexing header. >+ inline Butterfly* unshift(Structure*, size_t numberOfSlots); >+ inline Butterfly* shift(Structure*, size_t numberOfSlots); > }; > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/Identifier.h b/Source/JavaScriptCore/runtime/Identifier.h >index 54e84631d76..4439cf2fc73 100644 >--- a/Source/JavaScriptCore/runtime/Identifier.h >+++ b/Source/JavaScriptCore/runtime/Identifier.h >@@ -114,18 +114,18 @@ public: > static Identifier fromString(VM*, const char (&characters)[charactersCount]); > template<unsigned charactersCount> > static Identifier fromString(ExecState*, const char (&characters)[charactersCount]); >- static Identifier fromString(VM*, const LChar*, int length); >- static Identifier fromString(VM*, const UChar*, int length); >- static Identifier fromString(VM*, const String&); >- static Identifier fromString(ExecState*, AtomicStringImpl*); >- static Identifier fromString(ExecState*, const AtomicString&); >- static Identifier fromString(ExecState*, const String&); >- static Identifier fromString(ExecState*, const char*); >+ inline static Identifier fromString(VM*, const LChar*, int length); >+ inline static Identifier fromString(VM*, const UChar*, int length); >+ inline static Identifier fromString(VM*, const String&); >+ inline static Identifier fromString(ExecState*, AtomicStringImpl*); >+ inline static Identifier fromString(ExecState*, const AtomicString&); >+ inline static Identifier fromString(ExecState*, const String&); >+ inline static Identifier fromString(ExecState*, const char*); > static Identifier fromString(VM* vm, const Vector<LChar>& characters) { return fromString(vm, characters.data(), characters.size()); } > >- static Identifier fromUid(VM*, UniquedStringImpl* uid); >- static Identifier fromUid(ExecState*, UniquedStringImpl* uid); >- static Identifier fromUid(const PrivateName&); >+ inline static Identifier fromUid(VM*, UniquedStringImpl* uid); >+ inline static Identifier fromUid(ExecState*, UniquedStringImpl* uid); >+ inline static Identifier fromUid(const PrivateName&); > > static Identifier createLCharFromUChar(VM* vm, const UChar* s, int length) { return Identifier(vm, add8(vm, s, length)); } > >@@ -156,8 +156,8 @@ public: > static bool equal(const StringImpl* a, const StringImpl* b) { return ::equal(a, b); } > > // Only to be used with string literals. >- JS_EXPORT_PRIVATE static Ref<StringImpl> add(VM*, const char*); >- JS_EXPORT_PRIVATE static Ref<StringImpl> add(ExecState*, const char*); >+ JS_EXPORT_PRIVATE inline static Ref<StringImpl> add(VM*, const char*); >+ JS_EXPORT_PRIVATE inline static Ref<StringImpl> add(ExecState*, const char*); > > void dump(PrintStream&) const; > >@@ -170,8 +170,8 @@ private: > > Identifier(VM* vm, const LChar* s, int length) : m_string(add(vm, s, length)) { ASSERT(m_string.impl()->isAtomic()); } > Identifier(VM* vm, const UChar* s, int length) : m_string(add(vm, s, length)) { ASSERT(m_string.impl()->isAtomic()); } >- Identifier(ExecState*, AtomicStringImpl*); >- Identifier(ExecState*, const AtomicString&); >+ inline Identifier(ExecState*, AtomicStringImpl*); >+ inline Identifier(ExecState*, const AtomicString&); > Identifier(VM* vm, const String& string) : m_string(add(vm, string.impl())) { ASSERT(m_string.impl()->isAtomic()); } > Identifier(VM* vm, StringImpl* rep) : m_string(add(vm, rep)) { ASSERT(m_string.impl()->isAtomic()); } > >@@ -282,10 +282,10 @@ ALWAYS_INLINE Optional<uint32_t> parseIndex(const Identifier& identifier) > return parseIndex(*uid); > } > >-JSValue identifierToJSValue(VM&, const Identifier&); >+inline JSValue identifierToJSValue(VM&, const Identifier&); > // This will stringify private symbols. When leaking JSValues to > // non-internal code, make sure to use this function and not the above one. >-JSValue identifierToSafePublicJSValue(VM&, const Identifier&); >+inline JSValue identifierToSafePublicJSValue(VM&, const Identifier&); > > // FIXME: It may be better for this to just be a typedef for PtrHash, since PtrHash may be cheaper to > // compute than loading the StringImpl's hash from memory. That change would also reduce the likelihood of >diff --git a/Source/JavaScriptCore/runtime/IndexingHeader.h b/Source/JavaScriptCore/runtime/IndexingHeader.h >index 5d7e6de1ac1..8900aa7e947 100644 >--- a/Source/JavaScriptCore/runtime/IndexingHeader.h >+++ b/Source/JavaScriptCore/runtime/IndexingHeader.h >@@ -114,8 +114,8 @@ public: > > // These methods are not standalone in the sense that they cannot be > // used on a copy of the IndexingHeader. >- size_t preCapacity(Structure*); >- size_t indexingPayloadSizeInBytes(Structure*); >+ inline size_t preCapacity(Structure*); >+ inline size_t indexingPayloadSizeInBytes(Structure*); > > private: > friend class LLIntOffsetsExtractor; >diff --git a/Source/JavaScriptCore/runtime/InferredType.h b/Source/JavaScriptCore/runtime/InferredType.h >index 9b86f4c7d02..c6804876bd9 100644 >--- a/Source/JavaScriptCore/runtime/InferredType.h >+++ b/Source/JavaScriptCore/runtime/InferredType.h >@@ -234,7 +234,7 @@ public: > > void dump(PrintStream&) const; > >- void finalizeUnconditionally(VM&); >+ inline void finalizeUnconditionally(VM&); > > private: > InferredType(VM&); >diff --git a/Source/JavaScriptCore/runtime/JSArray.h b/Source/JavaScriptCore/runtime/JSArray.h >index 4877eb86aa1..0b7405b2649 100644 >--- a/Source/JavaScriptCore/runtime/JSArray.h >+++ b/Source/JavaScriptCore/runtime/JSArray.h >@@ -94,16 +94,16 @@ public: > // OK to use on new arrays, but not if it might be a RegExpMatchArray or RuntimeArray. > JS_EXPORT_PRIVATE bool setLength(ExecState*, unsigned, bool throwException = false); > >- void pushInline(ExecState*, JSValue); >+ ALWAYS_INLINE void pushInline(ExecState*, JSValue); > JS_EXPORT_PRIVATE void push(ExecState*, JSValue); > JS_EXPORT_PRIVATE JSValue pop(ExecState*); > > JSArray* fastSlice(ExecState&, unsigned startIndex, unsigned count); > >- bool canFastCopy(VM&, JSArray* otherArray); >- bool canDoFastIndexedAccess(VM&); >+ inline bool canFastCopy(VM&, JSArray* otherArray); >+ inline bool canDoFastIndexedAccess(VM&); > // This function returns NonArray if the indexing types are not compatable for copying. >- IndexingType mergeIndexingTypeForCopying(IndexingType other); >+ inline IndexingType mergeIndexingTypeForCopying(IndexingType other); > bool appendMemcpy(ExecState*, VM&, unsigned startIndex, JSArray* otherArray); > > enum ShiftCountMode { >diff --git a/Source/JavaScriptCore/runtime/JSArrayBufferView.h b/Source/JavaScriptCore/runtime/JSArrayBufferView.h >index ef7ebe1ad2a..a14ecff4f26 100644 >--- a/Source/JavaScriptCore/runtime/JSArrayBufferView.h >+++ b/Source/JavaScriptCore/runtime/JSArrayBufferView.h >@@ -157,19 +157,19 @@ public: > TypedArrayMode mode() const { return m_mode; } > bool hasArrayBuffer() const { return JSC::hasArrayBuffer(mode()); } > >- bool isShared(); >+ inline bool isShared(); > JS_EXPORT_PRIVATE ArrayBuffer* unsharedBuffer(); >- ArrayBuffer* possiblySharedBuffer(); >+ inline ArrayBuffer* possiblySharedBuffer(); > JSArrayBuffer* unsharedJSBuffer(ExecState* exec); > JSArrayBuffer* possiblySharedJSBuffer(ExecState* exec); >- RefPtr<ArrayBufferView> unsharedImpl(); >+ inline RefPtr<ArrayBufferView> unsharedImpl(); > JS_EXPORT_PRIVATE RefPtr<ArrayBufferView> possiblySharedImpl(); > bool isNeutered() { return hasArrayBuffer() && !vector(); } > void neuter(); > > void* vector() const { return m_vector.getMayBeNull(); } > >- unsigned byteOffset(); >+ inline unsigned byteOffset(); > unsigned length() const { return m_length; } > > DECLARE_EXPORT_INFO; >@@ -178,7 +178,7 @@ public: > static ptrdiff_t offsetOfLength() { return OBJECT_OFFSETOF(JSArrayBufferView, m_length); } > static ptrdiff_t offsetOfMode() { return OBJECT_OFFSETOF(JSArrayBufferView, m_mode); } > >- static RefPtr<ArrayBufferView> toWrapped(VM&, JSValue); >+ inline static RefPtr<ArrayBufferView> toWrapped(VM&, JSValue); > > private: > JS_EXPORT_PRIVATE ArrayBuffer* slowDownAndWasteMemory(); >@@ -187,7 +187,7 @@ private: > protected: > friend class LLIntOffsetsExtractor; > >- ArrayBuffer* existingBufferInButterfly(); >+ inline ArrayBuffer* existingBufferInButterfly(); > > static String toStringName(const JSObject*, ExecState*); > >diff --git a/Source/JavaScriptCore/runtime/JSCJSValue.h b/Source/JavaScriptCore/runtime/JSCJSValue.h >index 1957528f260..10cc5f8b172 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValue.h >+++ b/Source/JavaScriptCore/runtime/JSCJSValue.h >@@ -122,8 +122,8 @@ enum WhichValueWord { > PayloadWord > }; > >-int64_t tryConvertToInt52(double); >-bool isInt52(double); >+inline int64_t tryConvertToInt52(double); >+inline bool isInt52(double); > > enum class SourceCodeRepresentation : uint8_t { > Other, >@@ -165,8 +165,8 @@ public: > > #endif > >- static EncodedJSValue encode(JSValue); >- static JSValue decode(EncodedJSValue); >+ inline static EncodedJSValue encode(JSValue); >+ inline static JSValue decode(EncodedJSValue); > > enum JSNullTag { JSNull }; > enum JSUndefinedTag { JSUndefined }; >@@ -175,108 +175,108 @@ public: > enum JSCellTag { JSCellType }; > enum EncodeAsDoubleTag { EncodeAsDouble }; > >- JSValue(); >- JSValue(JSNullTag); >- JSValue(JSUndefinedTag); >- JSValue(JSTrueTag); >- JSValue(JSFalseTag); >- JSValue(JSCell* ptr); >- JSValue(const JSCell* ptr); >+ inline JSValue(); >+ inline JSValue(JSNullTag); >+ inline JSValue(JSUndefinedTag); >+ inline JSValue(JSTrueTag); >+ inline JSValue(JSFalseTag); >+ inline JSValue(JSCell* ptr); >+ inline JSValue(const JSCell* ptr); > > // Numbers >- JSValue(EncodeAsDoubleTag, double); >- explicit JSValue(double); >- explicit JSValue(char); >- explicit JSValue(unsigned char); >- explicit JSValue(short); >- explicit JSValue(unsigned short); >- explicit JSValue(int); >- explicit JSValue(unsigned); >- explicit JSValue(long); >- explicit JSValue(unsigned long); >- explicit JSValue(long long); >- explicit JSValue(unsigned long long); >- >- explicit operator bool() const; >- bool operator==(const JSValue& other) const; >- bool operator!=(const JSValue& other) const; >- >- bool isInt32() const; >- bool isUInt32() const; >- bool isDouble() const; >- bool isTrue() const; >- bool isFalse() const; >- >- int32_t asInt32() const; >- uint32_t asUInt32() const; >- int64_t asAnyInt() const; >- double asDouble() const; >- bool asBoolean() const; >- double asNumber() const; >+ ALWAYS_INLINE JSValue(EncodeAsDoubleTag, double); >+ inline explicit JSValue(double); >+ inline explicit JSValue(char); >+ inline explicit JSValue(unsigned char); >+ inline explicit JSValue(short); >+ inline explicit JSValue(unsigned short); >+ inline explicit JSValue(int); >+ inline explicit JSValue(unsigned); >+ inline explicit JSValue(long); >+ inline explicit JSValue(unsigned long); >+ inline explicit JSValue(long long); >+ inline explicit JSValue(unsigned long long); >+ >+ inline explicit operator bool() const; >+ inline bool operator==(const JSValue& other) const; >+ inline bool operator!=(const JSValue& other) const; >+ >+ inline bool isInt32() const; >+ inline bool isUInt32() const; >+ inline bool isDouble() const; >+ inline bool isTrue() const; >+ inline bool isFalse() const; >+ >+ inline int32_t asInt32() const; >+ inline uint32_t asUInt32() const; >+ inline int64_t asAnyInt() const; >+ inline double asDouble() const; >+ inline bool asBoolean() const; >+ inline double asNumber() const; > >- int32_t asInt32ForArithmetic() const; // Boolean becomes an int, but otherwise like asInt32(). >+ inline int32_t asInt32ForArithmetic() const; // Boolean becomes an int, but otherwise like asInt32(). > > // Querying the type. >- bool isEmpty() const; >- bool isFunction(VM&) const; >- bool isCallable(VM&, CallType&, CallData&) const; >- bool isConstructor(VM&) const; >- bool isConstructor(VM&, ConstructType&, ConstructData&) const; >- bool isUndefined() const; >- bool isNull() const; >- bool isUndefinedOrNull() const; >- bool isBoolean() const; >- bool isAnyInt() const; >- bool isNumber() const; >- bool isString() const; >- bool isBigInt() const; >- bool isSymbol() const; >- bool isPrimitive() const; >- bool isGetterSetter() const; >- bool isCustomGetterSetter() const; >- bool isObject() const; >- bool inherits(VM&, const ClassInfo*) const; >+ inline bool isEmpty() const; >+ inline bool isFunction(VM&) const; >+ inline bool isCallable(VM&, CallType&, CallData&) const; >+ inline bool isConstructor(VM&) const; >+ inline bool isConstructor(VM&, ConstructType&, ConstructData&) const; >+ inline bool isUndefined() const; >+ inline bool isNull() const; >+ inline bool isUndefinedOrNull() const; >+ inline bool isBoolean() const; >+ inline bool isAnyInt() const; >+ inline bool isNumber() const; >+ inline bool isString() const; >+ inline bool isBigInt() const; >+ inline bool isSymbol() const; >+ inline bool isPrimitive() const; >+ inline bool isGetterSetter() const; >+ inline bool isCustomGetterSetter() const; >+ inline bool isObject() const; >+ inline bool inherits(VM&, const ClassInfo*) const; > template<typename Target> bool inherits(VM&) const; > const ClassInfo* classInfoOrNull(VM&) const; > > // Extracting the value. > bool getString(ExecState*, WTF::String&) const; > WTF::String getString(ExecState*) const; // null string if not a string >- JSObject* getObject() const; // 0 if not an object >+ inline JSObject* getObject() const; // 0 if not an object > > // Extracting integer values. >- bool getUInt32(uint32_t&) const; >+ ALWAYS_INLINE bool getUInt32(uint32_t&) const; > > // Basic conversions. >- JSValue toPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const; >- bool getPrimitiveNumber(ExecState*, double& number, JSValue&); >+ inline JSValue toPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const; >+ inline bool getPrimitiveNumber(ExecState*, double& number, JSValue&); > > bool toBoolean(ExecState*) const; >- TriState pureToBoolean() const; >+ inline TriState pureToBoolean() const; > > // toNumber conversion is expected to be side effect free if an exception has > // been set in the ExecState already. >- double toNumber(ExecState*) const; >+ ALWAYS_INLINE double toNumber(ExecState*) const; > >- Variant<JSBigInt*, double> toNumeric(ExecState*) const; >- Variant<JSBigInt*, int32_t> toBigIntOrInt32(ExecState*) const; >+ ALWAYS_INLINE Variant<JSBigInt*, double> toNumeric(ExecState*) const; >+ ALWAYS_INLINE Variant<JSBigInt*, int32_t> toBigIntOrInt32(ExecState*) const; > > // toNumber conversion if it can be done without side effects. > Optional<double> toNumberFromPrimitive() const; > > JSString* toString(ExecState*) const; // On exception, this returns the empty string. > JSString* toStringOrNull(ExecState*) const; // On exception, this returns null, to make exception checks faster. >- Identifier toPropertyKey(ExecState*) const; >+ ALWAYS_INLINE Identifier toPropertyKey(ExecState*) const; > WTF::String toWTFString(ExecState*) const; >- JSObject* toObject(ExecState*) const; >- JSObject* toObject(ExecState*, JSGlobalObject*) const; >+ inline JSObject* toObject(ExecState*) const; >+ inline JSObject* toObject(ExecState*, JSGlobalObject*) const; > > // Integer conversions. > JS_EXPORT_PRIVATE double toInteger(ExecState*) const; > JS_EXPORT_PRIVATE double toIntegerPreserveNaN(ExecState*) const; >- int32_t toInt32(ExecState*) const; >- uint32_t toUInt32(ExecState*) const; >- uint32_t toIndex(ExecState*, const char* errorName) const; >+ ALWAYS_INLINE int32_t toInt32(ExecState*) const; >+ inline uint32_t toUInt32(ExecState*) const; >+ inline uint32_t toIndex(ExecState*, const char* errorName) const; > double toLength(ExecState*) const; > > // Floating point conversions (this is a convenience function for WebCore; >@@ -284,40 +284,40 @@ public: > float toFloat(ExecState* exec) const { return static_cast<float>(toNumber(exec)); } > > // Object operations, with the toObject operation included. >- JSValue get(ExecState*, PropertyName) const; >- JSValue get(ExecState*, PropertyName, PropertySlot&) const; >- JSValue get(ExecState*, unsigned propertyName) const; >- JSValue get(ExecState*, unsigned propertyName, PropertySlot&) const; >- JSValue get(ExecState*, uint64_t propertyName) const; >+ ALWAYS_INLINE JSValue get(ExecState*, PropertyName) const; >+ ALWAYS_INLINE JSValue get(ExecState*, PropertyName, PropertySlot&) const; >+ ALWAYS_INLINE JSValue get(ExecState*, unsigned propertyName) const; >+ ALWAYS_INLINE JSValue get(ExecState*, unsigned propertyName, PropertySlot&) const; >+ ALWAYS_INLINE JSValue get(ExecState*, uint64_t propertyName) const; > >- bool getPropertySlot(ExecState*, PropertyName, PropertySlot&) const; >+ ALWAYS_INLINE bool getPropertySlot(ExecState*, PropertyName, PropertySlot&) const; > template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(ExecState*, PropertyName, CallbackWhenNoException) const; > template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(ExecState*, PropertyName, PropertySlot&, CallbackWhenNoException) const; > > bool getOwnPropertySlot(ExecState*, PropertyName, PropertySlot&) const; > >- bool put(ExecState*, PropertyName, JSValue, PutPropertySlot&); >- bool putInline(ExecState*, PropertyName, JSValue, PutPropertySlot&); >+ inline bool put(ExecState*, PropertyName, JSValue, PutPropertySlot&); >+ ALWAYS_INLINE bool putInline(ExecState*, PropertyName, JSValue, PutPropertySlot&); > JS_EXPORT_PRIVATE bool putToPrimitive(ExecState*, PropertyName, JSValue, PutPropertySlot&); > JS_EXPORT_PRIVATE bool putToPrimitiveByIndex(ExecState*, unsigned propertyName, JSValue, bool shouldThrow); >- bool putByIndex(ExecState*, unsigned propertyName, JSValue, bool shouldThrow); >+ inline bool putByIndex(ExecState*, unsigned propertyName, JSValue, bool shouldThrow); > >- JSValue toThis(ExecState*, ECMAMode) const; >+ inline JSValue toThis(ExecState*, ECMAMode) const; > >- static bool equal(ExecState*, JSValue v1, JSValue v2); >+ inline static bool equal(ExecState*, JSValue v1, JSValue v2); > static bool equalSlowCase(ExecState*, JSValue v1, JSValue v2); >- static bool equalSlowCaseInline(ExecState*, JSValue v1, JSValue v2); >- static bool strictEqual(ExecState*, JSValue v1, JSValue v2); >+ ALWAYS_INLINE static bool equalSlowCaseInline(ExecState*, JSValue v1, JSValue v2); >+ inline static bool strictEqual(ExecState*, JSValue v1, JSValue v2); > static bool strictEqualSlowCase(ExecState*, JSValue v1, JSValue v2); >- static bool strictEqualSlowCaseInline(ExecState*, JSValue v1, JSValue v2); >- static TriState pureStrictEqual(JSValue v1, JSValue v2); >+ ALWAYS_INLINE static bool strictEqualSlowCaseInline(ExecState*, JSValue v1, JSValue v2); >+ inline static TriState pureStrictEqual(JSValue v1, JSValue v2); > >- bool isCell() const; >- JSCell* asCell() const; >+ inline bool isCell() const; >+ ALWAYS_INLINE JSCell* asCell() const; > JS_EXPORT_PRIVATE bool isValidCallee(); > >- Structure* structureOrNull() const; >- JSValue structureOrUndefined() const; >+ inline Structure* structureOrNull() const; >+ inline JSValue structureOrUndefined() const; > > JS_EXPORT_PRIVATE void dump(PrintStream&) const; > void dumpInContext(PrintStream&, DumpContext*) const; >@@ -325,7 +325,7 @@ public: > void dumpForBacktrace(PrintStream&) const; > > JS_EXPORT_PRIVATE JSObject* synthesizePrototype(ExecState*) const; >- bool requireObjectCoercible(ExecState*) const; >+ ALWAYS_INLINE bool requireObjectCoercible(ExecState*) const; > > // Constants used for Int52. Int52 isn't part of JSValue right now, but JSValues may be > // converted to Int52s and back again. >@@ -355,12 +355,12 @@ public: > * cell, integer and bool values the lower 32 bits (the 'payload') contain the pointer > * integer or boolean value; in the case of all other tags the payload is 0. > */ >- uint32_t tag() const; >- int32_t payload() const; >+ inline uint32_t tag() const; >+ inline int32_t payload() const; > > // This should only be used by the LLInt C Loop interpreter and OSRExit code who needs > // synthesize JSValue from its "register"s holding tag and payload values. >- explicit JSValue(int32_t tag, int32_t payload); >+ inline explicit JSValue(int32_t tag, int32_t payload); > > #elif USE(JSVALUE64) > /* >@@ -623,9 +623,9 @@ inline bool operator!=(const JSValue a, const JSCell* b) { return a != JSValue(b > inline bool operator!=(const JSCell* a, const JSValue b) { return JSValue(a) != b; } > > >-bool isThisValueAltered(const PutPropertySlot&, JSObject* baseObject); >+ALWAYS_INLINE bool isThisValueAltered(const PutPropertySlot&, JSObject* baseObject); > > // See section 7.2.9: https://tc39.github.io/ecma262/#sec-samevalue >-bool sameValue(ExecState*, JSValue a, JSValue b); >+ALWAYS_INLINE bool sameValue(ExecState*, JSValue a, JSValue b); > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/JSCell.h b/Source/JavaScriptCore/runtime/JSCell.h >index 9e8ba60d9f6..308a33c23db 100644 >--- a/Source/JavaScriptCore/runtime/JSCell.h >+++ b/Source/JavaScriptCore/runtime/JSCell.h >@@ -94,28 +94,28 @@ public: > static JSCell* seenMultipleCalleeObjects() { return bitwise_cast<JSCell*>(static_cast<uintptr_t>(1)); } > > enum CreatingEarlyCellTag { CreatingEarlyCell }; >- JSCell(CreatingEarlyCellTag); >+ inline JSCell(CreatingEarlyCellTag); > > protected: >- JSCell(VM&, Structure*); >+ inline JSCell(VM&, Structure*); > JS_EXPORT_PRIVATE static void destroy(JSCell*); > > public: > // Querying the type. >- bool isString() const; >- bool isBigInt() const; >- bool isSymbol() const; >- bool isObject() const; >- bool isGetterSetter() const; >- bool isCustomGetterSetter() const; >- bool isProxy() const; >- bool isFunction(VM&); >- bool isCallable(VM&, CallType&, CallData&); >- bool isConstructor(VM&); >- bool isConstructor(VM&, ConstructType&, ConstructData&); >- bool inherits(VM&, const ClassInfo*) const; >+ inline bool isString() const; >+ inline bool isBigInt() const; >+ inline bool isSymbol() const; >+ inline bool isObject() const; >+ inline bool isGetterSetter() const; >+ inline bool isCustomGetterSetter() const; >+ inline bool isProxy() const; >+ ALWAYS_INLINE bool isFunction(VM&); >+ inline bool isCallable(VM&, CallType&, CallData&); >+ inline bool isConstructor(VM&); >+ inline bool isConstructor(VM&, ConstructType&, ConstructData&); >+ inline bool inherits(VM&, const ClassInfo*) const; > template<typename Target> bool inherits(VM&) const; >- bool isAPIValueWrapper() const; >+ inline bool isAPIValueWrapper() const; > > // Each cell has a built-in lock. Currently it's simply available for use if you need it. It's > // a full-blown WTF::Lock. Note that this lock is currently used in JSArray and that lock's >@@ -126,21 +126,21 @@ public: > // auto locker = holdLock(cell->cellLocker()); > JSCellLock& cellLock() { return *reinterpret_cast<JSCellLock*>(this); } > >- JSType type() const; >- IndexingType indexingTypeAndMisc() const; >- IndexingType indexingMode() const; >- IndexingType indexingType() const; >+ inline JSType type() const; >+ inline IndexingType indexingTypeAndMisc() const; >+ inline IndexingType indexingMode() const; >+ inline IndexingType indexingType() const; > StructureID structureID() const { return m_structureID; } >- Structure* structure() const; >- Structure* structure(VM&) const; >- void setStructure(VM&, Structure*); >+ inline Structure* structure() const; >+ inline Structure* structure(VM&) const; >+ ALWAYS_INLINE void setStructure(VM&, Structure*); > void setStructureIDDirectly(StructureID id) { m_structureID = id; } > void clearStructure() { m_structureID = 0; } > > TypeInfo::InlineTypeFlags inlineTypeFlags() const { return m_flags; } > >- bool mayBePrototype() const; >- void didBecomePrototype(); >+ inline bool mayBePrototype() const; >+ inline void didBecomePrototype(); > > const char* className(VM&) const; > >@@ -162,10 +162,10 @@ public: > // Basic conversions. > JS_EXPORT_PRIVATE JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; > bool getPrimitiveNumber(ExecState*, double& number, JSValue&) const; >- bool toBoolean(ExecState*) const; >- TriState pureToBoolean() const; >+ inline bool toBoolean(ExecState*) const; >+ inline TriState pureToBoolean() const; > JS_EXPORT_PRIVATE double toNumber(ExecState*) const; >- JSObject* toObject(ExecState*, JSGlobalObject*) const; >+ inline JSObject* toObject(ExecState*, JSGlobalObject*) const; > > void dump(PrintStream&) const; > JS_EXPORT_PRIVATE static void dumpToStream(const JSCell*, PrintStream&); >@@ -173,25 +173,25 @@ public: > size_t estimatedSizeInBytes(VM&) const; > JS_EXPORT_PRIVATE static size_t estimatedSize(JSCell*, VM&); > >- static void visitChildren(JSCell*, SlotVisitor&); >- static void visitOutputConstraints(JSCell*, SlotVisitor&); >+ inline static void visitChildren(JSCell*, SlotVisitor&); >+ inline static void visitOutputConstraints(JSCell*, SlotVisitor&); > > JS_EXPORT_PRIVATE static void heapSnapshot(JSCell*, HeapSnapshotBuilder&); > > // Object operations, with the toObject operation included. >- const ClassInfo* classInfo(VM&) const; >- const MethodTable* methodTable(VM&) const; >+ ALWAYS_INLINE const ClassInfo* classInfo(VM&) const; >+ inline const MethodTable* methodTable(VM&) const; > static bool put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); > static bool putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue, bool shouldThrow); >- bool putInline(ExecState*, PropertyName, JSValue, PutPropertySlot&); >+ ALWAYS_INLINE bool putInline(ExecState*, PropertyName, JSValue, PutPropertySlot&); > > static bool deleteProperty(JSCell*, ExecState*, PropertyName); > static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned propertyName); > > static JSValue toThis(JSCell*, ExecState*, ECMAMode); > >- static bool canUseFastGetOwnProperty(const Structure&); >- JSValue fastGetOwnProperty(VM&, Structure&, PropertyName); >+ inline static bool canUseFastGetOwnProperty(const Structure&); >+ ALWAYS_INLINE JSValue fastGetOwnProperty(VM&, Structure&, PropertyName); > > // The recommended idiom for using cellState() is to switch on it or perform an == comparison on it > // directly. We deliberately avoid helpers for this, because we want transparency about how the various >@@ -241,8 +241,8 @@ public: > static const TypedArrayType TypedArrayStorageType = NotTypedArray; > protected: > >- void finishCreation(VM&); >- void finishCreation(VM&, Structure*, CreatingEarlyCellTag); >+ inline void finishCreation(VM&); >+ inline void finishCreation(VM&, Structure*, CreatingEarlyCellTag); > > // Dummy implementations of override-able static functions for classes to put in their MethodTable > static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType); >@@ -280,10 +280,10 @@ private: > > class JSCellLock : public JSCell { > public: >- void lock(); >- bool tryLock(); >- void unlock(); >- bool isLocked() const; >+ inline void lock(); >+ inline bool tryLock(); >+ inline void unlock(); >+ inline bool isLocked() const; > private: > JS_EXPORT_PRIVATE void lockSlow(); > JS_EXPORT_PRIVATE void unlockSlow(); >diff --git a/Source/JavaScriptCore/runtime/JSFunction.h b/Source/JavaScriptCore/runtime/JSFunction.h >index 1e77632b511..dfbc518bbd1 100644 >--- a/Source/JavaScriptCore/runtime/JSFunction.h >+++ b/Source/JavaScriptCore/runtime/JSFunction.h >@@ -81,7 +81,7 @@ public: > > JS_EXPORT_PRIVATE static JSFunction* create(VM&, JSGlobalObject*, int length, const String& name, NativeFunction, Intrinsic = NoIntrinsic, NativeFunction nativeConstructor = callHostFunctionAsConstructor, const DOMJIT::Signature* = nullptr); > >- static JSFunction* createWithInvalidatedReallocationWatchpoint(VM&, FunctionExecutable*, JSScope*); >+ inline static JSFunction* createWithInvalidatedReallocationWatchpoint(VM&, FunctionExecutable*, JSScope*); > > JS_EXPORT_PRIVATE static JSFunction* create(VM&, FunctionExecutable*, JSScope*); > static JSFunction* create(VM&, FunctionExecutable*, JSScope*, Structure*); >@@ -93,9 +93,9 @@ public: > ExecutableBase* executable() const { return m_executable.get(); } > > // To call any of these methods include JSFunctionInlines.h >- bool isHostFunction() const; >- FunctionExecutable* jsExecutable() const; >- Intrinsic intrinsic() const; >+ inline bool isHostFunction() const; >+ inline FunctionExecutable* jsExecutable() const; >+ inline Intrinsic intrinsic() const; > > JS_EXPORT_PRIVATE const SourceCode* sourceCode() const; > >@@ -107,8 +107,8 @@ public: > return Structure::create(vm, globalObject, prototype, TypeInfo(JSFunctionType, StructureFlags), info()); > } > >- TaggedNativeFunction nativeFunction(); >- TaggedNativeFunction nativeConstructor(); >+ inline TaggedNativeFunction nativeFunction(); >+ inline TaggedNativeFunction nativeConstructor(); > > static ConstructType getConstructData(JSCell*, ConstructData&); > static CallType getCallData(JSCell*, CallData&); >@@ -130,7 +130,7 @@ public: > return m_rareData.get(); > } > >- FunctionRareData* ensureRareDataAndAllocationProfile(ExecState*, unsigned inlineCapacity); >+ inline FunctionRareData* ensureRareDataAndAllocationProfile(ExecState*, unsigned inlineCapacity); > > FunctionRareData* rareData() > { >@@ -143,17 +143,17 @@ public: > return rareData; > } > >- bool isHostOrBuiltinFunction() const; >- bool isBuiltinFunction() const; >+ inline bool isHostOrBuiltinFunction() const; >+ inline bool isBuiltinFunction() const; > JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const; >- bool isClassConstructorFunction() const; >+ inline bool isClassConstructorFunction() const; > > void setFunctionName(ExecState*, JSValue name); > > // Returns the __proto__ for the |this| value if this JSFunction were to be constructed. > JSObject* prototypeForConstruction(VM&, ExecState*); > >- bool canUseAllocationProfile(); >+ inline bool canUseAllocationProfile(); > bool canUseAllocationProfileNonInline(); > > enum class PropertyStatus { >@@ -165,7 +165,7 @@ public: > > protected: > JS_EXPORT_PRIVATE JSFunction(VM&, JSGlobalObject*, Structure*); >- JSFunction(VM&, FunctionExecutable*, JSScope*, Structure*); >+ inline JSFunction(VM&, FunctionExecutable*, JSScope*, Structure*); > > void finishCreation(VM&, NativeExecutable*, int length, const String& name); > void finishCreation(VM&); >@@ -193,8 +193,8 @@ private: > FunctionRareData* allocateAndInitializeRareData(ExecState*, size_t inlineCapacity); > FunctionRareData* initializeRareData(ExecState*, size_t inlineCapacity); > >- bool hasReifiedLength() const; >- bool hasReifiedName() const; >+ inline bool hasReifiedLength() const; >+ inline bool hasReifiedName() const; > void reifyLength(VM&); > void reifyName(VM&, ExecState*); > void reifyName(VM&, ExecState*, String name); >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h >index ef597fb7883..b011d36882f 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h >@@ -476,12 +476,12 @@ public: > PoisonedUniquePtr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_setPrototypeAddWatchpoint; > PoisonedUniquePtr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_numberPrototypeToStringWatchpoint; > >- bool isArrayPrototypeIteratorProtocolFastAndNonObservable(); >- bool isMapPrototypeIteratorProtocolFastAndNonObservable(); >- bool isSetPrototypeIteratorProtocolFastAndNonObservable(); >- bool isStringPrototypeIteratorProtocolFastAndNonObservable(); >- bool isMapPrototypeSetFastAndNonObservable(); >- bool isSetPrototypeAddFastAndNonObservable(); >+ ALWAYS_INLINE bool isArrayPrototypeIteratorProtocolFastAndNonObservable(); >+ ALWAYS_INLINE bool isMapPrototypeIteratorProtocolFastAndNonObservable(); >+ ALWAYS_INLINE bool isSetPrototypeIteratorProtocolFastAndNonObservable(); >+ ALWAYS_INLINE bool isStringPrototypeIteratorProtocolFastAndNonObservable(); >+ ALWAYS_INLINE bool isMapPrototypeSetFastAndNonObservable(); >+ ALWAYS_INLINE bool isSetPrototypeAddFastAndNonObservable(); > > bool m_evalEnabled { true }; > bool m_webAssemblyEnabled { true }; >@@ -857,9 +857,9 @@ public: > > void haveABadTime(VM&); > >- bool objectPrototypeIsSane(); >- bool arrayPrototypeChainIsSane(); >- bool stringPrototypeChainIsSane(); >+ ALWAYS_INLINE bool objectPrototypeIsSane(); >+ ALWAYS_INLINE bool arrayPrototypeChainIsSane(); >+ ALWAYS_INLINE bool stringPrototypeChainIsSane(); > > void setProfileGroup(unsigned value) { createRareDataIfNeeded(); m_rareData->profileGroup = value; } > unsigned profileGroup() const >diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h >index 192db5eeea7..1d5d97e193b 100644 >--- a/Source/JavaScriptCore/runtime/JSObject.h >+++ b/Source/JavaScriptCore/runtime/JSObject.h >@@ -172,7 +172,7 @@ public: > > static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&); > JS_EXPORT_PRIVATE static bool getOwnPropertySlotByIndex(JSObject*, ExecState*, unsigned propertyName, PropertySlot&); >- bool getOwnPropertySlotInline(ExecState*, PropertyName, PropertySlot&); >+ inline bool getOwnPropertySlotInline(ExecState*, PropertyName, PropertySlot&); > > // The key difference between this and getOwnPropertySlot is that getOwnPropertySlot > // currently returns incorrect results for the DOM window (with non-own properties) >@@ -193,7 +193,7 @@ public: > return m_butterfly->vectorLength(); > } > >- static bool putInlineForJSObject(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); >+ ALWAYS_INLINE static bool putInlineForJSObject(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); > > JS_EXPORT_PRIVATE static bool put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); > // putByIndex assumes that the receiver is this JSCell object. >@@ -586,7 +586,7 @@ public: > // - the property name is assumed to not be an index. > bool putDirect(VM&, PropertyName, JSValue, unsigned attributes = 0); > bool putDirect(VM&, PropertyName, JSValue, PutPropertySlot&); >- void putDirectWithoutTransition(VM&, PropertyName, JSValue, unsigned attributes = 0); >+ inline void putDirectWithoutTransition(VM&, PropertyName, JSValue, unsigned attributes = 0); > bool putDirectNonIndexAccessor(VM&, PropertyName, GetterSetter*, unsigned attributes); > bool putDirectAccessor(ExecState*, PropertyName, GetterSetter*, unsigned attributes); > JS_EXPORT_PRIVATE bool putDirectCustomAccessor(VM&, PropertyName, JSValue, unsigned attributes); >@@ -598,9 +598,9 @@ public: > JS_EXPORT_PRIVATE bool hasProperty(ExecState*, unsigned propertyName) const; > bool hasPropertyGeneric(ExecState*, PropertyName, PropertySlot::InternalMethodType) const; > bool hasPropertyGeneric(ExecState*, unsigned propertyName, PropertySlot::InternalMethodType) const; >- bool hasOwnProperty(ExecState*, PropertyName, PropertySlot&) const; >- bool hasOwnProperty(ExecState*, PropertyName) const; >- bool hasOwnProperty(ExecState*, unsigned) const; >+ ALWAYS_INLINE bool hasOwnProperty(ExecState*, PropertyName, PropertySlot&) const; >+ ALWAYS_INLINE bool hasOwnProperty(ExecState*, PropertyName) const; >+ ALWAYS_INLINE bool hasOwnProperty(ExecState*, unsigned) const; > > JS_EXPORT_PRIVATE static bool deleteProperty(JSCell*, ExecState*, PropertyName); > JS_EXPORT_PRIVATE static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned propertyName); >@@ -882,8 +882,8 @@ public: > > JS_EXPORT_PRIVATE JSValue getMethod(ExecState*, CallData&, CallType&, const Identifier&, const String& errorMessage); > >- bool canPerformFastPutInline(VM&, PropertyName); >- bool canPerformFastPutInlineExcludingProto(VM&); >+ ALWAYS_INLINE bool canPerformFastPutInline(VM&, PropertyName); >+ ALWAYS_INLINE bool canPerformFastPutInlineExcludingProto(VM&); > > DECLARE_EXPORT_INFO; > >@@ -1068,7 +1068,7 @@ private: > ContiguousJSValues tryMakeWritableContiguousSlow(VM&); > JS_EXPORT_PRIVATE ArrayStorage* ensureArrayStorageSlow(VM&); > >- PropertyOffset prepareToPutDirectWithoutTransition(VM&, PropertyName, unsigned attributes, StructureID, Structure*); >+ ALWAYS_INLINE PropertyOffset prepareToPutDirectWithoutTransition(VM&, PropertyName, unsigned attributes, StructureID, Structure*); > > AuxiliaryBarrier<Butterfly*> m_butterfly; > #if CPU(ADDRESS32) >diff --git a/Source/JavaScriptCore/runtime/JSStringInlines.h b/Source/JavaScriptCore/runtime/JSStringInlines.h >index 19d4756e0c1..a2db7278ef3 100644 >--- a/Source/JavaScriptCore/runtime/JSStringInlines.h >+++ b/Source/JavaScriptCore/runtime/JSStringInlines.h >@@ -29,7 +29,7 @@ > > namespace JSC { > >-bool JSString::equal(ExecState* exec, JSString* other) const >+inline bool JSString::equal(ExecState* exec, JSString* other) const > { > if (isRope() || other->isRope()) > return equalSlowCase(exec, other); >diff --git a/Source/WebCore/bindings/js/ScriptWrappable.h b/Source/WebCore/bindings/js/ScriptWrappable.h >index 655ce147b3b..82a383fa255 100644 >--- a/Source/WebCore/bindings/js/ScriptWrappable.h >+++ b/Source/WebCore/bindings/js/ScriptWrappable.h >@@ -43,9 +43,9 @@ class JSDOMObject; > > class ScriptWrappable { > public: >- JSDOMObject* wrapper() const; >- void setWrapper(JSDOMObject*, JSC::WeakHandleOwner*, void*); >- void clearWrapper(JSDOMObject*); >+ inline JSDOMObject* wrapper() const; >+ inline void setWrapper(JSDOMObject*, JSC::WeakHandleOwner*, void*); >+ inline void clearWrapper(JSDOMObject*); > > template<typename Derived> > static ptrdiff_t offsetOfWrapper() { return CAST_OFFSET(Derived*, ScriptWrappable*) + OBJECT_OFFSETOF(ScriptWrappable, m_wrapper); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193481
: 359246