IRDecompiler.st
changeset 23 377bc46cad12
parent 5 b94aea1d3710
child 26 db19d89eef60
--- a/IRDecompiler.st	Wed Aug 19 20:28:12 2009 +0000
+++ b/IRDecompiler.st	Sun Dec 06 08:24:34 2009 +0000
@@ -1,4 +1,4 @@
-"{ Package: 'stx:goodies/newcompiler' }"
+"{ Package: 'cvut:stx/goodies/newcompiler' }"
 
 IRInterpreter subclass:#IRDecompiler
 	instanceVariableNames:'stack sp scope currentInstr valueLabelMap mapEmptyStatement'
@@ -7,7 +7,10 @@
 	category:'NewCompiler-IR'
 !
 
-IRDecompiler comment:'I interpret IRMethod instructions and generate a Smalltalk abstract syntax tree rooted at a RBMethodNode.

This is implemented like a shift-reduce parser.  Each instruction either causes a node to be pushed on the stack (shift), or causes one or more nodes to be popped and combined into a single node which is push back on the stack (reduce).  Most reduction is done at the "label: labelNum" instruction where it tries to reduce jump structures into control messages like #ifTrue:, whileFalse:, etc.

Several pseudo nodes (RBPseudoNode and subclasses) are used to represent basic instructions that have not been reduced to real AST nodes yet.
'
+IRDecompiler comment:'I interpret IRMethod instructions and generate a Smalltalk abstract syntax tree rooted at a RBMethodNode.
+This is implemented like a shift-reduce parser.  Each instruction either causes a node to be pushed on the stack (shift), or causes one or more nodes to be popped and combined into a single node which is push back on the stack (reduce).  Most reduction is done at the "label: labelNum" instruction where it tries to reduce jump structures into control messages like #ifTrue:, whileFalse:, etc.
+Several pseudo nodes (RBPseudoNode and subclasses) are used to represent basic instructions that have not been reduced to real AST nodes yet.
+'
 !
 
 
@@ -1290,5 +1293,13 @@
 !IRDecompiler class methodsFor:'documentation'!
 
 version
-    ^'$Id$'
+    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRDecompiler.st,v 1.3 2009/10/08 12:04:20 fm Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRDecompiler.st,v 1.3 2009/10/08 12:04:20 fm Exp $'
+!
+
+version_SVN
+    ^'§Id: IRDecompiler.st 13 2009-04-16 12:48:33Z vranyj1 §'
 ! !