bmalloc, WTF and JavaScriptCore parts of [Xcode] Update some build settings as recomm...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2018 18:38:11 +0000 (18:38 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2018 18:38:11 +0000 (18:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190250

Reviewed by Alex Christensen.

Source/bmalloc:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS,
  and CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.

* bmalloc.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.

Source/JavaScriptCore:

* API/tests/Regress141275.mm:
(-[JSTEvaluator _sourcePerform]): Addressed newly-enabled CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF
  by making the self-retaining explicit.

* API/tests/testapi.cpp:
(testCAPIViaCpp): Addressed newly-enabled CLANG_WARN_UNREACHABLE_CODE by breaking out of the
  loop instead of returning from the lambda.

* Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_UNREACHABLE_CODE,
  CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF, and
  CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED.

* JavaScriptCore.xcodeproj/project.pbxproj: Removed a duplicate reference to
  UnlinkedFunctionExecutable.h, and let Xcode update the project file.

* assembler/MacroAssemblerPrinter.cpp:
(JSC::Printer::printAllRegisters): Addressed newly-enabled CLANG_WARN_COMMA by replacing
  some commas with semicolons.

Source/WTF:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS,
  and CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.

* WTF.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.

* wtf/MathExtras.h:
(WTF::fastLog2): Addressed newly-enabled CLANG_WARN_COMMA by splitting some comma-separated
  expressions into individual statements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236805 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
Source/JavaScriptCore/API/tests/Regress141275.mm
Source/JavaScriptCore/API/tests/testapi.cpp
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/Base.xcconfig
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/assembler/MacroAssemblerPrinter.cpp
Source/WTF/ChangeLog
Source/WTF/Configurations/Base.xcconfig
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/MathExtras.h
Source/bmalloc/ChangeLog
Source/bmalloc/Configurations/Base.xcconfig
Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/xcshareddata/xcschemes/MobileMiniBrowserUITests.xcscheme
WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme
WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme

index 18e186a..ee9af88 100644 (file)
@@ -306,12 +306,12 @@ static void __JSTRunLoopSourceCancelCallBack(void* info, CFRunLoopRef rl, CFStri
                 NSError* error = nil;
                 if (task.evaluateBlock) {
                     [self _setupEvaluatorThreadContextIfNeeded];
-                    task.evaluateBlock(_jsContext);
-                    if (_jsContext.exception) {
-                        NSLog(@"Did fail on JSContext: %@", _jsContext.name);
-                        NSDictionary* userInfo = @{ NSLocalizedDescriptionKey : [_jsContext.exception[@"message"] toString] };
+                    task.evaluateBlock(self->_jsContext);
+                    if (self->_jsContext.exception) {
+                        NSLog(@"Did fail on JSContext: %@", self->_jsContext.name);
+                        NSDictionary* userInfo = @{ NSLocalizedDescriptionKey : [self->_jsContext.exception[@"message"] toString] };
                         error = [NSError errorWithDomain:@"JSTEvaluator" code:1 userInfo:userInfo];
-                        _jsContext.exception = nil;
+                        self->_jsContext.exception = nil;
                     }
                 }
                 [self _callCompletionHandler:task.completionHandler ifNeededWithError:error];
@@ -324,8 +324,8 @@ static void __JSTRunLoopSourceCancelCallBack(void* info, CFRunLoopRef rl, CFStri
         }
 
         dispatch_barrier_sync(_jsSourcePerformQueue, ^{
-            if ([_jsContext[@"counter"] toInt32] == scriptToEvaluate)
-                dispatch_semaphore_signal(_allScriptsDone);
+            if ([self->_jsContext[@"counter"] toInt32] == scriptToEvaluate)
+                dispatch_semaphore_signal(self->_allScriptsDone);
         });
     }
 }
index cf92f3c..99352c2 100644 (file)
@@ -520,7 +520,7 @@ int testCAPIViaCpp(const char* filter)
                     {
                         LockHolder locker(lock);
                         if (tasks.isEmpty())
-                            return;
+                            break;
                         task = tasks.takeFirst();
                     }
 
index 21f16cc..11d4f31 100644 (file)
@@ -1,3 +1,29 @@
+2018-10-03  Dan Bernstein  <mitz@apple.com>
+
+        JavaScriptCore part of [Xcode] Update some build settings as recommended by Xcode 10
+        https://bugs.webkit.org/show_bug.cgi?id=190250
+
+        Reviewed by Alex Christensen.
+
+        * API/tests/Regress141275.mm:
+        (-[JSTEvaluator _sourcePerform]): Addressed newly-enabled CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF
+          by making the self-retaining explicit.
+
+        * API/tests/testapi.cpp:
+        (testCAPIViaCpp): Addressed newly-enabled CLANG_WARN_UNREACHABLE_CODE by breaking out of the
+          loop instead of returning from the lambda.
+
+        * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_UNREACHABLE_CODE,
+          CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF, and
+          CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj: Removed a duplicate reference to
+          UnlinkedFunctionExecutable.h, and let Xcode update the project file.
+
+        * assembler/MacroAssemblerPrinter.cpp:
+        (JSC::Printer::printAllRegisters): Addressed newly-enabled CLANG_WARN_COMMA by replacing
+          some commas with semicolons.
+
 2018-10-03  Mark Lam  <mark.lam@apple.com>
 
         Make string MaxLength for all WTF and JS strings consistently equal to INT_MAX.
index e55506c..aedab06 100644 (file)
@@ -35,6 +35,7 @@ CLANG_CXX_LIBRARY = libc++;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_COMMA = YES;
 CLANG_WARN_CONSTANT_CONVERSION = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
 CLANG_WARN_EMPTY_BODY = YES;
@@ -45,6 +46,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
 CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
 CLANG_WARN_STRICT_PROTOTYPES = YES;
+CLANG_WARN_UNREACHABLE_CODE = YES;
 CLANG_WARN_SUSPICIOUS_MOVE = YES;
 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 COMBINE_HIDPI_IMAGES = NO;
@@ -83,8 +85,11 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
 GCC_WARN_ABOUT_RETURN_TYPE = YES;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 GCC_WARN_SIGN_COMPARE = YES;
 GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
index 774d977..888dd13 100644 (file)
                14AD91241DCA9FA40014F9FE /* UnlinkedEvalCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD911E1DCA9FA40014F9FE /* UnlinkedEvalCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
                14AD91251DCA9FA40014F9FE /* UnlinkedModuleProgramCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD911F1DCA9FA40014F9FE /* UnlinkedModuleProgramCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
                14AD91261DCA9FA40014F9FE /* UnlinkedProgramCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD91201DCA9FA40014F9FE /* UnlinkedProgramCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               14AD91271DCA9FA40014F9FE /* UnlinkedFunctionExecutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD91211DCA9FA40014F9FE /* UnlinkedFunctionExecutable.h */; };
                14B723B812D7DA6F003BD5ED /* MachineStackMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 14B7234012D7D0DA003BD5ED /* MachineStackMarker.h */; settings = {ATTRIBUTES = (Private, ); }; };
                14B8EC720A5652090062BE54 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; };
                14BA78F113AAB88F005B7C2C /* SlotVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BA78F013AAB88F005B7C2C /* SlotVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
                70ECA6061AFDBEA200449739 /* JSTemplateObjectDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 70ECA6011AFDBEA200449739 /* JSTemplateObjectDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
                70ECA6091AFDBEA200449739 /* TemplateObjectDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 70ECA6041AFDBEA200449739 /* TemplateObjectDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
                72AAF7CE1D0D31B3005E60BE /* JSCustomGetterSetterFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 72AAF7CC1D0D318B005E60BE /* JSCustomGetterSetterFunction.h */; };
+               7593C898BE714A64BE93A6E7 /* WasmContextInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A27958D7FA1142B0AC9E364D /* WasmContextInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
                790081391E95A8EC0052D7CD /* WasmModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 790081371E95A8EC0052D7CD /* WasmModule.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7905BB691D12050E0019FE57 /* InlineAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 7905BB671D12050E0019FE57 /* InlineAccess.h */; settings = {ATTRIBUTES = (Private, ); }; };
                79160DBE1C8E3EC8008C085A /* ProxyRevoke.h in Headers */ = {isa = PBXBuildFile; fileRef = 79160DBC1C8E3EC8008C085A /* ProxyRevoke.h */; settings = {ATTRIBUTES = (Private, ); }; };
                AD2FCC211DB59CB200B3E736 /* WebAssemblyTablePrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC151DB59C5900B3E736 /* WebAssemblyTablePrototype.lut.h */; };
                AD2FCC2D1DB838FD00B3E736 /* WebAssemblyPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC271DB838C400B3E736 /* WebAssemblyPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
                AD412B341E7B2E9E008AF157 /* WasmContext.h in Headers */ = {isa = PBXBuildFile; fileRef = AD412B321E7B2E8A008AF157 /* WasmContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               7593C898BE714A64BE93A6E7 /* WasmContextInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A27958D7FA1142B0AC9E364D /* WasmContextInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
                AD4252511E5D0E14009D2A97 /* FullCodeOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = AD4252501E5D0DEB009D2A97 /* FullCodeOrigin.h */; };
                AD4937C41DDBE6140077C807 /* AbstractModuleRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = AD4937C21DDBE60A0077C807 /* AbstractModuleRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
                AD4937C81DDD0AAE0077C807 /* WebAssemblyModuleRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = AD4937C61DDCDCF00077C807 /* WebAssemblyModuleRecord.h */; };
                14AD911E1DCA9FA40014F9FE /* UnlinkedEvalCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedEvalCodeBlock.h; sourceTree = "<group>"; };
                14AD911F1DCA9FA40014F9FE /* UnlinkedModuleProgramCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedModuleProgramCodeBlock.h; sourceTree = "<group>"; };
                14AD91201DCA9FA40014F9FE /* UnlinkedProgramCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedProgramCodeBlock.h; sourceTree = "<group>"; };
-               14AD91211DCA9FA40014F9FE /* UnlinkedFunctionExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedFunctionExecutable.h; sourceTree = "<group>"; };
                14AD91281DCAAAB00014F9FE /* UnlinkedEvalCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnlinkedEvalCodeBlock.cpp; sourceTree = "<group>"; };
                14AD91291DCAAAB00014F9FE /* UnlinkedProgramCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnlinkedProgramCodeBlock.cpp; sourceTree = "<group>"; };
                14AD912A1DCAAAB00014F9FE /* UnlinkedModuleProgramCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnlinkedModuleProgramCodeBlock.cpp; sourceTree = "<group>"; };
                A1D792FB1B43864B004516F5 /* IntlNumberFormatPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlNumberFormatPrototype.h; sourceTree = "<group>"; };
                A1E0451B1C25B4B100BB663C /* StringPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = StringPrototype.js; sourceTree = "<group>"; };
                A1FE1EB01C2C537E00A289FF /* DatePrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = DatePrototype.js; sourceTree = "<group>"; };
+               A27958D7FA1142B0AC9E364D /* WasmContextInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmContextInlines.h; sourceTree = "<group>"; };
                A503FA13188E0FAF00110F14 /* JavaScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptCallFrame.cpp; sourceTree = "<group>"; };
                A503FA14188E0FAF00110F14 /* JavaScriptCallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptCallFrame.h; sourceTree = "<group>"; };
                A503FA15188E0FB000110F14 /* JSJavaScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSJavaScriptCallFrame.cpp; sourceTree = "<group>"; };
                AD2FCC271DB838C400B3E736 /* WebAssemblyPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAssemblyPrototype.h; path = js/WebAssemblyPrototype.h; sourceTree = "<group>"; };
                AD2FCC321DC4045300B3E736 /* WasmFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WasmFormat.cpp; sourceTree = "<group>"; };
                AD412B321E7B2E8A008AF157 /* WasmContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmContext.h; sourceTree = "<group>"; };
-               A27958D7FA1142B0AC9E364D /* WasmContextInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmContextInlines.h; sourceTree = "<group>"; };
                AD412B351E7B57C0008AF157 /* AllowMacroScratchRegisterUsageIf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllowMacroScratchRegisterUsageIf.h; sourceTree = "<group>"; };
                AD4252501E5D0DEB009D2A97 /* FullCodeOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullCodeOrigin.h; sourceTree = "<group>"; };
                AD4252521E5D0F22009D2A97 /* FullCodeOrigin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FullCodeOrigin.cpp; sourceTree = "<group>"; };
                                14AD912B1DCAAAB00014F9FE /* UnlinkedFunctionCodeBlock.cpp */,
                                14AD911D1DCA9FA40014F9FE /* UnlinkedFunctionCodeBlock.h */,
                                14142E541B7973C000F4BF4B /* UnlinkedFunctionExecutable.cpp */,
-                               14AD91211DCA9FA40014F9FE /* UnlinkedFunctionExecutable.h */,
                                14142E501B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h */,
                                14AD911C1DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h */,
                                B59F89381891ADB500D5CCDC /* UnlinkedInstructionStream.cpp */,
                9959E9251BD17F1E001AA413 /* Scripts */ = {
                        isa = PBXGroup;
                        children = (
-                               99DA00971BD598E000F4575C /* builtins */,
+                               99DA00971BD598E000F4575C /* wkbuiltins */,
                                9959E9271BD17FA0001AA413 /* cssmin.py */,
                                9959E92F1BD181F6001AA413 /* generate-combined-inspector-json.py */,
                                99DA00AC1BD5993E00F4575C /* generate-js-builtins.py */,
                                A7B601821639FD2A00372BA3 /* UnlinkedCodeBlock.h in Headers */,
                                14AD91241DCA9FA40014F9FE /* UnlinkedEvalCodeBlock.h in Headers */,
                                14AD91231DCA9FA40014F9FE /* UnlinkedFunctionCodeBlock.h in Headers */,
-                               14AD91271DCA9FA40014F9FE /* UnlinkedFunctionExecutable.h in Headers */,
                                14142E511B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h in Headers */,
                                14AD91221DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h in Headers */,
                                14AD91251DCA9FA40014F9FE /* UnlinkedModuleProgramCodeBlock.h in Headers */,
                        attributes = {
                                BuildIndependentTargetsInParallel = YES;
                                LastSwiftUpdateCheck = 0700;
-                               LastUpgradeCheck = 0700;
+                               LastUpgradeCheck = 1000;
                        };
                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
                        compatibilityVersion = "Xcode 3.2";
index 3ed64b9..34019d1 100644 (file)
@@ -53,7 +53,7 @@ void printAllRegisters(PrintStream& out, Context& context)
     };
 #define INDENT indent()
 
-    INDENT, out.print("cpu: {\n");
+    INDENT; out.print("cpu: {\n");
 
 #if USE(JSVALUE32_64)
     #define INTPTR_HEX_VALUE_FORMAT "0x%08" PRIxPTR
@@ -63,21 +63,21 @@ void printAllRegisters(PrintStream& out, Context& context)
 
     for (auto id = MacroAssembler::firstRegister(); id <= MacroAssembler::lastRegister(); id = nextID(id)) {
         intptr_t value = static_cast<intptr_t>(cpu.gpr(id));
-        INDENT, out.printf("    %6s: " INTPTR_HEX_VALUE_FORMAT "  %" PRIdPTR "\n", cpu.gprName(id), value, value);
+        INDENT; out.printf("    %6s: " INTPTR_HEX_VALUE_FORMAT "  %" PRIdPTR "\n", cpu.gprName(id), value, value);
     }
     for (auto id = MacroAssembler::firstSPRegister(); id <= MacroAssembler::lastSPRegister(); id = nextID(id)) {
         intptr_t value = static_cast<intptr_t>(cpu.spr(id));
-        INDENT, out.printf("    %6s: " INTPTR_HEX_VALUE_FORMAT "  %" PRIdPTR "\n", cpu.sprName(id), value, value);
+        INDENT; out.printf("    %6s: " INTPTR_HEX_VALUE_FORMAT "  %" PRIdPTR "\n", cpu.sprName(id), value, value);
     }
     #undef INTPTR_HEX_VALUE_FORMAT
 
     for (auto id = MacroAssembler::firstFPRegister(); id <= MacroAssembler::lastFPRegister(); id = nextID(id)) {
         uint64_t u = bitwise_cast<uint64_t>(cpu.fpr(id));
         double d = cpu.fpr(id);
-        INDENT, out.printf("    %6s: 0x%016" PRIx64 "  %.13g\n", cpu.fprName(id), u, d);
+        INDENT; out.printf("    %6s: 0x%016" PRIx64 "  %.13g\n", cpu.fprName(id), u, d);
     }
 
-    INDENT, out.print("}\n");
+    INDENT; out.print("}\n");
 #undef INDENT
 
 }
index c53affb..b715a21 100644 (file)
@@ -1,3 +1,19 @@
+2018-10-03  Dan Bernstein  <mitz@apple.com>
+
+        WTF part of [Xcode] Update some build settings as recommended by Xcode 10
+        https://bugs.webkit.org/show_bug.cgi?id=190250
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS,
+          and CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.
+
+        * WTF.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.
+
+        * wtf/MathExtras.h:
+        (WTF::fastLog2): Addressed newly-enabled CLANG_WARN_COMMA by splitting some comma-separated
+          expressions into individual statements.
+
 2018-10-03  Mark Lam  <mark.lam@apple.com>
 
         Make string MaxLength for all WTF and JS strings consistently equal to INT_MAX.
index e4a51fe..486725a 100644 (file)
@@ -38,6 +38,7 @@ CLANG_ENABLE_OBJC_ARC = YES;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_COMMA = YES;
 CLANG_WARN_CONSTANT_CONVERSION = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
 CLANG_WARN_EMPTY_BODY = YES;
@@ -87,8 +88,10 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
 GCC_WARN_ABOUT_RETURN_TYPE = YES;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 GCC_WARN_SIGN_COMPARE = YES;
 GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
index ccf2946..8ff0c5b 100644 (file)
                        isa = PBXProject;
                        attributes = {
                                LastSwiftUpdateCheck = 0700;
-                               LastUpgradeCheck = 0700;
+                               LastUpgradeCheck = 1000;
                        };
                        buildConfigurationList = 5D247B5C14689B8600E78B76 /* Build configuration list for PBXProject "WTF" */;
                        compatibilityVersion = "Xcode 3.2";
index 2247b69..796b1e8 100644 (file)
@@ -358,14 +358,22 @@ inline unsigned fastLog2(unsigned i)
     unsigned log2 = 0;
     if (i & (i - 1))
         log2 += 1;
-    if (i >> 16)
-        log2 += 16, i >>= 16;
-    if (i >> 8)
-        log2 += 8, i >>= 8;
-    if (i >> 4)
-        log2 += 4, i >>= 4;
-    if (i >> 2)
-        log2 += 2, i >>= 2;
+    if (i >> 16) {
+        log2 += 16;
+        i >>= 16;
+    }
+    if (i >> 8) {
+        log2 += 8;
+        i >>= 8;
+    }
+    if (i >> 4) {
+        log2 += 4;
+        i >>= 4;
+    }
+    if (i >> 2) {
+        log2 += 2;
+        i >>= 2;
+    }
     if (i >> 1)
         log2 += 1;
     return log2;
index 785455f..69b00e1 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-03  Dan Bernstein  <mitz@apple.com>
+
+        bmalloc part of [Xcode] Update some build settings as recommended by Xcode 10
+        https://bugs.webkit.org/show_bug.cgi?id=190250
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS,
+          and CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.
+
+        * bmalloc.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.
+
 2018-09-25  Alex Christensen  <achristensen@webkit.org>
 
         Allow for suffixes to com.apple.WebKit.WebContent
index 60f8cc6..89cea24 100644 (file)
@@ -36,6 +36,7 @@ CLANG_ENABLE_OBJC_ARC = YES;
 CLANG_ENABLE_OBJC_WEAK = YES;
 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_COMMA = YES;
 CLANG_WARN_CONSTANT_CONVERSION = YES;
 CLANG_WARN_CXX0X_EXTENSIONS = NO;
 CLANG_WARN_EMPTY_BODY = YES;
@@ -84,8 +85,10 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
 GCC_WARN_ABOUT_RETURN_TYPE = YES;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 GCC_WARN_SIGN_COMPARE = YES;
 GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
index 66d4067..860c83e 100644 (file)
                        isa = PBXProject;
                        attributes = {
                                LastSwiftUpdateCheck = 0700;
-                               LastUpgradeCheck = 0700;
+                               LastUpgradeCheck = 1000;
                                TargetAttributes = {
                                        0F7EB7EE1F95285300F1ABCB = {
                                                CreatedOnToolsVersion = 9.0;
index 3316527..fa6dee2 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   version = "1.7">
+   LastUpgradeVersion = "1000"
+   version = "1.3">
    <BuildAction
       parallelizeBuildables = "NO"
       buildImplicitDependencies = "YES">
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      language = ""
       shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       </Testables>
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      language = ""
       launchStyle = "0"
       useCustomWorkingDirectory = "NO"
       ignoresPersistentStateOnLaunch = "YES"
index 1b4d827..f14adf4 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   version = "1.7">
+   LastUpgradeVersion = "1000"
+   version = "1.3">
    <BuildAction
       parallelizeBuildables = "NO"
       buildImplicitDependencies = "YES">
@@ -69,7 +70,7 @@
             buildForAnalyzing = "YES">
             <BuildableReference
                BuildableIdentifier = "primary"
-               BlueprintIdentifier = "A18510171B9ADE0B00744AEB"
+               BlueprintIdentifier = "A115CCB41B9D769D00E89159"
                BuildableName = "All"
                BlueprintName = "All"
                ReferencedContainer = "container:Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj">