From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12543 invoked by alias); 14 Nov 2016 21:18:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39944 Received: (qmail 29985 invoked from network); 14 Nov 2016 21:18:39 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.217.172):SA:0(0.0/5.0):. Processed in 1.132733 secs); 14 Nov 2016 21:18:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=aUpzuGdLsUt0qaY1jYwjizdGf3SW3MPFAh/tDh2RazE=; b=v3U9tT7nMRYHYQunzkO7eB0iktnE4y9T4036u9S4rS4gWY+paUln4cSqt0Iq6wR/10 uW30qpoWRYkpnz5MosBSHWKR8MfZLH08ElQTa4a5QWAybVwaC8vyw0+/c72SeX08+EGa m0CwBKUe3aMAIxxhRanvxfp7y1feHHAQibULkk3KUVyNPykoX4Sv/fLKC/Fl2X9QmLJM 40rDB/D8+xddyd205ZePZAGvqoUIg99p27E5tXG7mTY2fpl6o2QP5BtnDESdNCmFRz9y hjLFz9Hvc6gcE0iqhEFpaD9bxq6D9NrlC12gXvKNdQfK2TEAR8s2U90EOtQWyIBMOJW0 +smQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=aUpzuGdLsUt0qaY1jYwjizdGf3SW3MPFAh/tDh2RazE=; b=GePB4ZMyGXwCejlJ1gthxXt0QmaQ5cXtgYN1tMtYVBmeqYiXiUtZAZjUaL4sID8f65 TZtemS0PmcSA8DzMcuGz7mzKzOtl6NHJKweD+EKLgtMbV2q19a9wFXxL9u+TdNpriIkk oWrBPreZcR7qlOpR2aRXrdGYJ7jm+tp8gIvagVTnEXRyMpg8e5RXfrC4milsucMlYQvG wvu4vZ7Tsu50wthIPdjHCjcIT8OTNYehdJFpnebqKynJ5JvvDNDNs+qhI4e/kE8Xzpot pLjU6/JaSFurN1NrBJNzDSMDhbUuQXyMEJ+d2z+I7tr4WTdZq0bvuk+gALVQBVOuCi0g 3SZg== X-Gm-Message-State: ABUngvd9rxKVSZcrYEPFVC7zz3v7CN+DVbHhDvLUA7CTOYwhiBI2qVX4rmr22RZ1K2rpew== X-Received: by 10.176.64.4 with SMTP id h4mr9821378uad.18.1479143429201; Mon, 14 Nov 2016 09:10:29 -0800 (PST) From: Bart Schaefer Message-Id: <161114091036.ZM22821@torch.brasslantern.com> Date: Mon, 14 Nov 2016 09:10:36 -0800 In-Reply-To: <20161114135755.554e379f@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: [PATCH] Optimization of getarrvalue()" (Nov 14, 1:57pm) References: <1478635899.1897979.781551353.05792438@webmail.messagingengine.com> <20161109114207.6b929440@pwslap01u.europe.root.pri> <161109080328.ZM6075@torch.brasslantern.com> <20161114135755.554e379f@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "zsh-workers@zsh.org" Subject: Re: [PATCH] Optimization of getarrvalue() MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 14, 1:57pm, Peter Stephenson wrote: } } If we can agree your patch is OK as far as it goes I'll have a look and } see if I can understand those failures with that additional change. The original code structure was if (A) a; else x; if (B) b; else if (C) c; This changed to if (A) a; else if (B) b; else c and x; This means that in the new structure, b never happens when A. In the old code we might allocate the array ('') and then truncate to (), but in the new code we allocate ('') and then do nothing. This stems I think from misunderstanding that "nular" is an array of one nul string, not an empty array. Jun's change makes this if (B) b; else if (A) a; else c and x; which looks correct to me because b results in an empty array in either the original structure or the new one.