Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (232131 => 232132)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2018-05-23 22:34:18 UTC (rev 232132)
@@ -490,6 +490,7 @@
heap/AlignedMemoryAllocator.h
heap/AllocationFailureMode.h
heap/Allocator.h
+ heap/AllocatorInlines.h
heap/AllocatorForMode.h
heap/BlockDirectory.h
heap/BlockDirectoryInlines.h
@@ -500,6 +501,7 @@
heap/CollectionScope.h
heap/CollectorPhase.h
heap/CompleteSubspace.h
+ heap/CompleteSubspaceInlines.h
heap/ConstraintConcurrency.h
heap/ConstraintParallelism.h
heap/ConstraintVolatility.h
@@ -533,10 +535,12 @@
heap/IncrementalSweeper.h
heap/IsoCellSet.h
heap/IsoSubspace.h
+ heap/IsoSubspaceInlines.h
heap/IsoSubspacePerVM.h
heap/LargeAllocation.h
heap/ListableHandler.h
heap/LocalAllocator.h
+ heap/LocalAllocatorInlines.h
heap/LockDuringMarking.h
heap/MachineStackMarker.h
heap/MarkStack.h
Modified: trunk/Source/_javascript_Core/ChangeLog (232131 => 232132)
--- trunk/Source/_javascript_Core/ChangeLog 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-05-23 22:34:18 UTC (rev 232132)
@@ -1,3 +1,35 @@
+2018-05-23 Filip Pizlo <fpi...@apple.com>
+
+ Speed up JetStream/base64
+ https://bugs.webkit.org/show_bug.cgi?id=185914
+
+ Reviewed by Michael Saboff.
+
+ Make allocation fast paths ALWAYS_INLINE.
+
+ This is a 1% speed-up on SunSpider, mostly because of base64. It also speeds up pdfjs by
+ ~6%.
+
+ * CMakeLists.txt:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * heap/AllocatorInlines.h:
+ (JSC::Allocator::allocate const):
+ * heap/CompleteSubspace.cpp:
+ (JSC::CompleteSubspace::allocateNonVirtual): Deleted.
+ * heap/CompleteSubspace.h:
+ * heap/CompleteSubspaceInlines.h: Added.
+ (JSC::CompleteSubspace::allocateNonVirtual):
+ * heap/FreeListInlines.h:
+ (JSC::FreeList::allocate):
+ * heap/IsoSubspace.cpp:
+ (JSC::IsoSubspace::allocateNonVirtual): Deleted.
+ * heap/IsoSubspace.h:
+ (JSC::IsoSubspace::allocatorForNonVirtual):
+ * heap/IsoSubspaceInlines.h: Added.
+ (JSC::IsoSubspace::allocateNonVirtual):
+ * runtime/JSCellInlines.h:
+ * runtime/VM.h:
+
2018-05-23 Rick Waldron <waldron.r...@gmail.com>
Conversion misspelled "Convertion" in error message string
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (232131 => 232132)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-05-23 22:34:18 UTC (rev 232132)
@@ -394,9 +394,9 @@
0F725CAA1C503DED00AD943A /* B3PureCSE.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F725CA61C503DED00AD943A /* B3PureCSE.h */; };
0F725CB01C506D3B00AD943A /* B3FoldPathConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F725CAE1C506D3B00AD943A /* B3FoldPathConstants.h */; };
0F74B93B1F89614800B935D3 /* PrototypeKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F74B93A1F89614500B935D3 /* PrototypeKey.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0F75A060200D260B0038E2CF /* LocalAllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05A200D25F00038E2CF /* LocalAllocatorInlines.h */; };
+ 0F75A060200D260B0038E2CF /* LocalAllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05A200D25F00038E2CF /* LocalAllocatorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F75A061200D26180038E2CF /* LocalAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A057200D25F00038E2CF /* LocalAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0F75A062200D261D0038E2CF /* AllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05D200D25F10038E2CF /* AllocatorInlines.h */; };
+ 0F75A062200D261D0038E2CF /* AllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05D200D25F10038E2CF /* AllocatorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F75A063200D261F0038E2CF /* Allocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A054200D25EF0038E2CF /* Allocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F75A0662013E4F10038E2CF /* JITAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A0652013E4EF0038E2CF /* JITAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F766D2A15A8CC34008F363E /* JITStubRoutineSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -546,6 +546,8 @@
0FD0E5F01E46BF250006AB08 /* RegisterState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD0E5EF1E46BF230006AB08 /* RegisterState.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FD0E5F21E46C8AF0006AB08 /* CollectingScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD0E5F11E46C8AD0006AB08 /* CollectingScope.h */; };
0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0FD2FD9420B52BDE00F09441 /* CompleteSubspaceInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2FD9320B52BDD00F09441 /* CompleteSubspaceInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0FD2FD9520B52BE200F09441 /* IsoSubspaceInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2FD9220B52BDC00F09441 /* IsoSubspaceInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3C82214115D0E00FD81CB /* DFGDriver.h */; };
0FD3E4021B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3E4001B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h */; };
0FD3E40A1B618B6600C80E1E /* ObjectPropertyCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3E4041B618B6600C80E1E /* ObjectPropertyCondition.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2705,6 +2707,8 @@
0FD0E5EF1E46BF230006AB08 /* RegisterState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterState.h; sourceTree = "<group>"; };
0FD0E5F11E46C8AD0006AB08 /* CollectingScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectingScope.h; sourceTree = "<group>"; };
0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = "<group>"; };
+ 0FD2FD9220B52BDC00F09441 /* IsoSubspaceInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IsoSubspaceInlines.h; sourceTree = "<group>"; };
+ 0FD2FD9320B52BDD00F09441 /* CompleteSubspaceInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompleteSubspaceInlines.h; sourceTree = "<group>"; };
0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = "<group>"; };
0FD3C82214115D0E00FD81CB /* DFGDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDriver.h; path = dfg/DFGDriver.h; sourceTree = "<group>"; };
0FD3E3FF1B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAdaptiveInferredPropertyValueWatchpoint.cpp; path = dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp; sourceTree = "<group>"; };
@@ -5635,6 +5639,7 @@
0FD0E5E61E43D3470006AB08 /* CollectorPhase.h */,
0FDCE1271FAFA859006F3901 /* CompleteSubspace.cpp */,
0FDCE1281FAFA859006F3901 /* CompleteSubspace.h */,
+ 0FD2FD9320B52BDD00F09441 /* CompleteSubspaceInlines.h */,
146B14DB12EB5B12001BEC1B /* ConservativeRoots.cpp */,
149DAAF212EB559D0083B12B /* ConservativeRoots.h */,
0F41545A1FD20B1F001B58F6 /* ConstraintConcurrency.h */,
@@ -5710,6 +5715,7 @@
0FB4677B1FDDA6D8003FCB09 /* IsoCellSetInlines.h */,
0FDCE12C1FAFB4DE006F3901 /* IsoSubspace.cpp */,
0FDCE12B1FAFB4DE006F3901 /* IsoSubspace.h */,
+ 0FD2FD9220B52BDC00F09441 /* IsoSubspaceInlines.h */,
0F5E0FE62086AD470097F0DE /* IsoSubspacePerVM.cpp */,
0F5E0FE52086AD460097F0DE /* IsoSubspacePerVM.h */,
0F766D2915A8CC34008F363E /* JITStubRoutineSet.cpp */,
@@ -8315,6 +8321,7 @@
0F4C91661C29F4F2004341A6 /* B3OriginDump.h in Headers */,
0FEC85261BDACDAC0080FF74 /* B3PatchpointSpecial.h in Headers */,
0FEC85281BDACDAC0080FF74 /* B3PatchpointValue.h in Headers */,
+ 0FD2FD9520B52BE200F09441 /* IsoSubspaceInlines.h in Headers */,
799EF7C41C56ED96002B0534 /* B3PCToOriginMap.h in Headers */,
0FEC852A1BDACDAC0080FF74 /* B3PhaseScope.h in Headers */,
0F37308D1C0BD29100052BFA /* B3PhiChildren.h in Headers */,
@@ -8949,6 +8956,7 @@
BC18C4140E16F5CD00B34460 /* _javascript_Core.h in Headers */,
BC18C4150E16F5CD00B34460 /* _javascript_CorePrefix.h in Headers */,
1429D9300ED22D7000B89619 /* JIT.h in Headers */,
+ 0FD2FD9420B52BDE00F09441 /* CompleteSubspaceInlines.h in Headers */,
FE1220271BE7F58C0039E6F2 /* JITAddGenerator.h in Headers */,
0F75A0662013E4F10038E2CF /* JITAllocator.h in Headers */,
FE3A06B21C10CB8900390FDD /* JITBitAndGenerator.h in Headers */,
Modified: trunk/Source/_javascript_Core/heap/AllocatorInlines.h (232131 => 232132)
--- trunk/Source/_javascript_Core/heap/AllocatorInlines.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/heap/AllocatorInlines.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -30,7 +30,7 @@
namespace JSC {
-inline void* Allocator::allocate(GCDeferralContext* context, AllocationFailureMode mode) const
+ALWAYS_INLINE void* Allocator::allocate(GCDeferralContext* context, AllocationFailureMode mode) const
{
return m_localAllocator->allocate(context, mode);
}
Modified: trunk/Source/_javascript_Core/heap/CompleteSubspace.cpp (232131 => 232132)
--- trunk/Source/_javascript_Core/heap/CompleteSubspace.cpp 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/heap/CompleteSubspace.cpp 2018-05-23 22:34:18 UTC (rev 232132)
@@ -57,13 +57,6 @@
return allocateNonVirtual(vm, size, deferralContext, failureMode);
}
-void* CompleteSubspace::allocateNonVirtual(VM& vm, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode)
-{
- if (Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::AllocatorIfExists))
- return allocator.allocate(deferralContext, failureMode);
- return allocateSlow(vm, size, deferralContext, failureMode);
-}
-
Allocator CompleteSubspace::allocatorForSlow(size_t size)
{
size_t index = MarkedSpace::sizeClassToIndex(size);
Modified: trunk/Source/_javascript_Core/heap/CompleteSubspace.h (232131 => 232132)
--- trunk/Source/_javascript_Core/heap/CompleteSubspace.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/heap/CompleteSubspace.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -43,7 +43,7 @@
Allocator allocatorForNonVirtual(size_t, AllocatorForMode);
void* allocate(VM&, size_t, GCDeferralContext*, AllocationFailureMode) override;
- JS_EXPORT_PRIVATE void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode);
+ void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode);
static ptrdiff_t offsetOfAllocatorForSizeStep() { return OBJECT_OFFSETOF(CompleteSubspace, m_allocatorForSizeStep); }
@@ -50,10 +50,10 @@
Allocator* allocatorForSizeStep() { return &m_allocatorForSizeStep[0]; }
private:
- Allocator allocatorForSlow(size_t);
+ JS_EXPORT_PRIVATE Allocator allocatorForSlow(size_t);
// These slow paths are concerned with large allocations and allocator creation.
- void* allocateSlow(VM&, size_t, GCDeferralContext*, AllocationFailureMode);
+ JS_EXPORT_PRIVATE void* allocateSlow(VM&, size_t, GCDeferralContext*, AllocationFailureMode);
void* tryAllocateSlow(VM&, size_t, GCDeferralContext*);
std::array<Allocator, MarkedSpace::numSizeClasses> m_allocatorForSizeStep;
Added: trunk/Source/_javascript_Core/heap/CompleteSubspaceInlines.h (0 => 232132)
--- trunk/Source/_javascript_Core/heap/CompleteSubspaceInlines.h (rev 0)
+++ trunk/Source/_javascript_Core/heap/CompleteSubspaceInlines.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace JSC {
+
+ALWAYS_INLINE void* CompleteSubspace::allocateNonVirtual(VM& vm, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode)
+{
+ if (Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::AllocatorIfExists))
+ return allocator.allocate(deferralContext, failureMode);
+ return allocateSlow(vm, size, deferralContext, failureMode);
+}
+
+} // namespace JSC
+
Modified: trunk/Source/_javascript_Core/heap/FreeListInlines.h (232131 => 232132)
--- trunk/Source/_javascript_Core/heap/FreeListInlines.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/heap/FreeListInlines.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -31,7 +31,7 @@
namespace JSC {
template<typename Func>
-HeapCell* FreeList::allocate(const Func& slowPath)
+ALWAYS_INLINE HeapCell* FreeList::allocate(const Func& slowPath)
{
unsigned remaining = m_remaining;
if (remaining) {
Modified: trunk/Source/_javascript_Core/heap/IsoSubspace.cpp (232131 => 232132)
--- trunk/Source/_javascript_Core/heap/IsoSubspace.cpp 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/heap/IsoSubspace.cpp 2018-05-23 22:34:18 UTC (rev 232132)
@@ -63,14 +63,6 @@
return allocateNonVirtual(vm, size, deferralContext, failureMode);
}
-void* IsoSubspace::allocateNonVirtual(VM&, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode)
-{
- RELEASE_ASSERT(size == this->size());
- Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::MustAlreadyHaveAllocator);
- void* result = allocator.allocate(deferralContext, failureMode);
- return result;
-}
-
void IsoSubspace::didResizeBits(size_t blockIndex)
{
m_cellSets.forEach(
Modified: trunk/Source/_javascript_Core/heap/IsoSubspace.h (232131 => 232132)
--- trunk/Source/_javascript_Core/heap/IsoSubspace.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/heap/IsoSubspace.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -45,7 +45,7 @@
Allocator allocatorForNonVirtual(size_t, AllocatorForMode);
void* allocate(VM&, size_t, GCDeferralContext*, AllocationFailureMode) override;
- JS_EXPORT_PRIVATE void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode);
+ void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode);
private:
friend class IsoCellSet;
@@ -61,7 +61,7 @@
SentinelLinkedList<IsoCellSet, BasicRawSentinelNode<IsoCellSet>> m_cellSets;
};
-inline Allocator IsoSubspace::allocatorForNonVirtual(size_t size, AllocatorForMode)
+ALWAYS_INLINE Allocator IsoSubspace::allocatorForNonVirtual(size_t size, AllocatorForMode)
{
RELEASE_ASSERT(size == this->size());
return Allocator(&m_localAllocator);
Added: trunk/Source/_javascript_Core/heap/IsoSubspaceInlines.h (0 => 232132)
--- trunk/Source/_javascript_Core/heap/IsoSubspaceInlines.h (rev 0)
+++ trunk/Source/_javascript_Core/heap/IsoSubspaceInlines.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace JSC {
+
+ALWAYS_INLINE void* IsoSubspace::allocateNonVirtual(VM&, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode)
+{
+ RELEASE_ASSERT(size == this->size());
+ Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::MustAlreadyHaveAllocator);
+ void* result = allocator.allocate(deferralContext, failureMode);
+ return result;
+}
+
+} // namespace JSC
+
Modified: trunk/Source/_javascript_Core/runtime/JSCellInlines.h (232131 => 232132)
--- trunk/Source/_javascript_Core/runtime/JSCellInlines.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/runtime/JSCellInlines.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -25,14 +25,19 @@
#pragma once
+#include "AllocatorInlines.h"
+#include "CompleteSubspaceInlines.h"
#include "CPU.h"
#include "CallFrame.h"
#include "DeferGC.h"
+#include "FreeListInlines.h"
#include "Handle.h"
+#include "IsoSubspaceInlines.h"
#include "JSCast.h"
#include "JSDestructibleObject.h"
#include "JSObject.h"
#include "JSString.h"
+#include "LocalAllocatorInlines.h"
#include "MarkedBlock.h"
#include "Structure.h"
#include "Symbol.h"
Modified: trunk/Source/_javascript_Core/runtime/JSString.cpp (232131 => 232132)
--- trunk/Source/_javascript_Core/runtime/JSString.cpp 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/runtime/JSString.cpp 2018-05-23 22:34:18 UTC (rev 232132)
@@ -295,7 +295,7 @@
// we would likely have to place all of the constituent StringImpls into the
// Vector before performing any concatenation, but by working backwards we likely
// only fill the queue with the number of substrings at any given level in a
-// rope-of-ropes.)
+// rope-of-ropes.)
void JSRopeString::resolveRopeSlowCase8(LChar* buffer) const
{
LChar* position = buffer + length(); // We will be working backwards over the rope.
Modified: trunk/Source/_javascript_Core/runtime/VM.h (232131 => 232132)
--- trunk/Source/_javascript_Core/runtime/VM.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -950,7 +950,7 @@
extern "C" void sanitizeStackForVMImpl(VM*);
#endif
-void sanitizeStackForVM(VM*);
+JS_EXPORT_PRIVATE void sanitizeStackForVM(VM*);
void logSanitizeStack(VM*);
} // namespace JSC
Modified: trunk/Source/WTF/ChangeLog (232131 => 232132)
--- trunk/Source/WTF/ChangeLog 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/WTF/ChangeLog 2018-05-23 22:34:18 UTC (rev 232132)
@@ -1,3 +1,18 @@
+2018-05-23 Filip Pizlo <fpi...@apple.com>
+
+ Speed up JetStream/base64
+ https://bugs.webkit.org/show_bug.cgi?id=185914
+
+ Reviewed by Michael Saboff.
+
+ Make Vector<>::append ALWAYS_INLINE.
+
+ * wtf/Vector.h:
+ (WTF::Vector::append):
+ (WTF::minCapacity>::expandCapacity):
+ (WTF::minCapacity>::append):
+ (WTF::minCapacity>::tryAppend):
+
2018-05-23 Michael Saboff <msab...@apple.com>
Date.parse() doesn't properly handle input outside of ES Spec limits
Modified: trunk/Source/WTF/wtf/Vector.h (232131 => 232132)
--- trunk/Source/WTF/wtf/Vector.h 2018-05-23 22:23:18 UTC (rev 232131)
+++ trunk/Source/WTF/wtf/Vector.h 2018-05-23 22:34:18 UTC (rev 232132)
@@ -758,7 +758,7 @@
void clear() { shrinkCapacity(0); }
- void append(ValueType&& value) { append<ValueType>(std::forward<ValueType>(value)); }
+ ALWAYS_INLINE void append(ValueType&& value) { append<ValueType>(std::forward<ValueType>(value)); }
template<typename U> void append(U&&);
template<typename... Args> void constructAndAppend(Args&&...);
template<typename... Args> bool tryConstructAndAppend(Args&&...);
@@ -1032,7 +1032,7 @@
}
template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity>
-T* Vector<T, inlineCapacity, OverflowHandler, minCapacity>::expandCapacity(size_t newMinCapacity, T* ptr)
+NEVER_INLINE T* Vector<T, inlineCapacity, OverflowHandler, minCapacity>::expandCapacity(size_t newMinCapacity, T* ptr)
{
if (ptr < begin() || ptr >= end()) {
expandCapacity(newMinCapacity);
@@ -1244,7 +1244,7 @@
template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity>
template<typename U>
-void Vector<T, inlineCapacity, OverflowHandler, minCapacity>::append(const U* data, size_t dataSize)
+ALWAYS_INLINE void Vector<T, inlineCapacity, OverflowHandler, minCapacity>::append(const U* data, size_t dataSize)
{
size_t newSize = m_size + dataSize;
if (newSize > capacity()) {
@@ -1261,7 +1261,7 @@
template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity>
template<typename U>
-bool Vector<T, inlineCapacity, OverflowHandler, minCapacity>::tryAppend(const U* data, size_t dataSize)
+ALWAYS_INLINE bool Vector<T, inlineCapacity, OverflowHandler, minCapacity>::tryAppend(const U* data, size_t dataSize)
{
size_t newSize = m_size + dataSize;
if (newSize > capacity()) {