IRJump.st
changeset 1 0dd36941955f
child 23 377bc46cad12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IRJump.st	Wed Jun 11 14:54:42 2008 +0000
@@ -0,0 +1,56 @@
+"{ Package: 'stx:goodies/newcompiler' }"
+
+IRInstruction subclass:#IRJump
+	instanceVariableNames:'destination'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'NewCompiler-IR'
+!
+
+IRJump comment:'Instruction "goto: labelNum"'
+!
+
+
+!IRJump methodsFor:'accessing'!
+
+destination
+
+	^ destination
+!
+
+destination: aSequence
+
+	destination := aSequence
+!
+
+successorSequences
+
+	^ {destination}
+! !
+
+!IRJump methodsFor:'interpret'!
+
+executeOn: interpreter
+
+	^ interpreter goto: destination orderNumber
+! !
+
+!IRJump methodsFor:'testing'!
+
+isGoto
+	"is unconditional jump"
+
+	^ true
+!
+
+isJump
+	"goto or if"
+
+	^ true
+! !
+
+!IRJump class methodsFor:'documentation'!
+
+version
+    ^'$Id$'
+! !