Smalltalk Compiler or Interpreter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Smalltalk Compiler or Interpreter

Pollsboeck
Hi all,

I think my question is very simple, but I didn't find an answer yet.
I just want to know if Smalltalk uses a compiler or a interpreter to
translate the source files.

Thanks to everyone who could give me an answer.

Fabian Pollesböck


Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Compiler or Interpreter

Ian Bartholomew-8
Fabian,

> I think my question is very simple, but I didn't find an answer yet.
> I just want to know if Smalltalk uses a compiler or a interpreter to
> translate the source files.

Both.  The following are all AIUI (As I Understand It) but may well be out
of date - corrections and/or expansion welcomed.

Interpreted e.g. Dolphin
Source code is compiled to an intermediate byte code format which is
interpreted (albeit very efficiently) by a Virtual Machine

JustInTime Compiler - VisualWorks
Source code is compiled to an intermediate byte code. The first time a
method is used it is compiled into native code and cached. Further attempts
to use the method execute the native code from the cache.

NativeCompiler - Smalltalk MT (not at all sure about this one?)
Compiles executables directly to native code (maybe via a byte code
intermediary?).

IntermediaryCompiler - Smalltalk/X (again, not 100% sure)
Compiles into C (or whatever) source, which then has to be recompiled by a
compatible compiler

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Compiler or Interpreter

Ian Bartholomew-8
In reply to this post by Pollsboeck
Fabian,

> I think my question is very simple, but I didn't find an answer yet.
> I just want to know if Smalltalk uses a compiler or a interpreter to
> translate the source files.

Both.  The following are all AIUI (As I Understand It) but may well be out
of date - corrections and/or expansion welcomed.

Interpreted e.g. Dolphin
Source code is compiled to an intermediate byte code format which is
interpreted (albeit very efficiently) by a Virtual Machine

JustInTime Compiler - VisualWorks
Source code is compiled to an intermediate byte code. The first time a
method is used it is compiled into native code and cached. Further attempts
to use the method execute the native code from the cache.

NativeCompiler - Smalltalk MT (not at all sure about this one?)
Compiles executables directly to native code (maybe via a byte code
intermediary?).

IntermediaryCompiler - Smalltalk/X (again, not 100% sure)
Compiles into C (or whatever) source, which then has to be recompiled by a
compatible compiler

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Compiler or Interpreter

Dorin Sandu
In reply to this post by Pollsboeck
Traditionally, smalltalk compiles source to bytecodes which are later
interpreted by the virtual machine. This is the most portable approach.
However, some virtual machines will further compile the bytecodes to
machine code on-the-fly and cache the results in memory (dynamic
compilation or jitter).

Some of the newer smalltalks will use the former approach for
development, and a true compiler for deployment, i.e. a stand-alone
application will be compiled to Portable Executable format in Windows.

Hope this helps,
dorin

Pollsboeck wrote:

> Hi all,
>
> I think my question is very simple, but I didn't find an answer yet.
> I just want to know if Smalltalk uses a compiler or a interpreter to
> translate the source files.
>
> Thanks to everyone who could give me an answer.
>
> Fabian Pollesböck
>
>
>

--
Pervasive Computing Lab
School of Computer Science, Carleton University


Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Compiler or Interpreter

Pollsboeck
Thank you much Dorin Sandu and Ian Bartholomew.
I've got an A on my Smalltalk report I had to hold at school! :)

Fabian



"Dorin Sandu" <[hidden email]> schrieb im Newsbeitrag
news:[hidden email]...

>
> Traditionally, smalltalk compiles source to bytecodes which are later
> interpreted by the virtual machine. This is the most portable approach.
> However, some virtual machines will further compile the bytecodes to
> machine code on-the-fly and cache the results in memory (dynamic
> compilation or jitter).
>
> Some of the newer smalltalks will use the former approach for
> development, and a true compiler for deployment, i.e. a stand-alone
> application will be compiled to Portable Executable format in Windows.
>
> Hope this helps,
> dorin
>
> Pollsboeck wrote:
>
> > Hi all,
> >
> > I think my question is very simple, but I didn't find an answer yet.
> > I just want to know if Smalltalk uses a compiler or a interpreter to
> > translate the source files.
> >
> > Thanks to everyone who could give me an answer.
> >
> > Fabian Pollesböck
> >
> >
> >
>
> --
> Pervasive Computing Lab
> School of Computer Science, Carleton University
>