Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2002 01:39:14 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        "Gary W. Swearingen" <swear@blarg.net>
Cc:        Ilia Chipitsine <ilia@cgu.chel.su>, questions@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: perfomance and regular expressions
Message-ID:  <3CA587C2.9142DAC7@mindspring.com>
References:  <Pine.BSF.4.10.10203292117510.1096-100000@jane.poka.net> <3CA4FC84.BAB5B698@mindspring.com> <iy4riydamz.riy@localhost.localdomain> <3CA53A21.F041E72C@mindspring.com> <bevgbebmg4.gbe@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
"Gary W. Swearingen" wrote:
> Terry Lambert <tlambert2@mindspring.com> writes:
> > "Gary W. Swearingen" wrote:
> > > Anybody know any languages that allow compile-time (and/or link-time)
> > > computations using (most of?) the same language?  I've often desired the
> > > feature.  (I suppose some preprocessor like m4 could handle some of it.)
> >
> > LISP.  Forth.  Smalltalk.  Prolog.  BASIC.  Oh yeah... Java.
> 
> Can any of those execute or interpret some code and then compile the
> results of that into a non-interpreted executable?

Yes.  All of them.

> Maybe I HAVE heard of some interpreters (Python?) saving an excecutable
> image of themselves after running a while.  Is that what you're thinking
> of?  Will all of those language systems above do that?  It's not quite
> what I was thinking of, but I guess it meets my (poor) specifications.

Franz LISP used to do this; EMACS did, as well.  So did VAX LISP.
The command was "undump" for EMACS.  It's still there.  The point
was to send a SIGABRT, get a coredump, and then turn it into an
executable that could be reloaded with the precompiled context
intact.

One of the earliest relaxations that was a tradeoff between security
and usability was not enforcing the file size match the a.out headers
(e.g. the file could be larger than the a,.out headers indicated) to
permit things like pre-compiled code to be appended to the end of an
image file, so that it wouldn't have to be recompiled the next time
the image ran.

There's a long and glorious history of generating code incrementally
in an otherwise interpreted language.  Java didn't invengt anything
new when it invented bytecode and JIT... mostly, it just reinvented
the UCSD P-code system from the mid/early 1970's.

I can probably list languages you've never heard of which have the
same attribute, and that some people on this list have actually
coded in ;^).

Anything that supports a JIT, by definition, is capable of doing
what you suggest.

Don't they teach "History of Computing" to people any more?!?

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CA587C2.9142DAC7>