From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41900 invoked by alias); 10 Jun 2016 12:33:37 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 41876 invoked by uid 89); 10 Jun 2016 12:33:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1410, HTo:U*jit, france, les X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: ovh.starynkevitch.net Authentication-Results: ovh.starynkevitch.net (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=starynkevitch.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= starynkevitch.net; h=content-transfer-encoding:content-type :content-type:mime-version:user-agent:date:date:message-id :subject:subject:from:from:to; s=dkim; t=1465561996; x= 1466425997; bh=uCj7QT+yfke+KrdwP+WgE+ezANjh8wQgULrftSpuIBk=; b=k S/u9iTbRVqtdE3TRMRKoOrxhfQA0qudfMaxGALjhPWCSxc9fx9I2UafC7OJNaHlK i4roaV8euhS2wU5cRGHwmMFnuuTNQQkcXdheQY2bZg821vVjt/0T8KRRcTJLOXtD YyTTJY9neBWs1yE2CeqzQRnVD9AzJlTM5ZenjapETc= X-Virus-Scanned: Debian amavisd-new at ovh.starynkevitch.net To: jit@gcc.gnu.org Cc: David Malcolm From: Basile Starynkevitch Subject: statement expressions Message-ID: <42f4a4a9-2cf7-a4c0-255b-03e20336d156@starynkevitch.net> Date: Fri, 01 Jan 2016 00:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-q2/txt/msg00060.txt.bz2 Hello all and David, In https://gcc.gnu.org/ml/jit/2016-q1/msg00003.html I mentioned that a gcc_jit_block_expr would be very useful, in particular for most functional languages (including Lisp & Scheme). The suggestion was to provide, in GCC JIT, the equivalent of GCC C statement exprs https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html David, I really think such a feature would be useful. In particular it would permit to easily encode in GCCJIT the equivalent of the comma operator and of the ternary conditional operator of C. More generally, it would help a lot those using GCCJIT for Scheme like or Ocaml like languages (and I believe it is as useful as the tail recursion thing work). Without such a feature, most programs using GCCJIT for "functional" or "expression-oriented" frontends would have to build a representation in A-normal form (see https://en.wikipedia.org/wiki/A-normal_form flor details), which the internal transformation inside GCC itself (notably to SSA gimple) is nearly already doing. David, what is your opinion on this? Are you opposed to the idea? If not, how would you think it can be implemented? Cheers -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***