IRBytecodeGenerator.st
changeset 42 acdc3ec6d152
parent 41 f3898a3b378d
child 43 c8afb8e4c3cc
equal deleted inserted replaced
41:f3898a3b378d 42:acdc3ec6d152
     4 	instanceVariableNames:'seqOrder orderSeq jumps literals lastLiteral currentSeqId
     4 	instanceVariableNames:'seqOrder orderSeq jumps literals lastLiteral currentSeqId
     5 		currentSeqNum lastSpecialReturn instrMaps instrMap maxTemp stacks
     5 		currentSeqNum lastSpecialReturn instrMaps instrMap maxTemp stacks
     6 		stack primNum numArgs numVars properties code seqCode lastLine'
     6 		stack primNum numArgs numVars properties code seqCode lastLine'
     7 	classVariableNames:'BytecodeTable Bytecodes SpecialConstants SpecialSelectors'
     7 	classVariableNames:'BytecodeTable Bytecodes SpecialConstants SpecialSelectors'
     8 	poolDictionaries:''
     8 	poolDictionaries:''
     9 	category:'NewCompiler-Bytecode'
     9 	category:'IR Compiler-Bytecode'
    10 !
    10 !
    11 
    11 
    12 IRBytecodeGenerator comment:'I generate bytecodes in response to ''instructions'' messages being sent to me.  I rewrite jumps at the end so their jump offsets are correct (see #bytecodes).  For example, to create a compiled method that compares first instVar to first arg and returns ''yes'' or ''no'' (same example as in IRBuilder), do:
    12 IRBytecodeGenerator comment:'I generate bytecodes in response to ''instructions'' messages being sent to me.  I rewrite jumps at the end so their jump offsets are correct (see #bytecodes).  For example, to create a compiled method that compares first instVar to first arg and returns ''yes'' or ''no'' (same example as in IRBuilder), do:
    13 	BytecodeGenerator new
    13 	BytecodeGenerator new
    14 		numArgs: 1;
    14 		numArgs: 1;
   806 ! !
   806 ! !
   807 
   807 
   808 !IRBytecodeGenerator class methodsFor:'documentation'!
   808 !IRBytecodeGenerator class methodsFor:'documentation'!
   809 
   809 
   810 version
   810 version
   811     ^ '$Id$'
   811     ^ '$eader: /cvs/stx/cvut/stx/goodies/newcompiler/IRBytecodeGenerator.st,v 1.3 2009/10/08 12:04:39 fm Exp$'
   812 !
   812 !
   813 
   813 
   814 version_CVS
   814 version_CVS
   815     ^ 'Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBytecodeGenerator.st,v 1.3 2009/10/08 12:04:39 fm Exp '
   815     ^ '$eader: /cvs/stx/cvut/stx/goodies/newcompiler/IRBytecodeGenerator.st,v 1.3 2009/10/08 12:04:39 fm Exp$'
   816 !
   816 !
   817 
   817 
   818 version_SVN
   818 version_SVN
   819     ^ '$Id::                                                                                                                        $'
   819     ^ '$Id::                                                                                                                        $'
   820 ! !
   820 ! !
       
   821