Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (254499 => 254500)
--- trunk/Source/_javascript_Core/ChangeLog 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-01-14 08:40:50 UTC (rev 254500)
@@ -1,3 +1,32 @@
+2020-01-14 David Kilzer <[email protected]>
+
+ Enable -Wconditional-uninitialized in bmalloc, WTF, _javascript_Core
+ <https://webkit.org/b/206190>
+ <rdar://problem/58540387>
+
+ Reviewed by Mark Lam.
+
+ Initialize stack variables to fix warnings.
+
+ * Configurations/Base.xcconfig:
+ (WARNING_CFLAGS): Add -Wconditional-uninitialized.
+ * b3/B3LowerToAir.cpp:
+ (LowerToAir::appendCAS):
+ * b3/testb3_4.cpp:
+ (testLoadAddrShift):
+ * ftl/FTLLowerDFGToB3.cpp:
+ (JSC::FTL::DFG::LowerDFGToB3::compileCheckStructureOrEmpty):
+ Move declaration of `notEmpty` into if block since it's not used
+ outside that scope.
+ (JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):
+ * ftl/FTLThunks.cpp:
+ (JSC::FTL::registerClobberCheck):
+ * wasm/js/WebAssemblyTablePrototype.cpp:
+ (JSC::webAssemblyTableProtoFuncSet):
+ variables.
+ * wasm/WasmFunctionParser.h:
+ (JSC::Wasm::FunctionParser<Context>::parseBody):
+
2020-01-13 Fujii Hironori <[email protected]>
Unreviewed sort-Xcode-project-file
Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (254499 => 254500)
--- trunk/Source/_javascript_Core/Configurations/Base.xcconfig 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig 2020-01-14 08:40:50 UTC (rev 254500)
@@ -98,7 +98,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
HEADER_SEARCH_PATHS = . "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
Modified: trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp (254499 => 254500)
--- trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp 2020-01-14 08:40:50 UTC (rev 254500)
@@ -2288,7 +2288,7 @@
failBlock = newBlock();
failure = failBlock;
}
- Air::BasicBlock* strongFailBlock;
+ Air::BasicBlock* strongFailBlock = nullptr;
if (isStrong && hasFence)
strongFailBlock = newBlock();
Air::FrequentedBlock comparisonFail = failure;
Modified: trunk/Source/_javascript_Core/b3/testb3_4.cpp (254499 => 254500)
--- trunk/Source/_javascript_Core/b3/testb3_4.cpp 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/b3/testb3_4.cpp 2020-01-14 08:40:50 UTC (rev 254500)
@@ -847,8 +847,8 @@
int slots[2];
// Figure out which slot to use while having proper alignment for the shift.
- int* slot;
- uintptr_t arg;
+ int* slot = nullptr;
+ uintptr_t arg = 0;
for (unsigned i = sizeof(slots)/sizeof(slots[0]); i--;) {
slot = slots + i;
arg = bitwise_cast<uintptr_t>(slot) >> shift;
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (254499 => 254500)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2020-01-14 08:40:50 UTC (rev 254500)
@@ -3407,11 +3407,10 @@
LValue cell = lowCell(m_node->child1());
bool maySeeEmptyValue = m_interpreter.forNode(m_node->child1()).m_type & SpecEmpty;
- LBasicBlock notEmpty;
- LBasicBlock continuation;
- LBasicBlock lastNext;
+ LBasicBlock continuation = nullptr;
+ LBasicBlock lastNext = nullptr;
if (maySeeEmptyValue) {
- notEmpty = m_out.newBlock();
+ LBasicBlock notEmpty = m_out.newBlock();
continuation = m_out.newBlock();
m_out.branch(m_out.isZero64(cell), unsure(continuation), unsure(notEmpty));
lastNext = m_out.appendTo(notEmpty, continuation);
@@ -13285,7 +13284,7 @@
LValue base = lowCell(baseEdge);
JSValue baseConstant = m_state.forNode(baseEdge).value();
- LValue globalObject;
+ LValue globalObject = nullptr;
JSValue globalObjectConstant;
if (domJIT->requireGlobalObject) {
Edge& globalObjectEdge = m_node->child2();
Modified: trunk/Source/_javascript_Core/ftl/FTLThunks.cpp (254499 => 254500)
--- trunk/Source/_javascript_Core/ftl/FTLThunks.cpp 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/ftl/FTLThunks.cpp 2020-01-14 08:40:50 UTC (rev 254500)
@@ -154,7 +154,7 @@
clobber.exclude(RegisterSet::calleeSaveRegisters());
clobber.exclude(dontClobber);
- GPRReg someGPR;
+ GPRReg someGPR = InvalidGPRReg;
for (Reg reg = Reg::first(); reg <= Reg::last(); reg = reg.next()) {
if (!clobber.get(reg) || !reg.isGPR())
continue;
Modified: trunk/Source/_javascript_Core/wasm/WasmFunctionParser.h (254499 => 254500)
--- trunk/Source/_javascript_Core/wasm/WasmFunctionParser.h 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/wasm/WasmFunctionParser.h 2020-01-14 08:40:50 UTC (rev 254500)
@@ -214,7 +214,7 @@
auto FunctionParser<Context>::parseBody() -> PartialResult
{
m_controlStack.append({ { }, { }, m_context.addTopLevel(&m_signature) });
- uint8_t op;
+ uint8_t op = 0;
while (m_controlStack.size()) {
m_currentOpcodeStartingOffset = m_offset;
WASM_PARSER_FAIL_IF(!parseUInt8(op), "can't decode opcode");
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp (254499 => 254500)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp 2020-01-14 08:40:50 UTC (rev 254500)
@@ -129,8 +129,8 @@
return JSValue::encode(throwException(globalObject, throwScope, createRangeError(globalObject, "WebAssembly.Table.prototype.set expects an integer less than the length of the table"_s)));
if (table->table()->asFuncrefTable()) {
- WebAssemblyFunction* wasmFunction;
- WebAssemblyWrapperFunction* wasmWrapperFunction;
+ WebAssemblyFunction* wasmFunction = nullptr;
+ WebAssemblyWrapperFunction* wasmWrapperFunction = nullptr;
if (!value.isNull() && !isWebAssemblyHostFunction(vm, value, wasmFunction, wasmWrapperFunction))
return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Table.prototype.set expects the second argument to be null or an instance of WebAssembly.Function"_s)));
Modified: trunk/Source/WTF/ChangeLog (254499 => 254500)
--- trunk/Source/WTF/ChangeLog 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/WTF/ChangeLog 2020-01-14 08:40:50 UTC (rev 254500)
@@ -1,3 +1,14 @@
+2020-01-14 David Kilzer <[email protected]>
+
+ Enable -Wconditional-uninitialized in bmalloc, WTF, _javascript_Core
+ <https://webkit.org/b/206190>
+ <rdar://problem/58540387>
+
+ Reviewed by Mark Lam.
+
+ * Configurations/Base.xcconfig:
+ (WARNING_CFLAGS): Add -Wconditional-uninitialized.
+
2020-01-13 Sam Weinig <[email protected]>
Platform.h is out of control Part 3: Move all ENABLE_* macros definitions in FeatureDefines.h
Modified: trunk/Source/WTF/Configurations/Base.xcconfig (254499 => 254500)
--- trunk/Source/WTF/Configurations/Base.xcconfig 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/WTF/Configurations/Base.xcconfig 2020-01-14 08:40:50 UTC (rev 254500)
@@ -97,7 +97,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)$(WTF_INSTALL_PATH_PREFIX)/usr/local/include $(DSTROOT)$(WTF_INSTALL_PATH_PREFIX)/usr/local/include $(inherited);
SYSTEM_HEADER_SEARCH_PATHS = $(SDK_DIR)$(WTF_INSTALL_PATH_PREFIX)/usr/local/include $(inherited);
LIBRARY_SEARCH_PATHS = $(SDK_DIR)$(WTF_INSTALL_PATH_PREFIX)/usr/local/lib $(inherited);
Modified: trunk/Source/bmalloc/ChangeLog (254499 => 254500)
--- trunk/Source/bmalloc/ChangeLog 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/bmalloc/ChangeLog 2020-01-14 08:40:50 UTC (rev 254500)
@@ -1,3 +1,14 @@
+2020-01-14 David Kilzer <[email protected]>
+
+ Enable -Wconditional-uninitialized in bmalloc, WTF, _javascript_Core
+ <https://webkit.org/b/206190>
+ <rdar://problem/58540387>
+
+ Reviewed by Mark Lam.
+
+ * Configurations/Base.xcconfig:
+ (WARNING_CFLAGS): Add -Wconditional-uninitialized.
+
2020-01-09 Basuke Suzuki <[email protected]>
[bmalloc] Extract constants from Heap and share it among Heaps.
Modified: trunk/Source/bmalloc/Configurations/Base.xcconfig (254499 => 254500)
--- trunk/Source/bmalloc/Configurations/Base.xcconfig 2020-01-14 08:16:00 UTC (rev 254499)
+++ trunk/Source/bmalloc/Configurations/Base.xcconfig 2020-01-14 08:40:50 UTC (rev 254500)
@@ -94,7 +94,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
TARGET_MAC_OS_X_VERSION_MAJOR_13 = 101300;