Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19623

Re: Creating a new stack from an exisiting one.

From "Pascal J. Bourguignon" <pjb@informatimago.com>
Newsgroups comp.lang.java.programmer, comp.programming
Subject Re: Creating a new stack from an exisiting one.
Date 2012-11-04 16:00 +0100
Organization Informatimago
Message-ID <87ip9ll8fm.fsf@informatimago.com> (permalink)
References (1 earlier) <0.73472d82415d5353822e.20121103155132GMT.87mwyyvg57.fsf@bsb.me.uk> <b227ba50-ccbc-4da0-9f6a-31bb809f329d@ah9g2000pbd.googlegroups.com> <0.898697c4e5f8819c7fa0.20121104004445GMT.878vaiurgi.fsf@bsb.me.uk> <87vcdllg3u.fsf@informatimago.com> <1Juls.140915$lz1.27777@fx28.am4>

Cross-posted to 2 groups.

Show all headers | View raw


"BartC" <bc@freeuk.com> writes:

> "Pascal J. Bourguignon" <pjb@informatimago.com> wrote in message
> news:87vcdllg3u.fsf@informatimago.com...
>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>
>>> All this excludes any mention of the return address.  Maybe that's being
>>> handled separately.
>>
>> Well, I don't know of any processor that uses a separate stack for the
>> frame pointers.
>
> Usually because you only need access to one at a time. The OP
> mentioned a stack just for frame pointers; I assumed (perhaps
> wrongly), then access to any of them might be needed at any time. If
> not then a single stack will do. (Or perhaps no real stack at all, as
> a software data structure seems to be used. Then, any scheme could be
> employed.)

Yes.  And languages like C don't allow embedded functions like Pascal,
so the problem solved by display records doesn't occur, and otherwise
for recursive embedded functions, one can also pass the references to
the outer stack frames as invisible parameters, if they're needed.  So
as you say, there's a single access at a time.



But the important point is that it's not a pure stack, but a vector
where you can access elements at given offsets.


-- 
__Pascal Bourguignon__
http://www.informatimago.com

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Creating a new stack from an exisiting one. Chad <cdalten@gmail.com> - 2012-11-03 07:45 -0700
  Re: Creating a new stack from an exisiting one. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-03 15:51 +0000
    Re: Creating a new stack from an exisiting one. Chad <cdalten@gmail.com> - 2012-11-03 09:22 -0700
      Re: Creating a new stack from an exisiting one. markspace <-@.> - 2012-11-03 11:20 -0700
      Re: Creating a new stack from an exisiting one. "BartC" <bc@freeuk.com> - 2012-11-03 18:58 +0000
      Re: Creating a new stack from an exisiting one. "Pascal J. Bourguignon" <pjb@informatimago.com> - 2012-11-04 00:49 +0100
      Re: Creating a new stack from an exisiting one. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-04 00:44 +0000
        Re: Creating a new stack from an exisiting one. "Pascal J. Bourguignon" <pjb@informatimago.com> - 2012-11-04 13:14 +0100
          Re: Creating a new stack from an exisiting one. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-04 12:48 +0000
            Re: Creating a new stack from an exisiting one. Thomas Richter <thor@math.tu-berlin.de> - 2012-11-04 14:14 +0100
              Re: Creating a new stack from an exisiting one. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-04 15:38 +0000
            Re: Creating a new stack from an exisiting one. "Pascal J. Bourguignon" <pjb@informatimago.com> - 2012-11-04 14:41 +0100
          Re: Creating a new stack from an exisiting one. "BartC" <bc@freeuk.com> - 2012-11-04 14:11 +0000
            Re: Creating a new stack from an exisiting one. "Pascal J. Bourguignon" <pjb@informatimago.com> - 2012-11-04 16:00 +0100
          Re: Creating a new stack from an exisiting one. markspace <-@.> - 2012-11-04 11:02 -0800
          Re: Creating a new stack from an exisiting one. Martin Gregorie <martin@address-in-sig.invalid> - 2012-11-04 19:56 +0000
    Re: Creating a new stack from an exisiting one. Jeff Higgins <jeff@invalid.invalid> - 2012-11-03 16:46 -0400
      Re: Creating a new stack from an exisiting one. Jeff Higgins <jeff@invalid.invalid> - 2012-11-04 08:22 -0500
        Re: Creating a new stack from an exisiting one. Jeff Higgins <jeff@invalid.invalid> - 2012-11-04 11:30 -0500
          Re: Creating a new stack from an exisiting one. Jeff Higgins <jeff@invalid.invalid> - 2012-11-04 19:40 -0500
  Re: Creating a new stack from an exisiting one. Lew <lewbloch@gmail.com> - 2012-11-03 16:02 -0700

csiph-web