Deutsch   English   Français   Italiano  
<86lduv3frs.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.arch
Subject: Re: Calling conventions (particularly 32-bit ARM)
Date: Mon, 27 Jan 2025 17:09:59 -0800
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <86lduv3frs.fsf@linuxsc.com>
References: <vlgngv$1ks4a$1@dont-email.me> <4903307dfcce354508c9fc016a4c1ea1@www.novabbs.org> <ve4rnjpipquiugm3j1831m0a7v0va4lu03@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Tue, 28 Jan 2025 02:09:59 +0100 (CET)
Injection-Info: dont-email.me; posting-host="1612c1484c3aeea3b113b4fe0f3b985e";
	logging-data="1423392"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19mg5OFt4vdAEjTxvR83hOWb0vnK3YrhD4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:BuEjRe1qPn+7Gjo3LCp64dum8ds=
	sha1:z4XvM6Td4v7XxCHEyU2foQRSJSo=
Bytes: 2811

George Neuner <gneuner2@comcast.net> writes:

> On Mon, 6 Jan 2025 20:10:13 +0000, mitchalsup@aol.com (MitchAlsup1)
> wrote:
>
>> I looked high and low for codes using more than 8 arguments and
>> returning aggregates larger than 8 double words, and about the
>> only things I found were a handful of []print[]() calls.
>
> Large numbers of parameters may be generated either by closure
> conversion or by lambda lifting.  These are FP language
> transformations that are analogous to, but potentially more complex
> than, the rewriting of object methods and their call sites to pass the
> current object in an OO language.
>
> [The difference between closure conversion and lambda lifting is the
> scope of the tranformation:  conversion limits code transformations to
> within the defining call chain, whereas lifting pulls the closure to
> top level making it (at least potentially) globally available.]
>
> In either case the original function is rewritten such that non-local
> variables can be passed as parameters.  The function's code must be
> altered to access the non-locals - either directly as explicit
> individual parameters, or by indexing from a pointer to an environment
> data structure.
>
> While in a simple case this could look exactly like the OO method
> transformation, recall that a general closure may require access to
> non-local variables spread through multiple environments.  Even if
> whole environments are passed via single pointers, there still may
> need to be multiple parameters added.

Isn't it the case that access to all of the enclosing environments
can be provided by passing a single pointer?  I'm pretty sure it
is.