ByteCodeCompiler.st
changeset 1049 0b69b110f150
parent 1047 d0b95ceaffe3
child 1050 c6306361ec19
--- 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!