comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada to C++ translator
Date: Thu, 26 Jan 2006 18:39:37 -0600
Date: 2006-01-26T18:39:37-06:00	[thread overview]
Message-ID: <PqGdnbYtM_U790TeRVn-tw@megapath.net> (raw)
In-Reply-To: 877j8ngrnx.fsf@mid.deneb.enyo.de

"Florian Weimer" <fw@deneb.enyo.de> wrote in message
news:877j8ngrnx.fsf@mid.deneb.enyo.de...
> * Randy Brukardt:
>
> > "Florian Weimer" <fw@deneb.enyo.de> wrote in message
> > news:877j8oow1r.fsf@mid.deneb.enyo.de...
> > ...
> >> It's an abort-deferred operation (like assignment, which I should have
> >> mentioned as well).
> >
> > That's expensive how? Abort-deferral is (or should be) just toggling a
bit
> > in the TCB.
>
> You need to find the TCB first, and you need to check for abortion
> once deferral has ended.  Especially the first part probably prevents
> inlining on some POSIX platforms.

Huh? The TCB has to be readily accessible, or the whole program isn't going
to work at anything faster than a crawl. And the abortion check is just a
check for an empty list (i.e. compare against null): it's only expensive if
in fact there is a task on the list. But having abort be expensive is
irrelevent.

The TCB contains the heads of the exception and finalization chains (which
also contains the temporary storage pools on Janus/Ada),  the display
registers (for up-level access), some temporaries for expressions (since the
80x86 architecture is register-poor), along with all of the tasking stuff.
Essentially, it contains everything in Ada semantics that is task-specific.
You have to have cheap access to that, or *everything* is bogged down (most
subprogram calls have to do operations on the exception and finalization
chains and with the display registers). On our never-quite-finished 68K
compiler, we allocated a register permanently to the TCB. Our MS-DOS
compilers used a global block for this stuff (and copied it each time a task
switch happened - great for non-tasking programs, not so hot for tasking
ones).

I haven't studied the details of POSIX threads (they didn't exist when I
last seriously worked on UNIX systems), but there is *always* a way to have
easy access to thread-specific data. At worst, you'd have to allocate a
register to finding it.

There is a persistent myth that finalization, and particularly Ada
finalization is expensive. But I've never seen any real evidence of that --
particularly in apples-to-apples comparisons. (No fair comparing an Ada
program full of tasks with a C++ one that contains none, for instance.)
Surely the cases where its tiny overhead really matters are very few in
number. (OTOH, I'll grant that there is a space cost for it, and that can
make a difference in some situations.)

                               Randy.





  parent reply	other threads:[~2006-01-27  0:39 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-24 19:55 Ada to C++ translator zangnew
2006-01-24 22:39 ` Jeffrey R. Carter
2006-01-24 23:26   ` David Emery
2006-01-25  4:53     ` Jeffrey R. Carter
2006-01-24 23:25 ` Gautier Write-only
2006-01-25  1:15   ` REH
2006-01-25 16:44     ` Martin Krischik
2006-01-25 20:42       ` REH
2006-01-26  9:03   ` Maciej Sobczak
2006-01-25  3:42 ` Bobby D. Bryant
2006-01-25 20:01   ` Florian Weimer
2006-01-25 20:36     ` Martin Dowie
2006-01-25 21:08       ` Florian Weimer
2006-01-25 21:26         ` Randy Brukardt
2006-01-26 11:22           ` Florian Weimer
2006-01-26 17:25             ` Martin Krischik
2006-01-26 18:08               ` Alex R. Mosteo
2006-01-26 18:29               ` REH
2006-01-27 19:13                 ` Martin Krischik
2006-01-26 18:42               ` Florian Weimer
2006-01-27  0:39             ` Randy Brukardt [this message]
2006-01-26  1:18     ` Bobby D. Bryant
2006-01-26 18:51       ` Florian Weimer
2006-01-26 17:15     ` Martin Krischik
2006-01-26 18:45       ` Florian Weimer
2006-01-25  9:24 ` Pascal Obry
2006-01-25 22:24 ` Gautier Write-only
2006-01-25 23:19   ` REH
2006-01-26  9:17   ` Maciej Sobczak
2006-01-25 22:30 ` James Alan Farrell
2006-01-27 15:01 ` Charlie McCutcheon
2006-01-29 14:02   ` Marco
2006-01-29 15:12     ` Dmitry A. Kazakov
2006-01-29 15:43     ` jimmaureenrogers
2006-01-30  5:32       ` Hyman Rosen
  -- strict thread matches above, loose matches on Subject: below --
2000-12-28 14:51 Ada to C Translator Mike K
2000-12-28 16:44 ` Ted Dennison
2000-12-28 17:40   ` Ira D. Baxter
2000-12-28 20:11   ` gdemont
2000-12-29  4:21   ` Dr Adrian Wrigley
2000-12-29  8:08     ` gdemont
2000-12-29 20:35   ` Dave Ptacek
2000-12-29 21:31     ` Marin David Condic
2000-12-30 23:04     ` Frode Tennebø
2000-12-30 23:31       ` Ted Dennison
2001-01-01 10:17       ` Tarjei T. Jensen
2001-01-01 15:17         ` Larry Kilgallen
2001-01-01 17:43       ` Robert Dewar
2001-01-01 21:00         ` Tarjei Tj�stheim Jensen
2001-01-01 23:38           ` Robert Dewar
2001-01-02 14:54           ` Marin David Condic
2001-01-01 21:01         ` Lao Xiao Hai
2001-01-01 23:41           ` Robert Dewar
2001-01-02 21:36             ` Frode Tennebø
2001-01-03 18:18               ` Robert Dewar
2001-01-03 22:31                 ` Frode Tennebø
2001-01-04  0:01                   ` Brian Rogoff
2001-01-04  1:16                     ` Larry Kilgallen
2001-01-04  2:41                       ` Brian Rogoff
2001-01-03 23:57                 ` Ken Garlington
2001-01-06 20:48             ` Lao Xiao Hai
2001-01-01 22:57         ` Frode Tennebø
2001-01-01 23:49           ` Robert Dewar
2001-01-02 21:39             ` Frode Tennebø
2001-01-03 18:22               ` Robert Dewar
2001-01-03 18:48                 ` Larry Kilgallen
2001-01-03 19:25                   ` Ted Dennison
2001-01-03 22:10                 ` Frode Tennebø
2001-01-01 23:04         ` Frode Tennebø
2001-01-02 22:20           ` Tarjei Tj�stheim Jensen
2001-01-02 18:07         ` Dave Ptacek
2001-01-02 22:45           ` Ted Dennison
2001-01-02 22:54           ` Tarjei Tj�stheim Jensen
2001-01-02 23:43             ` Ted Dennison
2001-01-02 22:57           ` Frode Tennebø
2001-01-03 12:34           ` Marin David Condic
2001-01-03 14:00             ` Ken Garlington
2001-01-03 16:16               ` Marin David Condic
2000-12-28 18:53 ` Ehud Lamm
2000-12-28 20:41 ` tmoran
2000-12-29 12:01 ` Tarjei T. Jensen
2001-01-02 21:58 ` Tucker Taft
2000-04-12  0:00 Ada to C++ Translator Brad Crabtree
2000-04-12  0:00 ` David Starner
2000-04-13  0:00 ` Gautier
2000-04-14  0:00 ` Tucker Taft
1997-07-05  0:00 Ada To c translator wisniew
1997-07-06  0:00 ` Jerry van Dijk
     [not found] <dewar.855063471@merv>
     [not found] ` <5d7h2e$q4l$1@news.nyu.edu>
     [not found]   ` <5d90qq$ka7@mulga.cs.mu.OZ.AU>
1997-02-16  0:00     ` Ada to C translator Richard Kenner
1997-02-17  0:00       ` Fergus Henderson
1997-02-26  0:00       ` AlinP
1997-02-26  0:00         ` Robert Dewar
1997-03-21  0:00           ` Keith Allan Shillington
1997-03-26  0:00             ` Geert Bosch
1997-03-26  0:00               ` Tom Moran
1997-03-28  0:00                 ` Robert Dewar
     [not found] <199702041504.PAA11572@sw-eng.falls-church.va.us>
1997-02-09  0:00 ` Robert Dewar
1997-01-21  0:00 Gabriel Rouzaut
1997-01-22  0:00 ` Larry Kilgallen
1997-01-24  0:00   ` Ted Dennison
1997-01-30  0:00   ` Keith Thompson
     [not found]   ` <5d29nv$sqv@mn5.swip.net>
     [not found]     ` <dewar.854940250@merv>
     [not found]       ` <5ddp0u$elq@mn5.swip.net>
1997-02-09  0:00         ` Robert Dewar
1996-08-07  0:00 David Buscaglia
1996-08-09  0:00 ` Robert Dewar
1996-07-11  0:00 ADA to C++ translator Alain PUJOL
1996-07-12  0:00 ` Darren C Davenport
1996-07-13  0:00 ` Vladimir Vukicevic
1996-07-15  0:00 ` Simon A Watts
1996-07-15  0:00   ` Darren C Davenport
1996-07-15  0:00   ` Kevin J. Weise
1996-07-16  0:00     ` Simon A Watts
1996-07-15  0:00   ` Robert Dewar
1996-07-16  0:00     ` Simon A Watts
1996-07-15  0:00   ` David Wheeler
1996-07-16  0:00   ` Richard Krehbiel
1996-07-16  0:00   ` Jon S Anthony
     [not found] <3f10sf$9t1@news.dtc.hp.com>
     [not found] ` <3f1kig$p0d@newstand.syr.edu>
1995-01-12 16:10   ` Ada to C translator Robert Dewar
1994-09-08 21:12 Kevin H. Hunt x7343
1993-08-04 15:51 Joe Fasano
1990-07-27 12:41 /2000
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox