Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (156049 => 156050)
--- trunk/Source/_javascript_Core/ChangeLog 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-09-18 17:27:08 UTC (rev 156050)
@@ -1,3 +1,33 @@
+2013-09-17 Mark Hahnenberg <mhahnenb...@apple.com>
+
+ Rename OperationInProgress to HeapOperation and move it out of Heap.h into its own header
+ https://bugs.webkit.org/show_bug.cgi?id=121534
+
+ Reviewed by Geoffrey Garen.
+
+ OperationInProgress is a silly name.
+
+ Many parts of the Heap would like to know what HeapOperation is currently underway, but
+ since they are included in Heap.h they can't directly reference HeapOperation if it also
+ lives in Heap.h. The simplest thing to do is to give HeapOperation its own header. While
+ a bit overkill, it simplifies including it wherever its needed.
+
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
+ (JSC::CodeBlock::updateAllValueProfilePredictions):
+ (JSC::CodeBlock::updateAllPredictions):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::updateAllValueProfilePredictions):
+ (JSC::CodeBlock::updateAllPredictions):
+ * bytecode/LazyOperandValueProfile.cpp:
+ (JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
+ * bytecode/LazyOperandValueProfile.h:
+ * bytecode/ValueProfile.h:
+ (JSC::ValueProfileBase::computeUpdatedPrediction):
+ * heap/Heap.h:
+ * heap/HeapOperation.h: Added.
+
2013-09-18 Filip Pizlo <fpi...@apple.com>
DFG should support Int52 for local variables
Modified: trunk/Source/_javascript_Core/GNUmakefile.list.am (156049 => 156050)
--- trunk/Source/_javascript_Core/GNUmakefile.list.am 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/GNUmakefile.list.am 2013-09-18 17:27:08 UTC (rev 156050)
@@ -500,6 +500,7 @@
Source/_javascript_Core/heap/Heap.cpp \
Source/_javascript_Core/heap/Heap.h \
Source/_javascript_Core/heap/HeapIterationScope.h \
+ Source/_javascript_Core/heap/HeapOperation.h \
Source/_javascript_Core/heap/HeapStatistics.cpp \
Source/_javascript_Core/heap/HeapStatistics.h \
Source/_javascript_Core/heap/JITStubRoutineSet.cpp \
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (156049 => 156050)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2013-09-18 17:27:08 UTC (rev 156050)
@@ -706,6 +706,7 @@
<ClInclude Include="..\heap\HandleTypes.h" />
<ClInclude Include="..\heap\Heap.h" />
<ClInclude Include="..\heap\HeapBlock.h" />
+ <ClInclude Include="..\heap\HeapOperation.h" />
<ClInclude Include="..\heap\HeapRootVisitor.h" />
<ClInclude Include="..\heap\HeapStatistics.h" />
<ClInclude Include="..\heap\HeapTimer.h" />
@@ -1056,4 +1057,4 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (156049 => 156050)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2013-09-18 17:27:08 UTC (rev 156050)
@@ -1230,6 +1230,9 @@
<ClInclude Include="..\heap\HeapBlock.h">
<Filter>heap</Filter>
</ClInclude>
+ <ClInclude Include="..\heap\HeapOperation.h">
+ <Filter>heap</Filter>
+ </ClInclude>
<ClInclude Include="..\heap\HeapRootVisitor.h">
<Filter>heap</Filter>
</ClInclude>
@@ -2301,4 +2304,4 @@
<Filter>jit</Filter>
</MASM>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (156049 => 156050)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2013-09-18 17:27:08 UTC (rev 156050)
@@ -649,6 +649,7 @@
2600B5A6152BAAA70091EE5F /* JSStringJoiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2600B5A4152BAAA70091EE5F /* JSStringJoiner.cpp */; };
2600B5A7152BAAA70091EE5F /* JSStringJoiner.h in Headers */ = {isa = PBXBuildFile; fileRef = 2600B5A5152BAAA70091EE5F /* JSStringJoiner.h */; };
2A48D1911772365B00C65A5F /* APICallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = C211B574176A224D000E2A23 /* APICallbackFunction.h */; };
+ 2A6F462617E959CE00C45C98 /* HeapOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A6F462517E959CE00C45C98 /* HeapOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
2AD8932B17E3868F00668276 /* HeapIterationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AD8932917E3868F00668276 /* HeapIterationScope.h */; };
371D842D17C98B6E00ECF994 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 371D842C17C98B6E00ECF994 /* libz.dylib */; };
41359CF30FDD89AD00206180 /* DateConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D21202290AD4310C00ED79B6 /* DateConversion.h */; };
@@ -1813,6 +1814,7 @@
1CAA8B4B0D32C39A0041BCFF /* _javascript_Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _javascript_Core.h; sourceTree = "<group>"; };
2600B5A4152BAAA70091EE5F /* JSStringJoiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStringJoiner.cpp; sourceTree = "<group>"; };
2600B5A5152BAAA70091EE5F /* JSStringJoiner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringJoiner.h; sourceTree = "<group>"; };
+ 2A6F462517E959CE00C45C98 /* HeapOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapOperation.h; sourceTree = "<group>"; };
2AD8932917E3868F00668276 /* HeapIterationScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapIterationScope.h; sourceTree = "<group>"; };
371D842C17C98B6E00ECF994 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
@@ -2853,6 +2855,7 @@
0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */,
0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */,
2AD8932917E3868F00668276 /* HeapIterationScope.h */,
+ 2A6F462517E959CE00C45C98 /* HeapOperation.h */,
);
path = heap;
sourceTree = "<group>";
@@ -3869,6 +3872,7 @@
0F63945515D07057006A597C /* ArrayProfile.h in Headers */,
BC18C3E70E16F5CD00B34460 /* ArrayPrototype.h in Headers */,
BC18C5240E16FC8A00B34460 /* ArrayPrototype.lut.h in Headers */,
+ 2A6F462617E959CE00C45C98 /* HeapOperation.h in Headers */,
0FA2C17C17D7CF84009D015F /* TestRunnerUtils.h in Headers */,
0FB7F39615ED8E4600F167B2 /* ArrayStorage.h in Headers */,
9688CB150ED12B4E001D649F /* AssemblerBuffer.h in Headers */,
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (156049 => 156050)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-09-18 17:27:08 UTC (rev 156050)
@@ -3195,7 +3195,7 @@
}
void CodeBlock::updateAllPredictionsAndCountLiveness(
- OperationInProgress operation, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles)
+ HeapOperation operation, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles)
{
ConcurrentJITLocker locker(m_lock);
@@ -3221,7 +3221,7 @@
#endif
}
-void CodeBlock::updateAllValueProfilePredictions(OperationInProgress operation)
+void CodeBlock::updateAllValueProfilePredictions(HeapOperation operation)
{
unsigned ignoredValue1, ignoredValue2;
updateAllPredictionsAndCountLiveness(operation, ignoredValue1, ignoredValue2);
@@ -3239,7 +3239,7 @@
m_arrayAllocationProfiles[i].updateIndexingType();
}
-void CodeBlock::updateAllPredictions(OperationInProgress operation)
+void CodeBlock::updateAllPredictions(HeapOperation operation)
{
updateAllValueProfilePredictions(operation);
updateAllArrayPredictions();
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (156049 => 156050)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2013-09-18 17:27:08 UTC (rev 156050)
@@ -912,14 +912,14 @@
#if ENABLE(VALUE_PROFILER)
bool shouldOptimizeNow();
- void updateAllValueProfilePredictions(OperationInProgress = NoOperation);
+ void updateAllValueProfilePredictions(HeapOperation = NoOperation);
void updateAllArrayPredictions();
- void updateAllPredictions(OperationInProgress = NoOperation);
+ void updateAllPredictions(HeapOperation = NoOperation);
#else
bool updateAllPredictionsAndCheckIfShouldOptimizeNow() { return false; }
- void updateAllValueProfilePredictions(OperationInProgress = NoOperation) { }
+ void updateAllValueProfilePredictions(HeapOperation = NoOperation) { }
void updateAllArrayPredictions() { }
- void updateAllPredictions(OperationInProgress = NoOperation) { }
+ void updateAllPredictions(HeapOperation = NoOperation) { }
#endif
#if ENABLE(JIT)
@@ -983,7 +983,7 @@
#endif
#if ENABLE(VALUE_PROFILER)
- void updateAllPredictionsAndCountLiveness(OperationInProgress, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles);
+ void updateAllPredictionsAndCountLiveness(HeapOperation, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles);
#endif
void setConstantRegisters(const Vector<WriteBarrier<Unknown> >& constants)
Modified: trunk/Source/_javascript_Core/bytecode/LazyOperandValueProfile.cpp (156049 => 156050)
--- trunk/Source/_javascript_Core/bytecode/LazyOperandValueProfile.cpp 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/bytecode/LazyOperandValueProfile.cpp 2013-09-18 17:27:08 UTC (rev 156050)
@@ -35,7 +35,7 @@
CompressedLazyOperandValueProfileHolder::CompressedLazyOperandValueProfileHolder() { }
CompressedLazyOperandValueProfileHolder::~CompressedLazyOperandValueProfileHolder() { }
-void CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions(const ConcurrentJITLocker& locker, OperationInProgress operation)
+void CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions(const ConcurrentJITLocker& locker, HeapOperation operation)
{
if (!m_data)
return;
Modified: trunk/Source/_javascript_Core/bytecode/LazyOperandValueProfile.h (156049 => 156050)
--- trunk/Source/_javascript_Core/bytecode/LazyOperandValueProfile.h 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/bytecode/LazyOperandValueProfile.h 2013-09-18 17:27:08 UTC (rev 156050)
@@ -157,7 +157,7 @@
CompressedLazyOperandValueProfileHolder();
~CompressedLazyOperandValueProfileHolder();
- void computeUpdatedPredictions(const ConcurrentJITLocker&, OperationInProgress);
+ void computeUpdatedPredictions(const ConcurrentJITLocker&, HeapOperation);
LazyOperandValueProfile* add(
const ConcurrentJITLocker&, const LazyOperandValueProfileKey& key);
Modified: trunk/Source/_javascript_Core/bytecode/ValueProfile.h (156049 => 156050)
--- trunk/Source/_javascript_Core/bytecode/ValueProfile.h 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/bytecode/ValueProfile.h 2013-09-18 17:27:08 UTC (rev 156050)
@@ -150,7 +150,7 @@
// Updates the prediction and returns the new one. Never call this from any thread
// that isn't executing the code.
- SpeculatedType computeUpdatedPrediction(const ConcurrentJITLocker&, OperationInProgress operation = NoOperation)
+ SpeculatedType computeUpdatedPrediction(const ConcurrentJITLocker&, HeapOperation operation = NoOperation)
{
for (unsigned i = 0; i < totalNumberOfBuckets; ++i) {
JSValue value = JSValue::decode(m_buckets[i]);
Modified: trunk/Source/_javascript_Core/heap/Heap.h (156049 => 156050)
--- trunk/Source/_javascript_Core/heap/Heap.h 2013-09-18 17:25:42 UTC (rev 156049)
+++ trunk/Source/_javascript_Core/heap/Heap.h 2013-09-18 17:27:08 UTC (rev 156050)
@@ -30,6 +30,7 @@
#include "GCThreadSharedData.h"
#include "HandleSet.h"
#include "HandleStack.h"
+#include "HeapOperation.h"
#include "JITStubRoutineSet.h"
#include "MarkedAllocator.h"
#include "MarkedBlock.h"
@@ -70,8 +71,6 @@
typedef HashCountedSet<JSCell*> ProtectCountSet;
typedef HashCountedSet<const char*> TypeCountSet;
- enum OperationInProgress { NoOperation, Allocation, Collection };
-
enum HeapType { SmallHeap, LargeHeap };
class Heap {
@@ -254,7 +253,7 @@
size_t m_totalBytesVisited;
size_t m_totalBytesCopied;
- OperationInProgress m_operationInProgress;
+ HeapOperation m_operationInProgress;
BlockAllocator m_blockAllocator;
MarkedSpace m_objectSpace;
CopiedSpace m_storageSpace;
Added: trunk/Source/_javascript_Core/heap/HeapOperation.h (0 => 156050)
--- trunk/Source/_javascript_Core/heap/HeapOperation.h (rev 0)
+++ trunk/Source/_javascript_Core/heap/HeapOperation.h 2013-09-18 17:27:08 UTC (rev 156050)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2013 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#ifndef HeapOperation_h
+#define HeapOperation_h
+
+namespace JSC {
+
+enum HeapOperation { NoOperation, Allocation, Collection };
+
+} // namespace JSC
+
+#endif // HeapOperation_h