BlockNode.st
changeset 104 2016bfa4cd45
parent 103 f4a69d7dd387
child 135 aa4f7b8f121e
--- a/BlockNode.st	Fri Aug 11 18:04:27 1995 +0200
+++ b/BlockNode.st	Fri Aug 11 22:28:40 1995 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libcomp/BlockNode.st,v 1.16 1995-08-11 16:02:48 claus Exp $
+$Header: /cvs/stx/stx/libcomp/BlockNode.st,v 1.17 1995-08-11 20:27:44 claus Exp $
 '!
 
 !BlockNode class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libcomp/BlockNode.st,v 1.16 1995-08-11 16:02:48 claus Exp $
+$Header: /cvs/stx/stx/libcomp/BlockNode.st,v 1.17 1995-08-11 20:27:44 claus Exp $
 "
 !
 
@@ -355,12 +355,12 @@
 
 !BlockNode methodsFor:'code generation'!
 
-codeOn:aStream inBlock:b
+codeOn:aStream inBlock:b for:aCompiler
     |thisStatement nextStatement pos code cheapy|
 
     cheapy := self checkForSimpleBlock.
     cheapy notNil ifTrue:[
-	cheapy codeOn:aStream inBlock:b.
+	cheapy codeOn:aStream inBlock:b for:aCompiler.
 	^ self
     ].
 
@@ -377,9 +377,9 @@
 	[thisStatement notNil] whileTrue:[
 	    nextStatement := thisStatement nextStatement.
 	    nextStatement notNil ifTrue:[
-		thisStatement codeForSideEffectOn:aStream inBlock:self
+		thisStatement codeForSideEffectOn:aStream inBlock:self for:aCompiler
 	    ] ifFalse:[
-		thisStatement codeOn:aStream inBlock:self
+		thisStatement codeOn:aStream inBlock:self for:aCompiler
 	    ].
 	    thisStatement := nextStatement
 	]
@@ -416,14 +416,14 @@
     (aStream contents) at:pos+1 put:(aStream position)
 !
 
-codeForSideEffectOn:aStream inBlock:b
+codeForSideEffectOn:aStream inBlock:b for:aCompiler
     "generate code for this statement - value not needed.
      For blocks, no code is generated at all."
 
     ^ self
 !
 
-codeInlineOn:aStream inBlock:b valueNeeded:valueNeeded
+codeInlineOn:aStream inBlock:b valueNeeded:valueNeeded for:aCompiler
     |thisStatement nextStatement|
 
     blockVars notNil ifTrue:[
@@ -431,7 +431,7 @@
 	 surrounding method. generate a make-block and send it value"
 
 "/        Transcript showCr:'cannot (yet) compile block with blockvars inline'.
-	self codeOn:aStream inBlock:b.
+	self codeOn:aStream inBlock:b for:aCompiler.
 	aStream nextPut:#value.
 	(MessageNode hasLineNumber:#value) ifTrue:[
 	    aStream nextPut:lineNr.
@@ -451,17 +451,17 @@
 	[thisStatement notNil] whileTrue:[
 	    nextStatement := thisStatement nextStatement.
 	    (nextStatement notNil or:[valueNeeded not]) ifTrue:[
-		thisStatement codeForSideEffectOn:aStream inBlock:b
+		thisStatement codeForSideEffectOn:aStream inBlock:b for:aCompiler
 	    ] ifFalse:[
-		thisStatement codeOn:aStream inBlock:b
+		thisStatement codeOn:aStream inBlock:b for:aCompiler
 	    ].
 	    thisStatement := nextStatement
 	]
     ]
 !
 
-codeInlineOn:aStream inBlock:b
-    self codeInlineOn:aStream inBlock:b valueNeeded:true
+codeInlineOn:aStream inBlock:b for:aCompiler
+    self codeInlineOn:aStream inBlock:b valueNeeded:true for:aCompiler
 !
 
 checkForSimpleBlock