A Crazy Idea (?)

Torsten.Bergmann at phaidros.com Torsten.Bergmann at phaidros.com
Fri Dec 10 09:24:09 UTC 1999


Java Bytecode is only a subset of ST-Bytecode.
An implementation of Java inside of a Smalltalk system is already
done by Claus Gittinger in the Smalltalk/X system.
The system uses a dual interpreter. Java packages were mapped 
to ST/X namespaces, ...

So ST/X can run Java-applets, debug Java inside the ST-Debugger, ...

See http://www.exept.de/en/stja97.html for more informations and some 
screenshots.

Bye
Torsten


************************************************************
* Torsten Bergmann
* Phaidros Software AG
* Mail:     Torsten.Bergmann at phaidros.com
* Internet: http://www.phaidros.com
************************************************************ 

-----Original Message-----
From: Giovanni Giorgi [mailto:giovanni.giorgi at mlab.disco.unimib.it]
Sent: Freitag, 10. Dezember 1999 09:54
To: SqueakML
Subject: A Crazy Idea (?)


Hi Smalltalkers!

I have studied a bit the Virtual Machine of Smalltalk and Java, and I
have a small question...
Suppose we take a Java bytecodes (= ".class") with no native types (int,
char,etc) no final meyhods call, and no types error.
Take this correct, pure object-oriented bytecodes and put it in a
special Smalltalk VM:
this VM will not check the type signature of the methods, but can
unterstand Java bytecodes and execute it.
So we can have Java interpreted by a (very very special) Smalltalk VM.
WArning: I left out the details, and  some of this details can be VERY
important...
but IF this can be done and is right (I ask to you an opinion) we can
say some terrible (for Java) things:

  1. The Smalltalk VM don' t do type checking
  2. The Smalltalk VM don't waste time loading class files, checking the
     bytecode and so on...
  3. The Smalltalk VM architecture can take a little more time (message
     passing can be a little slower than indirect method call of Java, I
     suppose)

===> Smalltalk can be faster than Java (and in fact, interpreted Morph
is faster then compiled Swing...and consume less memory!)
But Smalltalk is more powerful, so....
is Java a nasty subset of Smalltalk?!

and more:

Can we do an acceptable Java implementation in Squeak Smalltalk??


Ciao ciao....
--
// Giovanni Giorgi           mailto:giovanni.giorgi at mlab.disco.unimib.it

// Master Thesis  at http://mars.sal.disco.unimi.it/~giorgi
// Student (& exTutor) at Depart. of Computer Science of Milan, Italy.
-------------------------------------------------------------------------





More information about the Squeak-dev mailing list