BCompiler.st
changeset 292 163651658aee
parent 287 dc42dd240e5c
child 295 ec9ca802683e
--- a/BCompiler.st	Fri Jun 21 19:50:40 1996 +0200
+++ b/BCompiler.st	Fri Jun 28 17:32:43 1996 +0200
@@ -10,7 +10,7 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:2.10.9 on 14-jun-1996 at 12:20:17'                   !
+'From Smalltalk/X, Version:2.10.9 on 25-jun-1996 at 14:32:07'                   !
 
 Parser subclass:#ByteCodeCompiler
 	instanceVariableNames:'codeBytes codeIndex litArray stackDelta extra lineno extraLiteral
@@ -22,7 +22,7 @@
 	category:'System-Compiler'
 !
 
-!ByteCodeCompiler class methodsFor:'documentation'!
+!ByteCodeCompiler  class methodsFor:'documentation'!
 
 copyright
 "
@@ -89,7 +89,7 @@
 "
 ! !
 
-!ByteCodeCompiler class methodsFor:'initialization'!
+!ByteCodeCompiler  class methodsFor:'initialization'!
 
 initialize
     ShareCode := true.
@@ -97,7 +97,7 @@
     "Modified: 9.2.1996 / 17:33:44 / cg"
 ! !
 
-!ByteCodeCompiler class methodsFor:'compiling methods'!
+!ByteCodeCompiler  class methodsFor:'compiling methods'!
 
 compile:methodText forClass:classToCompileFor
     "compile a source-string for a method in classToCompileFor"
@@ -402,13 +402,6 @@
      finally create the new method-object
     "
     newMethod := compiler createMethod.
-"/    newMethod := Method new.
-"/    lits := compiler literalArray.
-"/    lits notNil ifTrue:[
-"/        "literals MUST be an array - not just any Collection"
-"/        lits := Array withAll:lits.
-"/        newMethod literals:lits
-"/    ].
     primNr notNil ifTrue:[
         newMethod code:(compiler checkForPrimitiveCode:primNr).
     ] ifFalse:[
@@ -443,6 +436,7 @@
 
     "Created: 29.10.1995 / 19:59:36 / cg"
     "Modified: 18.5.1996 / 16:39:55 / cg"
+    "Modified: 24.6.1996 / 12:41:13 / stefan"
 !
 
 compile:methodText forClass:classToCompileFor notifying:requestor
@@ -478,7 +472,7 @@
 
 ! !
 
-!ByteCodeCompiler class methodsFor:'constants'!
+!ByteCodeCompiler  class methodsFor:'constants'!
 
 byteCodeFor:aSymbol
     "returns the numeric code for some symbolic bytecodes."
@@ -500,7 +494,7 @@
     self error
 ! !
 
-!ByteCodeCompiler class methodsFor:'stc compilation defaults'!
+!ByteCodeCompiler  class methodsFor:'stc compilation defaults'!
 
 canCreateMachineCode
     "return true, if compilation to machine code is supported.
@@ -1239,14 +1233,11 @@
 !
 
 createMethod
-    |newMethod lits|
-
-    newMethod := Method new.
+    |newMethod i|
 
-    lits := litArray.
-    lits notNil ifTrue:[
-        "/ literals MUST be an array - not just any Collection
-        newMethod literals:(Array withAll:lits)
+    newMethod := Method new:(litArray size).
+    litArray notNil ifTrue:[
+        newMethod literals:litArray
     ].
 
     newMethod numberOfMethodVars:(self numberOfMethodVars).
@@ -1261,6 +1252,7 @@
 
     "Created: 18.5.1996 / 16:33:17 / cg"
     "Modified: 18.5.1996 / 16:41:31 / cg"
+    "Modified: 24.6.1996 / 12:32:50 / stefan"
 !
 
 genByteCodeFrom:symbolicCodeArray
@@ -2241,13 +2233,11 @@
     "return a stub method which traps and reports an error whenever
      called."
 
-    |newMethod lits|
+    |newMethod|
 
-    newMethod := Method new.
-    lits := litArray.
-    lits notNil ifTrue:[
-        "literals MUST be an array - not just any Collection"
-        newMethod literals:(Array withAll:lits)
+    newMethod := Method new:(litArray size).
+    litArray notNil ifTrue:[
+        newMethod literals:litArray
     ].
 
     newMethod makeUncompiled.
@@ -2261,11 +2251,12 @@
     ^ newMethod
 
     "Modified: 18.5.1996 / 16:39:12 / cg"
+    "Modified: 24.6.1996 / 12:28:24 / stefan"
 ! !
 
-!ByteCodeCompiler class methodsFor:'documentation'!
+!ByteCodeCompiler  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.80 1996-06-14 11:19:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.81 1996-06-28 15:32:36 stefan Exp $'
 ! !
 ByteCodeCompiler initialize!