*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Sat, 24 Jun 2000 17:42:54 +0200
changeset 1049 0b69b110f150
parent 1048 6eaeba225e67
child 1050 c6306361ec19
*** empty log message ***
ByteCodeCompiler.st
PrimitiveNode.st
--- a/ByteCodeCompiler.st	Sat Jun 24 17:42:37 2000 +0200
+++ b/ByteCodeCompiler.st	Sat Jun 24 17:42:54 2000 +0200
@@ -19,7 +19,7 @@
 		STCCompilationIncludes STCCompilationOptions STCCompilation
 		ShareCode STCKeepSTIntermediate STCKeepCIntermediate
 		STCModulePath CCCompilationOptions CC STC ListCompiledMethods
-		STCKeepOIntermediate Verbose NewCodeSet'
+		STCKeepOIntermediate Verbose NewCodeSet NewPrimitives'
 	poolDictionaries:''
 	category:'System-Compiler'
 !
@@ -439,6 +439,7 @@
 
 initialize
     NewCodeSet := false.
+    NewPrimitives := false.
     ShareCode := true.
     STCKeepCIntermediate := false.
     STCKeepOIntermediate := false.
@@ -466,6 +467,19 @@
     "
      ByteCodeCompiler newCodeSet:true
     "
+!
+
+newPrimitives
+    ^ NewPrimitives 
+
+!
+
+newPrimitives:aBoolean
+    NewPrimitives := aBoolean.
+
+    "
+     ByteCodeCompiler newPrimitives:true
+    "
 ! !
 
 !ByteCodeCompiler class methodsFor:'compiling methods'!
@@ -700,7 +714,7 @@
         or:[(compiler hasPrimitiveCode and:[self canCreateMachineCode])
         or:[STCCompilation == #always and:[sel ~~ #doIt]]])
         and:[(STCCompilation ~~ #never)
-        and:[NewCodeSet ~~ true]]) ifTrue:[
+        and:[NewPrimitives ~~ true]]) ifTrue:[
             newMethod := compiler 
                             compileToMachineCode:aString 
                             forClass:aClass 
@@ -774,7 +788,7 @@
         "/
         "/ generate a trapping method, if primitive code is present
         "/
-        NewCodeSet ~~ true ifTrue:[
+        NewPrimitives ~~ true ifTrue:[
             newMethod := compiler trappingStubMethodFor:aString inCategory:cat.
             install ifTrue:[
                 aClass addSelector:sel withMethod:newMethod.
@@ -826,7 +840,7 @@
     ].
 
     primNr := compiler primitiveNumber.
-    ((NewCodeSet == true) or:[primNr isNil]) ifTrue:[
+    ((NewPrimitives == true) or:[primNr isNil]) ifTrue:[
         "
          produce symbolic code first
         "
@@ -859,7 +873,7 @@
      finally create the new method-object
     "
     newMethod := compiler createMethod.
-    NewCodeSet == true ifTrue:[
+    NewPrimitives == true ifTrue:[
         newMethod byteCode:(compiler code).
         primNr notNil ifTrue:[
             newMethod setPrimitiveNumber:primNr
@@ -3675,6 +3689,6 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.166 2000-06-20 18:20:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.167 2000-06-24 15:42:54 cg Exp $'
 ! !
 ByteCodeCompiler initialize!
--- a/PrimitiveNode.st	Sat Jun 24 17:42:37 2000 +0200
+++ b/PrimitiveNode.st	Sat Jun 24 17:42:54 2000 +0200
@@ -102,7 +102,7 @@
     "catch code generation"
 
     optional ifTrue:[^ self].
-    aCompiler class newCodeSet == true ifTrue:[^ self].
+    aCompiler class newPrimitives == true ifTrue:[^ self].
     self error:'cannot compile primitives (as yet)' mayProceed:true
 !
 
@@ -110,7 +110,7 @@
     "catch code generation"
 
     optional ifTrue:[^ self].
-    ByteCodeCompiler newCodeSet == true ifTrue:[^ self].
+    aCompiler class newPrimitives == true ifTrue:[^ self].
     self error:'cannot compile primitives (as yet)' mayProceed:true
 ! !
 
@@ -143,5 +143,5 @@
 !PrimitiveNode class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/PrimitiveNode.st,v 1.18 2000-06-19 12:02:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/PrimitiveNode.st,v 1.19 2000-06-24 15:42:43 cg Exp $'
 ! !