compiler/PPCCodeGen.st
changeset 529 439c4057517f
parent 524 f6f68d32de73
child 538 16e8536f5cfb
--- a/compiler/PPCCodeGen.st	Mon Aug 24 22:32:15 2015 +0100
+++ b/compiler/PPCCodeGen.st	Mon Aug 24 23:42:53 2015 +0100
@@ -3,7 +3,7 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#PPCCodeGen
-	instanceVariableNames:'clazz arguments'
+	instanceVariableNames:'clazz options'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Compiler-Codegen'
@@ -14,7 +14,9 @@
 new
     "return an initialized instance"
 
-    ^ self on: PPCArguments default
+    ^ self on: PPCCompilationOptions default
+
+    "Modified: / 24-08-2015 / 23:39:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 on: aPPCArguments
@@ -22,15 +24,11 @@
 
     ^ self basicNew
         initialize;
-        arguments: aPPCArguments
+        options: aPPCArguments
 ! !
 
 !PPCCodeGen methodsFor:'accessing'!
 
-arguments: args
-    arguments := args
-!
-
 clazz
     ^ clazz
 !
@@ -57,6 +55,10 @@
 
 methodCategory
     ^ 'generated'
+!
+
+options: args
+    options := args
 ! !
 
 !PPCCodeGen methodsFor:'caching'!
@@ -121,7 +123,7 @@
    clazz currentMethod isInline ifTrue: [
 		"If inlined, the return variable already holds the value"
 	] ifFalse: [
-		arguments profile ifTrue:[ 
+		options profile ifTrue:[ 
 			self codeProfileStop.
 		]. 
 		self code: '^ ', clazz currentMethod returnVariable  
@@ -137,7 +139,7 @@
     clazz currentMethod isInline ifTrue:[
         self codeEvaluateAndAssign: code to: clazz currentMethod returnVariable. 
     ] ifFalse: [ 
-        arguments profile ifTrue:[ 
+        options profile ifTrue:[ 
             self codeProfileStop.
         ].   
         self code: '^ '.
@@ -264,7 +266,7 @@
 !
 
 codeHaltIfShiftPressed
-    arguments debug ifTrue: [
+    options debug ifTrue: [
         ((Smalltalk respondsTo: #isSmalltalkX) and:[Smalltalk isSmalltalkX]) ifFalse:[  
             self code: 'Halt ifShiftPressed.'
         ]
@@ -286,13 +288,13 @@
 !
 
 codeTranscriptShow: text
-    (arguments profile) ifTrue: [ 
+    (options profile) ifTrue: [ 
         self code: 'Transcript show: ', text storeString, '; cr.'.
     ]
 !
 
 profileTokenRead: tokenName
-    arguments profile ifTrue: [ 
+    options profile ifTrue: [ 
         self code: 'context tokenRead: ', tokenName storeString, '.'
     ]
 ! !
@@ -435,7 +437,7 @@
 startMethod: id
     clazz startMethod: id category: self methodCategory.
     
-    arguments profile ifTrue:[ 
+    options profile ifTrue:[ 
         self codeProfileStart.
     ].
 !