Title: [174371] trunk/Source/_javascript_Core
Revision
174371
Author
[email protected]
Date
2014-10-06 15:17:09 -0700 (Mon, 06 Oct 2014)

Log Message

Fixed compiler warnings on Windows build.
<https://webkit.org/b/135205>

Reviewed by Geoffrey Garen.

Benchmarking with jsc shows that perf is neutral with this change.

* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::call):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* dfg/DFGArgumentPosition.h:
(JSC::DFG::ArgumentPosition::mergeShouldNeverUnbox):
(JSC::DFG::ArgumentPosition::mergeArgumentUnboxingAwareness):
* dfg/DFGEdge.h:
(JSC::DFG::Edge::makeWord):
* dfg/DFGNodeFlags.h:
(JSC::DFG::nodeMayOverflow):
(JSC::DFG::nodeMayNegZero):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGVariableAccessData.cpp:
(JSC::DFG::VariableAccessData::mergeIsCaptured):
* dfg/DFGVariableAccessData.h:
(JSC::DFG::VariableAccessData::mergeIsProfitableToUnbox):
(JSC::DFG::VariableAccessData::mergeStructureCheckHoistingFailed):
(JSC::DFG::VariableAccessData::mergeCheckArrayHoistingFailed):
(JSC::DFG::VariableAccessData::mergeIsArgumentsAlias):
(JSC::DFG::VariableAccessData::mergeIsLoadedFrom):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (174370 => 174371)


--- trunk/Source/_javascript_Core/ChangeLog	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-10-06 22:17:09 UTC (rev 174371)
@@ -1,3 +1,37 @@
+2014-10-06  Mark Lam  <[email protected]>
+
+        Fixed compiler warnings on Windows build.
+        <https://webkit.org/b/135205>
+
+        Reviewed by Geoffrey Garen.
+
+        Benchmarking with jsc shows that perf is neutral with this change.
+
+        * assembler/MacroAssemblerX86_64.h:
+        (JSC::MacroAssemblerX86_64::call):
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::CodeBlock):
+        * dfg/DFGArgumentPosition.h:
+        (JSC::DFG::ArgumentPosition::mergeShouldNeverUnbox):
+        (JSC::DFG::ArgumentPosition::mergeArgumentUnboxingAwareness):
+        * dfg/DFGEdge.h:
+        (JSC::DFG::Edge::makeWord):
+        * dfg/DFGNodeFlags.h:
+        (JSC::DFG::nodeMayOverflow):
+        (JSC::DFG::nodeMayNegZero):
+        * dfg/DFGOSRExitCompilerCommon.cpp:
+        (JSC::DFG::reifyInlinedCallFrames):
+        * dfg/DFGVariableAccessData.cpp:
+        (JSC::DFG::VariableAccessData::mergeIsCaptured):
+        * dfg/DFGVariableAccessData.h:
+        (JSC::DFG::VariableAccessData::mergeIsProfitableToUnbox):
+        (JSC::DFG::VariableAccessData::mergeStructureCheckHoistingFailed):
+        (JSC::DFG::VariableAccessData::mergeCheckArrayHoistingFailed):
+        (JSC::DFG::VariableAccessData::mergeIsArgumentsAlias):
+        (JSC::DFG::VariableAccessData::mergeIsLoadedFrom):
+        * runtime/JSDataViewPrototype.cpp:
+        (JSC::getData):
+
 2014-10-06  Oliver Hunt  <[email protected]>
 
         Remove incorrect assertion.

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h (174370 => 174371)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h	2014-10-06 22:17:09 UTC (rev 174371)
@@ -203,11 +203,11 @@
 
         // Copy argument 5
         load64(Address(X86Registers::esp, 4 * sizeof(int64_t)), scratchRegister);
-        store64(scratchRegister, Address(X86Registers::esp, -4 * sizeof(int64_t)));
+        store64(scratchRegister, Address(X86Registers::esp, -4 * static_cast<int32_t>(sizeof(int64_t))));
 
         // Copy argument 6
         load64(Address(X86Registers::esp, 5 * sizeof(int64_t)), scratchRegister);
-        store64(scratchRegister, Address(X86Registers::esp, -3 * sizeof(int64_t)));
+        store64(scratchRegister, Address(X86Registers::esp, -3 * static_cast<int32_t>(sizeof(int64_t))));
 
         // We also need to allocate the shadow space on the stack for the 4 parameter registers.
         // Also, we should allocate 16 bytes for the frame pointer, and return address (not populated).

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (174370 => 174371)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2014-10-06 22:17:09 UTC (rev 174371)
@@ -2016,7 +2016,7 @@
             // The format of this instruction is: op_profile_type regToProfile, TypeLocation*, flag, identifier?, resolveType?
             size_t instructionOffset = i + opLength - 1;
             unsigned divotStart, divotEnd;
-            GlobalVariableID globalVariableID;
+            GlobalVariableID globalVariableID = 0;
             RefPtr<TypeSet> globalTypeSet;
             bool shouldAnalyze = m_unlinkedCode->typeProfilerExpressionInfoForBytecodeOffset(instructionOffset, divotStart, divotEnd);
             VirtualRegister profileRegister(pc[1].u.operand);

Modified: trunk/Source/_javascript_Core/dfg/DFGArgumentPosition.h (174370 => 174371)


--- trunk/Source/_javascript_Core/dfg/DFGArgumentPosition.h	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/dfg/DFGArgumentPosition.h	2014-10-06 22:17:09 UTC (rev 174371)
@@ -64,7 +64,7 @@
     
     bool mergeShouldNeverUnbox(bool shouldNeverUnbox)
     {
-        return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | shouldNeverUnbox);
+        return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox || shouldNeverUnbox);
     }
     
     bool mergeArgumentPredictionAwareness()
@@ -93,7 +93,7 @@
         bool changed = false;
         for (unsigned i = 0; i < m_variables.size(); ++i) {
             VariableAccessData* variable = m_variables[i]->find();
-            changed |= checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox | variable->isProfitableToUnbox());
+            changed |= checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox || variable->isProfitableToUnbox());
         }
         if (!changed)
             return false;

Modified: trunk/Source/_javascript_Core/dfg/DFGEdge.h (174370 => 174371)


--- trunk/Source/_javascript_Core/dfg/DFGEdge.h	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/dfg/DFGEdge.h	2014-10-06 22:17:09 UTC (rev 174371)
@@ -201,7 +201,7 @@
         ASSERT((shiftedValue >> shift()) == bitwise_cast<uintptr_t>(node));
         ASSERT(useKind >= 0 && useKind < LastUseKind);
         ASSERT((static_cast<uintptr_t>(LastUseKind) << 2) <= (static_cast<uintptr_t>(2) << shift()));
-        return shiftedValue | (static_cast<uintptr_t>(useKind) << 2) | (DFG::doesKill(killStatus) << 1) | DFG::isProved(proofStatus);
+        return shiftedValue | (static_cast<uintptr_t>(useKind) << 2) | (DFG::doesKill(killStatus) << 1) | static_cast<uintptr_t>(DFG::isProved(proofStatus));
     }
     
 #else

Modified: trunk/Source/_javascript_Core/dfg/DFGNodeFlags.h (174370 => 174371)


--- trunk/Source/_javascript_Core/dfg/DFGNodeFlags.h	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/dfg/DFGNodeFlags.h	2014-10-06 22:17:09 UTC (rev 174371)
@@ -98,7 +98,7 @@
 
 static inline bool nodeMayOverflow(NodeFlags flags, RareCaseProfilingSource source)
 {
-    NodeFlags mask;
+    NodeFlags mask = 0;
     switch (source) {
     case BaselineRareCase:
         mask = NodeMayOverflowInBaseline;
@@ -115,7 +115,7 @@
 
 static inline bool nodeMayNegZero(NodeFlags flags, RareCaseProfilingSource source)
 {
-    NodeFlags mask;
+    NodeFlags mask = 0;
     switch (source) {
     case BaselineRareCase:
         mask = NodeMayNegZeroInBaseline;

Modified: trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp (174370 => 174371)


--- trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp	2014-10-06 22:17:09 UTC (rev 174371)
@@ -145,7 +145,7 @@
         InlineCallFrame* inlineCallFrame = codeOrigin.inlineCallFrame;
         CodeBlock* baselineCodeBlock = jit.baselineCodeBlockFor(codeOrigin);
         CodeBlock* baselineCodeBlockForCaller = jit.baselineCodeBlockFor(inlineCallFrame->caller);
-        void* jumpTarget;
+        void* jumpTarget = nullptr;
         void* trueReturnPC = nullptr;
         
         unsigned callBytecodeIndex = inlineCallFrame->caller.bytecodeIndex;

Modified: trunk/Source/_javascript_Core/dfg/DFGVariableAccessData.cpp (174370 => 174371)


--- trunk/Source/_javascript_Core/dfg/DFGVariableAccessData.cpp	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/dfg/DFGVariableAccessData.cpp	2014-10-06 22:17:09 UTC (rev 174371)
@@ -66,8 +66,8 @@
 
 bool VariableAccessData::mergeIsCaptured(bool isCaptured)
 {
-    return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | isCaptured)
-        | checkAndSet(m_isCaptured, m_isCaptured | isCaptured);
+    return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox || isCaptured)
+        | checkAndSet(m_isCaptured, m_isCaptured || isCaptured);
 }
 
 bool VariableAccessData::mergeShouldNeverUnbox(bool shouldNeverUnbox)

Modified: trunk/Source/_javascript_Core/dfg/DFGVariableAccessData.h (174370 => 174371)


--- trunk/Source/_javascript_Core/dfg/DFGVariableAccessData.h	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/dfg/DFGVariableAccessData.h	2014-10-06 22:17:09 UTC (rev 174371)
@@ -71,7 +71,7 @@
     
     bool mergeIsProfitableToUnbox(bool isProfitableToUnbox)
     {
-        return checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox | isProfitableToUnbox);
+        return checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox || isProfitableToUnbox);
     }
     
     bool isProfitableToUnbox()
@@ -100,12 +100,12 @@
 
     bool mergeStructureCheckHoistingFailed(bool failed)
     {
-        return checkAndSet(m_structureCheckHoistingFailed, m_structureCheckHoistingFailed | failed);
+        return checkAndSet(m_structureCheckHoistingFailed, m_structureCheckHoistingFailed || failed);
     }
     
     bool mergeCheckArrayHoistingFailed(bool failed)
     {
-        return checkAndSet(m_checkArrayHoistingFailed, m_checkArrayHoistingFailed | failed);
+        return checkAndSet(m_checkArrayHoistingFailed, m_checkArrayHoistingFailed || failed);
     }
     
     bool structureCheckHoistingFailed()
@@ -120,7 +120,7 @@
     
     bool mergeIsArgumentsAlias(bool isArgumentsAlias)
     {
-        return checkAndSet(m_isArgumentsAlias, m_isArgumentsAlias | isArgumentsAlias);
+        return checkAndSet(m_isArgumentsAlias, m_isArgumentsAlias || isArgumentsAlias);
     }
     
     bool isArgumentsAlias()
@@ -130,7 +130,7 @@
     
     bool mergeIsLoadedFrom(bool isLoadedFrom)
     {
-        return checkAndSet(m_isLoadedFrom, m_isLoadedFrom | isLoadedFrom);
+        return checkAndSet(m_isLoadedFrom, m_isLoadedFrom || isLoadedFrom);
     }
     
     void setIsLoadedFrom(bool isLoadedFrom)

Modified: trunk/Source/_javascript_Core/runtime/JSDataViewPrototype.cpp (174370 => 174371)


--- trunk/Source/_javascript_Core/runtime/JSDataViewPrototype.cpp	2014-10-06 22:07:33 UTC (rev 174370)
+++ trunk/Source/_javascript_Core/runtime/JSDataViewPrototype.cpp	2014-10-06 22:17:09 UTC (rev 174371)
@@ -144,7 +144,7 @@
     union {
         typename Adaptor::Type value;
         uint8_t rawBytes[dataSize];
-    } u;
+    } u = { };
 
     uint8_t* dataPtr = static_cast<uint8_t*>(dataView->vector()) + byteOffset;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to