From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aibo.runbox.com (aibo.runbox.com [91.220.196.211]) by sourceware.org (Postfix) with ESMTPS id 09DE4385AC25 for ; Mon, 9 Aug 2021 19:41:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09DE4385AC25 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bothner.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bothner.com Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1mDB9j-0006jf-Vg for kawa@sourceware.org; Mon, 09 Aug 2021 21:41:52 +0200 Received: by submission03.runbox with esmtpsa [Authenticated ID (524175)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1mDB9P-0006PT-8D for kawa@sourceware.org; Mon, 09 Aug 2021 21:41:31 +0200 Subject: Re: First-class continuations in Kawa To: kawa@sourceware.org References: <23585.1619896007@localhost> <11feb74b-49fa-3fbd-213d-7d939dccfb1a@bothner.com> <666b9a7d-156b-0ee7-e1a1-9409cf0d376f@bothner.com> From: Per Bothner Message-ID: <45e812cb-0060-5905-8c2f-c2567d53a5b0@bothner.com> Date: Mon, 9 Aug 2021 12:41:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2021 19:42:04 -0000 A suggestion: Polish and check in the code in the calcc branch. Then change the interface so it is compatible that the tail-call API. Specifically change the generated "fragments" so each looks like: static Object stubNN(Procedure proc, CallContext ctx) throws Throwable) { ... } and call each fragment using MethodHandle#invokeExact. Of course this is not trivial: The person(s) doing this have to understand not just logic of callcc changes but also how applyToConsumerMethod and CallContext etc work, before they can synthesize them. -- --Per Bothner per@bothner.com http://per.bothner.com/