From patchwork Tue Aug 30 08:05:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Vittet X-Patchwork-Id: 112191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id AD87EB6F81 for ; Tue, 30 Aug 2011 18:06:03 +1000 (EST) Received: (qmail 2124 invoked by alias); 30 Aug 2011 08:05:53 -0000 Received: (qmail 2112 invoked by uid 22791); 30 Aug 2011 08:05:49 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_TR X-Spam-Check-By: sourceware.org Received: from 3.mo2.mail-out.ovh.net (HELO mo2.mail-out.ovh.net) (46.105.58.226) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Aug 2011 08:05:35 +0000 Received: from mail426.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo2.mail-out.ovh.net (Postfix) with SMTP id 8A3E5DC0F02 for ; Tue, 30 Aug 2011 10:06:09 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 30 Aug 2011 10:05:32 +0200 Received: from unknown (HELO ?172.25.1.160?) (piervit@pvittet.com@193.52.208.97) by ns0.ovh.net with SMTP; 30 Aug 2011 10:05:31 +0200 Message-ID: <4E5C99C7.4030304@pvittet.com> Date: Tue, 30 Aug 2011 10:05:27 +0200 From: Pierre Vittet User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110705 Thunderbird/3.1.11 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, Basile Starynkevitch X-Ovh-Mailout: 178.32.228.2 (mo2.mail-out.ovh.net) Subject: Re: [PATCH, MELT, minor] add a primitive read_strv References: <4E2577B6.3000808@pvittet.com> In-Reply-To: <4E2577B6.3000808@pvittet.com> X-Ovh-Tracer-Id: 11081951310204633246 X-Ovh-Remote: 193.52.208.97 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -80 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeftddrtdeiucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlvddtmd X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello, this is a ping for http://gcc.gnu.org/ml/gcc-patches/2011-07/msg01503.html. I thought this was integrated into MELT but it does not look to be in the current trunk. It just add a primitive read_strv allowing to use meltgc_read_from_val to get a list of s-expression from a boxed C string of a strbuf. Pierre Vittet 2011-07-18 Pierre Vittet * melt/warmelt-base.melt (read_strv): New primitive. Index: gcc/melt/warmelt-base.melt =================================================================== --- gcc/melt/warmelt-base.melt (revision 176434) +++ gcc/melt/warmelt-base.melt (working copy) @@ -272,6 +272,11 @@ number $NUM opaque location number $LOC.}# :doc #{Read from file named by the $FILNAM string balue a list of MELT s-expressions.}# #{(meltgc_read_file (melt_string_str((melt_ptr_t)($filnam)), (char*)0))}#) +(defprimitive read_strv (strv) :value + :doc #{Return the list of sexpr contained in $STRV. $STRV can be a boxed + string or a strbuf value.}# + #{(meltgc_read_from_val ($strv, NULL))}# +) ;; to signal an error in a source with some additional string value (defprimitive error_strv (loc :cstring cmsg :value strv) :void @@ -2441,6 +2446,7 @@ polyhedron values.}# pair_set_head ppstrbuf_mixbigint read_file + read_strv register_pass_execution_hook register_pragma_handler register_pre_genericize_hook