Newsgroups: php.internals,php.internals.win Path: news.php.net Xref: news.php.net php.internals:89221 php.internals.win:1124 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34228 invoked from network); 16 Nov 2015 06:42:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2015 06:42:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.213.177 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.213.177 mail-ig0-f177.google.com Received: from [209.85.213.177] ([209.85.213.177:32787] helo=mail-ig0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/61-14654-ABA79465 for ; Mon, 16 Nov 2015 01:42:03 -0500 Received: by igvi2 with SMTP id i2so69839524igv.0 for ; Sun, 15 Nov 2015 22:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zend_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Rv5XXkfWxTJb5C2jodP+s1Bii7Ki7j3PTKitUUSCGls=; b=Ma5y/Hw7kIhvMPFAwWdoiqn2T85vTCLKHjk53B/swiznIcMmCs3HRo0alGt5w1ouRb R9klI0rfD56jiZGhgHTVSAgI1qAJv2gW5UtePXmN7hwXlEgtUc8SR10Pa/Moe4Lg3T0A M+aRK84/hQKB51ykJR9Vcdvz4S+ebjAtI/6AsSQu3kbXvRki6c4OyD4CMVuGNwzp2sbN 3WkEZeR6tL8TQl1EvxvPYiTE61t4fAP5Z1sjnFl6OCTBhZmn9yIX3Mp+UjefUeL32BPZ n46sIJVknsB3+BpeOcLeF58mjpQBErPjXt/Yc1RxLnkjk7J2nwmeHtJdtn4VaBkMTGdc L10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Rv5XXkfWxTJb5C2jodP+s1Bii7Ki7j3PTKitUUSCGls=; b=l4KTCiRtfactopSt3T+5a4MiO4oa4jglWdvuwqclz+iR+LoKP/U5Zic9O24VCLuEr7 Gb2iPFIqz9gmNdvoeSqFk/wtdAt9WMmIuHyNEb2vJle1rlQwbjn3MQ/2ZqXzYbaqeFwh 2higbGjhutr+Wsmt+xfMwiamEvUkqBTn/NSh+5W+PcZtuasWmIzXVQjv5SFFResyq5h8 eQGs6nHRxG+InBAiaVysYA1HziZEiV30xP4+jgGSFpP8Ky6Cr58i8ovjpXBcoG44PIUb 9bocxPKy687ze1jB4bHFvHBm4ZuqZBlGXiLmugTyIziFnCog3vHOfaTL8Oshr+0K5NKG 4neg== X-Gm-Message-State: ALoCoQnHAqcOZPRXYm7ScpIczUg4hA9dtVKfU98AGQoLKyPxP2/h3u5+JSCQg9XSsrqX08h0xWfK6NLa8voVOGcLE+SQuFw/tWAAoa8ijwhiKcCIIbUuSAmJ2aYEm7Io7RjVzQEsSuBXDb2D/AOADguBao4B8+O14Ak4PJMrBdTSH1euM+VzMxQ= MIME-Version: 1.0 X-Received: by 10.50.141.131 with SMTP id ro3mr1289361igb.74.1447656119328; Sun, 15 Nov 2015 22:41:59 -0800 (PST) Received: by 10.50.73.166 with HTTP; Sun, 15 Nov 2015 22:41:59 -0800 (PST) In-Reply-To: <9B23C6783EE5480CB15EAC35B9E420EA@pc1> References: <9B23C6783EE5480CB15EAC35B9E420EA@pc1> Date: Mon, 16 Nov 2015 09:41:59 +0300 Message-ID: To: Matt Wilmas Cc: PHP Internals , internals-win@lists.php.net, Anatol Belski , Pierre Joye Content-Type: multipart/alternative; boundary=089e0149d05ec002880524a2b421 Subject: Re: Windows (Visual Studio) compiler stuff From: dmitry@zend.com (Dmitry Stogov) --089e0149d05ec002880524a2b421 Content-Type: text/plain; charset=UTF-8 Hi Matt, On Mon, Nov 16, 2015 at 1:30 AM, Matt Wilmas wrote: > Hi Dmitry, Anatol, Pierre (etc.), and all, > > I'm back now, I think, after a much longer (unintentional) break than I > expected. Be coming very soon with what I was doing in the summer (param > parsing stuff) -- *now* it works with MSVC too, barring any fragility, as I > accidentally discovered last month... > > I've been "discovering" a lot with the wacky Visual Studio compiler! :-) > This message is about the 2 I found today. > > The first simple thing was probably just overlooked, but noticed it while > looking up __declspec. zend_never_inline has always been empty (I guess) > for MSVC, but there's actually a __declspec(noinline) that can be used (and > works as expected). A simple and obvious change to bring it in line with > the other compilers? > Please, provide a patch for zend_portability.h > The second "issue" is with the zend_always_inline functions, I noticed > this summer. Did anyone else know that MSVC leaves a *copy* of those > functions in the output files (DLLs)? What's the point of that? When > they've been inlined, and not referenced otherwise, there should be no > reason to emit code for a standalone function! > > I remembered after seeing that behavior that a bit of my own > __forceinline'd code did NOT have extra function code, but forgot to > investigate until today. What's different about my function definition? > No "static" specifier! So that's the key. :-) > > But... non-static would create duplicate symbols, I thought. But no, it > works! With just __forceinline, there's no errors. :^) > > Can something be done about this? It would cut the binary size down a > bit. A zend_static macro to be used with zend_always_inline...? > zend_always inline should be always used with static keyword. Thanks. Dmitry. > > Note: I didn't compile PHP, just quick standalone tests to check that > "noinline" works, no useless functions, and no link error. Both VS 2008 & > 2015 (same results). > > Thoughts? > > > Thanks, > Matt > --089e0149d05ec002880524a2b421--