<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4379255145075161533</id><updated>2011-04-21T21:43:46.472+02:00</updated><title type='text'>The Potato Virtual Machine Project</title><subtitle type='html'>The Potato VM is a Squeak virtual machine implemented in Java. It is a direct derivative of JSqueak, which was written by Dan Ingalls at Sun.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://potatovm.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://potatovm.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>haupz</name><uri>http://www.blogger.com/profile/17461023208128146240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_5WYB2ZMFx3Q/SV-5rVoEEKI/AAAAAAAABvk/S3XoEEt8EMg/S220/haupt.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4379255145075161533.post-1452901584630533687</id><published>2008-08-30T15:26:00.006+02:00</published><updated>2008-08-30T15:50:39.660+02:00</updated><title type='text'>Image Loading in Potato</title><content type='html'>&lt;span style="font-style: italic;font-size:130%;" &gt;The Squeak Image Format&lt;/span&gt;&lt;br /&gt;In order to understand the image loading process we first take a look at the image concept and the image format.&lt;br /&gt;The concept of an image might sound strange for Java programmers, but has its advantages. Instead of having multiple class files containing algorithms and type description, everything resides in one file - the image. But the image is not just one mega class file, it is a snapshot of the memory of a running application. Thus it also contains all objects and data of the running application.&lt;br /&gt;&lt;br /&gt;The picture shows the structure of a Squeak Image containing the objects of the application (blue) as well as meta data (green).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_OIA48QnAF_g/SLlNryML75I/AAAAAAAAAAY/39PvxYxNgTE/s1600-h/SqueakImageFormat.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_OIA48QnAF_g/SLlNryML75I/AAAAAAAAAAY/39PvxYxNgTE/s400/SqueakImageFormat.jpg" alt="" id="BLOGGER_PHOTO_ID_5240305056024883090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The objective of the image loading process is to read the bytes from the image file and reconstruct the objects they represent. The JSqueak approach to accomplish this involved a lot of handwork for the byte handling. This is now done in a more simple (and more Java-like) way by using the tools available in the Java class library, e.g., the FileCachedImageInputStream class. (Despite the word "Image" in its name this is a class from the Java library and has nothing to do with Squeak images in general.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Handling Byte Order&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;When a Squeak image is saved to a file, it will either be in the big-endian or little-endian format, depending on the architecture. Similarly, when loading the image file, the byte order may has to be converted. Reading individual 32-bit words can be done with the help of the class FileCacheImageInputStream. It provides the possibility to adjust the byte order automatically to the big-endian byte order that is used as Java's default byte order.&lt;br /&gt;&lt;br /&gt;Here you can see the detection of the image byte order with the help of the Java library:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;int MAGIC_NUMBER = 6502;&lt;br /&gt;&lt;br /&gt;ByteOrder detectAndSetEndianess() {&lt;br /&gt;ByteOrder result = null;&lt;br /&gt;try {&lt;br /&gt;  int firstWordinImage = super.readInt();&lt;br /&gt;&lt;br /&gt;  if (firstWordinImage == MAGIC_NUMBER) {&lt;br /&gt;    result = ByteOrder.BIG_ENDIAN; // Java default&lt;br /&gt;  } else if (Integer.reverseBytes(&lt;br /&gt;               firstWordinImage) == MAGIC_NUMBER) {&lt;br /&gt;    result = ByteOrder.LITTLE_ENDIAN;&lt;br /&gt;  }&lt;br /&gt;  // ...&lt;br /&gt;&lt;br /&gt;super.seek(0); // reset stream&lt;br /&gt;} catch (IOException ex) { ... }&lt;br /&gt;return result;&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;The first word in the image file is compared to a fixed value: 6502. In the original version of Potato, these values were created from four bytes manually, after which their order was inverted manually, too.&lt;br /&gt;&lt;br /&gt;In particular, when reading the image, one has to take into account that, for certain binary data, such as byte code and strings, the byte order must not be inverted during byte order conversion. Since the adjustment to the Java byte order, for reasons of simplicity, is done initially for all content,the byte order must be fixed later. This is done in the method decodeBytes of the class SqueakObject. Whether or not such a conversion is required for a particular object can be decided on the base of the format field of the SqueakObject-Header. This recovery step is required when the value of the field is greater than or equal to eight.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Extraction of Objects&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;In the course of studying the image reading procedure for extracting the individual elements from the Squeak image file we revised and simplified the code. The classes SqueakImageInputStream, SqueakImageHeader and SqueakObjectHeader were introduced.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_OIA48QnAF_g/SLlN5vMofSI/AAAAAAAAAAg/0s3dAX5vck4/s1600-h/SqueakImageReaderArchitecture.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_OIA48QnAF_g/SLlN5vMofSI/AAAAAAAAAAg/0s3dAX5vck4/s400/SqueakImageReaderArchitecture.png" alt="" id="BLOGGER_PHOTO_ID_5240305295739616546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The class SqueakImageInputStream has methods for reading complex data structures from the image file. The method readImageHeader reads all values from the image header and the methods readSqueakObject and readSqueakObjectHeader read complete objects from the image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_OIA48QnAF_g/SLlOVN5lNmI/AAAAAAAAAAo/BysPtfhwSn0/s1600-h/SqueakObjectLayout.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_OIA48QnAF_g/SLlOVN5lNmI/AAAAAAAAAAo/BysPtfhwSn0/s400/SqueakObjectLayout.jpg" alt="" id="BLOGGER_PHOTO_ID_5240305767837677154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:130%;" &gt;Squeak Object Layout&lt;/span&gt;&lt;br /&gt;A Squeak object is represented by a header describing the object and a body part containing the actual object data. The header may consist of 1 to 3 header words, where the rightmost (mandatory) header contains information on the format of the object.&lt;br /&gt;The header of a Squeak object consists of three fields. The first two fields are optional and indicate the size or the class identification in the case that these values are too big to be stored in the small standard header field. We realize this via a switch statement, where the case blocks are not ending with a break statement for the optional headers. Therefore the following header fields are read, too.&lt;br /&gt;&lt;br /&gt;The processing of the different optional headers:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;switch (headerType) {&lt;br /&gt; case HeaderTypeSizeAndClass:&lt;br /&gt;   readSizeHeader(currentHeaderWord);&lt;br /&gt;   currentHeaderWord = imageInputStream.readInt();&lt;br /&gt; case HeaderTypeClass:&lt;br /&gt;   readClassHeader(currentHeaderWord);&lt;br /&gt;   currentHeaderWord = imageInputStream.readInt();&lt;br /&gt; case HeaderTypeShort:&lt;br /&gt;   readBaseHeader(currentHeaderWord);&lt;br /&gt;   break;&lt;br /&gt; default:&lt;br /&gt;   throw new RuntimeException("unknown header");&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;In order to deal with the complex object header structure we introduced the class SqueakObjectHeader. The class contains fields for all header elements (e.g., object size and format) as well as utility methods for reading the header directly from a  SqueakImageInputStream. After reading the object header, the rest of the object is read from the file and decoded into a SqueakObject instance according to the type indicated by the form field in the header.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4379255145075161533-1452901584630533687?l=potatovm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://potatovm.blogspot.com/feeds/1452901584630533687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4379255145075161533&amp;postID=1452901584630533687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default/1452901584630533687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default/1452901584630533687'/><link rel='alternate' type='text/html' href='http://potatovm.blogspot.com/2008/08/image-loading-in-potato.html' title='Image Loading in Potato'/><author><name>wierob</name><uri>http://www.blogger.com/profile/04291964846009357957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OIA48QnAF_g/SLlNryML75I/AAAAAAAAAAY/39PvxYxNgTE/s72-c/SqueakImageFormat.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4379255145075161533.post-1085660676145463676</id><published>2008-07-27T16:13:00.005+02:00</published><updated>2008-07-30T13:25:56.388+02:00</updated><title type='text'>Large Integer Handling in Potato</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Different Kinds of Squeak Objects&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Squeak, there exist different kinds of objects that differ in how their contents are addressed. An object can, for example, hold references to other objects that are addressed by names that are mapped to slot indices. Most "ordinary" objects are shaped this way. An object can also hold elements (e.g., machine words, integers, or bytes) that are addressed by slot index. Strings and arrays are an example of this: each character or array element is stored at a given position. A third possibility is for an object to hold both references and arrayed elements; e.g., &lt;tt&gt;CompiledMethod&lt;/tt&gt; instances store the literals used in the corresponding method as references, and the bytecodes representing the method code as an indexable byte array.&lt;br /&gt;&lt;br /&gt;The &lt;tt&gt;format&lt;/tt&gt; field in an object's header controls the nature of the object's contents. For instance, a value of 12 and greater implies that the object is a &lt;tt&gt;CompiledMethod&lt;/tt&gt;. Depending on the &lt;tt&gt;format&lt;/tt&gt; field's value, the virtual machine interprets the contiguous memory area representing the object in different ways.&lt;br /&gt;&lt;br /&gt;In JSqueak, and, consequently, in Potato, it is not straightforwardly possible to simply interpret a collection of slots in such strongly different ways. To the end of supporting all kinds of Squeak objects nevertheless, any Potato object holds two references that are used to store different kinds of data:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;class SqueakObject {&lt;br /&gt; ...&lt;br /&gt; public Object bits;&lt;br /&gt; ...&lt;br /&gt; public Object[] pointers;&lt;br /&gt; ...&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The &lt;tt&gt;pointers&lt;/tt&gt; field is used to store pointers of all kinds. The &lt;tt&gt;bits&lt;/tt&gt; field is used to store indexable binary data. Note that its type is &lt;tt&gt;Object&lt;/tt&gt;: that way, it can store arrays of &lt;tt&gt;int&lt;/tt&gt; values (e.g., for machine-word arrays) and arrays of &lt;tt&gt;byte&lt;/tt&gt; values (e.g., for strings) equally well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Representing Large Numbers&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Squeak features two classes for representing integers that do not fit the 30+1-bit &lt;tt&gt;SmallInteger&lt;/tt&gt; space: &lt;tt&gt;LargePositiveInteger&lt;/tt&gt; and &lt;tt&gt;LargeNegativeInteger&lt;/tt&gt;. Both share the property that they store, in the bits field, a &lt;tt&gt;byte&lt;/tt&gt; array whose elements represent the absolute value of the corresponding number - the signum of the number is indeed determined by the object's type. A &lt;tt&gt;Large****tiveInteger&lt;/tt&gt;'s &lt;tt&gt;byte&lt;/tt&gt; array can have any length that is required to represent the number in question. The first array element is the least significant byte of the number's binary representation.&lt;br /&gt;&lt;br /&gt;The original JSqueak did not feature primitive implementations for arithmetic operations on &lt;tt&gt;Large****tiveIntegers&lt;/tt&gt;. Instead, in-image functionality would be executed for each such operation. As each and every single bytecode of such in-image functionality has to be evaluated by the interpreter, the lack of primitives for &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; arithmetics most certainly implies a slowdown. This seems unnecessary given that Java, the platform on which JSqueak and Potato are implemented, has strong support for large integers in the form of the &lt;tt&gt;java.math.BigInteger&lt;/tt&gt; class.&lt;br /&gt;&lt;br /&gt;Since &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; objects are of a kind that only stores indexed binary data, the pointers reference is unused in such objects. The &lt;tt&gt;pointers&lt;/tt&gt; array hence looks like the natural place to cache a Java &lt;tt&gt;BigInteger&lt;/tt&gt; object shadowing the Squeak &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; instance in question. The concept of shadows was also used in the &lt;a href="http://pypysqueak.blogspot.com/"&gt;SPy&lt;/a&gt; project, an implementation of the Squeak VM using the &lt;a href="http://codespeak.net/pypy/"&gt;PyPy&lt;/a&gt; infrastructure. Potato maintains, for &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; objects, a &lt;tt&gt;pointers&lt;/tt&gt; array with size 1, which contains exactly one object: a reference to the shadow &lt;tt&gt;BigInteger&lt;/tt&gt; representing the respective Squeak object.&lt;br /&gt;&lt;br /&gt;The large integer primitives implemented in Potato create shadows on demand, i.e., the first time they are actually required to perform an arithmetic operation, for &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; instances that were stored in the image. All &lt;tt&gt;Large****tiveInteger&lt;/tt&gt;s created by the Potato VM are equipped with shadows right away.&lt;br /&gt;&lt;br /&gt;Creating a &lt;tt&gt;BigInteger&lt;/tt&gt; shadowing a &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; involves reversing the &lt;tt&gt;byte&lt;/tt&gt; array stored in the Squeak object as Java's &lt;tt&gt;BigInteger&lt;/tt&gt; requires a big-endian representation of the number in question. This functionality is implemented in the &lt;tt&gt;potato.objects.LargeInteger&lt;/tt&gt; class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Example: Adding Large Integers&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is how a typical implementation of a large integer primitive looks. The example represents the primitive for adding two large integers; most large integer primitives look very similar.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;boolean primitiveLargeIntegerAdd() {&lt;br /&gt; return pop2andPushPossiblyCoercedBigIfOK(&lt;br /&gt;     getBig((SqueakObject)stack.stackValue(1)).add(&lt;br /&gt;         coerceToBig(stack.stackValue(0))));&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The two objects in question can be found on the stack. The object at index 1 is self, which is guaranteed to be a &lt;tt&gt;Large****tiveInteger&lt;/tt&gt;. The object at index 0 is the second (right-hand) parameter to the operation; it may be something entirely different, e.g., a &lt;tt&gt;SmallInteger&lt;/tt&gt;, or even an illegal object.&lt;br /&gt;&lt;br /&gt;The &lt;tt&gt;getBig()&lt;/tt&gt; method interprets its parameter as a &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; and returns its Java &lt;tt&gt;BigInteger&lt;/tt&gt; representation. This method has a side effect: if the Squeak object does not already hold a cached &lt;tt&gt;BigInteger&lt;/tt&gt; shadow, it is created and stored in the Squeak object. This is arguably not very good style and may be changed in the future.&lt;br /&gt;&lt;br /&gt;The &lt;tt&gt;coerceToBig()&lt;/tt&gt; method checks whether the passed object is a &lt;tt&gt;SmallInteger&lt;/tt&gt; and, if so, returns a &lt;tt&gt;BigInteger&lt;/tt&gt; representation thereof. Otherwise, it falls back to &lt;tt&gt;getBig()&lt;/tt&gt;.&lt;br /&gt;&lt;br /&gt;Having obtained two &lt;tt&gt;BigInteger&lt;/tt&gt; instances, the two are added using &lt;tt&gt;java.math.BigInteger&lt;/tt&gt;'s &lt;tt&gt;add()&lt;/tt&gt; method. The result is passed to &lt;tt&gt;pop2andPushPossiblyCoercedBigIfOK()&lt;/tt&gt;, which checks whether the result is actually a &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; or whether it can be coerced to &lt;tt&gt;SmallInteger&lt;/tt&gt; instead. Eventually, the two parameters are popped off the stack, and the correct result object is pushed onto it. If it is a &lt;tt&gt;Large****tiveInteger&lt;/tt&gt;, a shadow &lt;tt&gt;BigInteger&lt;/tt&gt; is created right away and cached in it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;More on Shadows&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The shadow concept requires some care. While most primitives yield new &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; objects, two of them deserve special attention. These primitives are &lt;tt&gt;#digitAt:put:&lt;/tt&gt; and &lt;tt&gt;#replaceFrom:to:with:startingAt:&lt;/tt&gt; - they both directly access the byte array stored in the bits field of &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; instances. In case such a primitive is executed, the shadow &lt;tt&gt;BigInteger&lt;/tt&gt; must be updated accordingly, otherwise the two representations - the Squeak one in the &lt;tt&gt;byte&lt;/tt&gt; array and the Java one in the &lt;tt&gt;BigInteger&lt;/tt&gt; stored in the &lt;tt&gt;pointers&lt;/tt&gt; array - are out of sync, which implies all kinds of trouble for the arithmetic primitives that rely on the cached &lt;tt&gt;BigInteger&lt;/tt&gt;.&lt;br /&gt;&lt;br /&gt;To overcome this issue, the implementations of said two primitives check whether the object on which they operate is a &lt;tt&gt;Large****tiveInteger&lt;/tt&gt; and update the shadow &lt;tt&gt;BigInteger&lt;/tt&gt; if necessary.&lt;br /&gt;&lt;br /&gt;This important issue was pointed out by Carl Friedrich Bolz.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Results&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Some superficial benchmarks were implemented to assess the performance of two pieces of functionality: the creation of successive &lt;tt&gt;LargePositiveIntegers&lt;/tt&gt;, and adding up a large number of such objects.&lt;br /&gt;&lt;br /&gt;The first benchmark creates 1,000,000 &lt;tt&gt;LargePositiveInteger&lt;/tt&gt;s by successively adding 1. It exhibits an almost ninefold speedup over Potato without the LargeInteger primitives.&lt;br /&gt;&lt;br /&gt;The second benchmark fills an array with 500 elements with the sums of these elements. The first two slots contain the two smallest possible &lt;tt&gt;LargePositiveInteger&lt;/tt&gt;s; slot 3, the sum of the first two slots; slot 4, the sum of the first three slots, and so forth. This involves huge amounts of large integer primitives being executed (albeit only addition). This benchmark exhibits a roughly 22-fold speedup.&lt;br /&gt;&lt;br /&gt;While these results were obtained using rather simple and straightforward benchmarks that are likely not sustainable, they still show that using the capabilities of the underlying platform in Potato is worthwhile.&lt;br /&gt;&lt;br /&gt;Besides, it was fun implementing them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic;"&gt;Status&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As of this writing, the large integer support can be found in the LargeInteger branch of the Potato SVN repository at &lt;a href="http://sourceforge.net/projects/potatovm/"&gt;SourceForge&lt;/a&gt;. It will be merged into the trunk once it will have undergone some more testing, benchmarking, and refactoring.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Edit: Shadows were not originally used in PyPy, but in SPy. Thanks to Adrian Kuhn for pointing this out.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4379255145075161533-1085660676145463676?l=potatovm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://potatovm.blogspot.com/feeds/1085660676145463676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4379255145075161533&amp;postID=1085660676145463676' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default/1085660676145463676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default/1085660676145463676'/><link rel='alternate' type='text/html' href='http://potatovm.blogspot.com/2008/07/large-integer-handling-in-potato.html' title='Large Integer Handling in Potato'/><author><name>haupz</name><uri>http://www.blogger.com/profile/17461023208128146240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_5WYB2ZMFx3Q/SV-5rVoEEKI/AAAAAAAABvk/S3XoEEt8EMg/S220/haupt.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4379255145075161533.post-203162905301437499</id><published>2008-07-27T11:27:00.003+02:00</published><updated>2008-07-27T11:37:31.311+02:00</updated><title type='text'>First Post</title><content type='html'>Welcome to the Potato blog!&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://sourceforge.net/projects/potatovm/"&gt;Potato virtual machine project&lt;/a&gt; is an implementation of the &lt;a href="http://www.squeak.org/"&gt;Squeak&lt;/a&gt; &lt;a href="http://www.squeakvm.org/"&gt;virtual machine&lt;/a&gt; in the Java programming language. Potato is a direct derivative of &lt;a href="http://research.sun.com/projects/JSqueak/"&gt;JSqueak&lt;/a&gt;, which was developed by Dan Ingalls at Sun.&lt;br /&gt;&lt;br /&gt;Potato started out as a coursework assignment in a virtual machines course taught at the &lt;a href="http://www.swa.hpi.uni-potsdam.de/"&gt;Software Architecture Group&lt;/a&gt; of the Hasso-Plattner-Institut in Potsdam, Germany. At the start of the assignment, JSqueak was able to run Squeak 2.2 mini images in black and white. Two students were given the assignment to implement colour support in particular, and support for more recent Squeak images in general. After some intense hacking, some of which involved Dan Ingalls, they managed to enable Potato to load Squeak 2.2 images with 32 bit colour depth.&lt;br /&gt;&lt;br /&gt;The idea of the Potato project is to evaluate the  possibilities of implementing a virtual machine for a high-level dynamic programming language such as Smalltalk on top of another high-level programming language virtual machine, namely the Java VM. This allows for various interesting optimisations, such as exploitation of the rich standard Java API.&lt;br /&gt;&lt;br /&gt;This blog will feature posts by the Potato developers and will serve the purpose of providing introductions to the structure of Potato, and to interesting ongoing development in the project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4379255145075161533-203162905301437499?l=potatovm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://potatovm.blogspot.com/feeds/203162905301437499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4379255145075161533&amp;postID=203162905301437499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default/203162905301437499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4379255145075161533/posts/default/203162905301437499'/><link rel='alternate' type='text/html' href='http://potatovm.blogspot.com/2008/07/first-post.html' title='First Post'/><author><name>haupz</name><uri>http://www.blogger.com/profile/17461023208128146240</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_5WYB2ZMFx3Q/SV-5rVoEEKI/AAAAAAAABvk/S3XoEEt8EMg/S220/haupt.jpg'/></author><thr:total>0</thr:total></entry></feed>
