From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 588F2C07E95 for ; Sat, 3 Jul 2021 02:29:07 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DD1561405 for ; Sat, 3 Jul 2021 02:29:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DD1561405 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 25D9482015; Sat, 3 Jul 2021 04:29:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FSSjY3Ga"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 923C682903; Sat, 3 Jul 2021 04:29:01 +0200 (CEST) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4CBF480796 for ; Sat, 3 Jul 2021 04:28:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x82b.google.com with SMTP id v10so8098945qto.1 for ; Fri, 02 Jul 2021 19:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fMp6HfN/i9v9q7ygwg8h071sjlfP6QhsIo+XIN/dw4k=; b=FSSjY3Ga0A3Eew9IyUALNWNpAxwDavwluvUslJHuPjSMvZsZGXSPP6FGkqwxXe3EOO +CHrWKWRrUvGqKgk26XN7yV9N0nk5hgcCXE2M8pu0MXb4fkRNDhNMnp3w4ym3ejJcagz W2ZT6Dd4Kk08H0aQ9L7xA9mr6zSKRuijftZn/HSSy1w9LrqU/8g2pDUrXvitz3xDFN3P I/FoxI9BMXuCOsbfnyHhdTqdtPwC2wDWGVXEFRync8bAYRWi/cSJPmhDT+10zQP2GBlU QhUNcTAth3wkWcwwEs745ULuma5nnmJJDPelzwuAID4076tei6RRynYNMrtzUMyH8ECM //Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fMp6HfN/i9v9q7ygwg8h071sjlfP6QhsIo+XIN/dw4k=; b=qRuP/843pgRYxSBXyRn/MHuc2bu3XoT0K7HP0RF3/c6XekX86U/rWOv6kIqxhqRCRm Yc4dOUwz4JBH967MYBEbjf1drn1b8LNhErLgWEhx0HXJjTik6UMMHuPqujiuV3QYcwfA QRS9oeYPcLj/Vla+ksPcga6MTTSU0NgR7bq41J/fHu68f8DO+VMW5BJu8dBucardWcUY Ivo+rgLw6VquVlNOjxy887V5QU0ynVkNF70Ch0NzF94SFT63vfPD66OoiNwMaPnig18t Lh+ZcyfosO8RvfKpAib7zLaEZwAUiPGm5r3DLjTaiJytxAk2lODOcR4HrlKMycb81XEU kogg== X-Gm-Message-State: AOAM533mVjzDvF/1SRL6KOIFDpW9ZBj/6YlsNya/qMWsd+p5zxYK6j4h tnDF99wkecfaGezNU1BLiUY= X-Google-Smtp-Source: ABdhPJxW1jFfnszCxDKqGrEYkfmfyEPBYcOYbRYQKrpstX3RS7hg959WoT4s2eXOIWOGPgPhSu5QSQ== X-Received: by 2002:ac8:5a56:: with SMTP id o22mr2611378qta.151.1625279336192; Fri, 02 Jul 2021 19:28:56 -0700 (PDT) Received: from [192.168.1.201] (pool-74-96-87-9.washdc.fios.verizon.net. [74.96.87.9]) by smtp.googlemail.com with ESMTPSA id 128sm2253197qkf.102.2021.07.02.19.28.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jul 2021 19:28:55 -0700 (PDT) From: Sean Anderson Subject: Re: [RFC PATCH 03/28] cli: lil: Replace strclone with strdup To: Kostas Michalopoulos , Rasmus Villemoes , u-boot@lists.denx.de, Tom Rini Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= , Wolfgang Denk , Simon Glass , Roland Gaudig , Heinrich Schuchardt References: <20210701061611.957918-1-seanga2@gmail.com> <20210701061611.957918-4-seanga2@gmail.com> Message-ID: <2577a171-3f11-8b06-642b-6ce58e9314bf@gmail.com> Date: Fri, 2 Jul 2021 22:28:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 7/2/21 6:18 PM, Kostas Michalopoulos wrote: > On 7/2/2021 4:38 PM, Sean Anderson wrote: >> I have not. I'm not sure what changes I've made are compatible with the >> vision he has for LIL. He's CC'd on this series, so perhaps he can >> comment. > > Yeah, sadly several of the changes i've seen in the code are not > backwards compatible and backwards compatibility is very important for > me I don't intend to keep backward compatibility. The way I see it, U-Boot has never had a LIL shell before, so there is nothing to break :) > (this is also why the callback setup is done through a lil_callback > function instead of exposing a struct: adding new callbacks in the > future wont break any existing code or application that links to the > library dynamically). Well, C has a very nice ABI in some repects. As long as you only append to that struct you will not break compatibility. > I might break it before a properly versioned release is made at some > point in the (not close) future, but that is usually unavoidable > changes to fix big issues (all cases where that happened are mentioned > in the site). > > In terms of future changes, i do not plan making any *big* changes - > and certainly anything i'll make it'll be backwards compatible > (especially after a versioned release) but one thing that i need to do > is to improve the interpreter's performance, which will affect its > internals - two areas i might need to change are how values are > represented (everything is a string -and things must always behave > like that- but i may need to cache already parsed non-string values) > and how the code itself -e.g. in functions- is represented. One of the nice side-effects of adding a separate parser is that it will now be very easy to get some performance gains by parsing code once and then re-using that parse on subsequent evaluations. For example, functions could be parsed on first use, and cached. Loop bodies could re-used for subsequent iterations. > Also i'll most likely add more functions to the library to expose and > alter internal state (the Free Pascal version of LIL already has some > of that), but that shouldn't affect much internally. > > Beyond that it will be mainly bugfixes - like a use-after-free case > with "reflect this" i just fixed and uploaded :-P As it happens, I ended up removing that because there was no longer a "rootcode" after removing the parsing step. Perhaps at some point I will add it back, but I do not see a pressing need for the same level of dynamicness that you built in originally. --Sean