Method.st
changeset 9661 61b73d0c2b38
parent 9364 beef5f0aa8bb
child 9692 d53de4f90660
--- a/Method.st	Wed Aug 23 16:07:08 2006 +0200
+++ b/Method.st	Wed Aug 23 16:07:12 2006 +0200
@@ -197,70 +197,6 @@
     ^ PrivateMethodSignal
 ! !
 
-!Method class methodsFor:'binary storage'!
-
-binaryDefinitionFrom: stream manager: manager
-    "read my definition from stream."
-
-    |cls sel|
-
-    "type-byte"
-    stream nextByte == 0 ifTrue:[
-        "
-         built-in method
-        "
-        cls := manager nextObject.
-        sel := manager nextObject.
-
-        "
-         mhmh - on the source system, this was a machinecode
-         method, while here its an interpreted one ...
-        "
-        cls := cls autoload.
-        ^ cls compiledMethodAt:sel
-    ].
-    "
-     bytecode method
-    "
-    ^ super binaryDefinitionFrom:stream manager:manager
-!
-
-binaryFullDefinitionFrom:stream manager:manager
-    "retrieve a full bytecoded-method."
-
-    |snapId cat flags code lits m sourceFilename sourcePos source|
-
-    snapId := manager nextObject.
-    cat := manager nextObject.
-    flags := manager nextObject.
-    lits := manager nextObject.
-    sourceFilename := manager nextObject.
-    sourcePos := manager nextObject.
-    sourcePos isNil ifTrue:[
-        source := manager nextObject.
-    ].
-    code := manager nextObject.
-
-    snapId == ObjectMemory snapshotID ifTrue:[
-        ObjectMemory incrementSnapshotID
-    ].
-
-    m := Method basicNew:(lits size).
-    cat notNil ifTrue:[m setCategory:cat].
-    m flags:flags.
-    m literals:lits.
-    m byteCode:code.
-    sourcePos isNil ifTrue:[
-        m source:source
-    ] ifFalse:[
-        m sourceFilename:sourceFilename position:sourcePos
-    ].
-    ^ m
-
-    "Created: 16.1.1996 / 14:44:08 / cg"
-    "Modified: 24.6.1996 / 12:29:35 / stefan"
-    "Modified: 5.1.1997 / 01:09:56 / cg"
-! !
 
 !Method class methodsFor:'queries'!
 
@@ -1081,108 +1017,6 @@
     temporaryMethod setPackage:package.
     temporaryMethod mclass:mclass.
     ^ temporaryMethod
-!
-
-readBinaryContentsFrom: stream manager: manager
-    self hasCode ifTrue:[
-	"built-in method - already complete"
-	^ self
-    ].
-
-    ^ super readBinaryContentsFrom: stream manager: manager
-
-    "Modified: / 13.11.1998 / 23:21:26 / cg"
-!
-
-storeBinaryDefinitionOn:stream manager:manager
-    "store the receiver in a binary format on stream.
-     This is an internal interface for binary storage mechanism.
-     only store bytecode-methods - machinecode methods are stored
-     as class/selector pair and a lookup is done when restored.
-
-     If the receiver method is a built-in (i.e. machine coded)
-     method, a temporary interpreted byte code method is created,
-     and its bytecode stored. 
-     This works only, if the source of the method is available and the
-     method does not contain primitive code."
-
-    |storedMethod who|
-
-    byteCode isNil ifTrue:[
-	self hasCode ifTrue:[
-	    (who := self who) notNil ifTrue:[
-		"
-		 machine code only - assume its a built-in method,
-		 and store the class/selector information.
-		 The restored method may not be exactly the same ...
-		"
-		manager putIdOfClass:(self class) on:stream.
-		stream nextPutByte:0.   "means: built-in method" 
-		manager putIdOf:(who methodClass) on:stream.
-		manager putIdOf:(who methodSelector) on:stream.
-		^ self
-	    ]
-	].
-
-	storedMethod := self asByteCodeMethod.
-	storedMethod isNil ifTrue:[
-	    self error:'store of built-in method failed'.
-	].
-	^ storedMethod storeBinaryDefinitionOn:stream manager:manager
-    ].
-
-    manager putIdOfClass:(self class) on:stream.
-    stream nextPutByte:1.       "means: byte-coded method"
-    self storeBinaryDefinitionBodyOn:stream manager:manager
-
-    "Modified: / 13.11.1998 / 23:21:42 / cg"
-!
-
-storeFullBinaryDefinitionOn:stream manager:manager
-    "store full bytecoded-method."
-
-    |m code srcPos|
-
-    "/ need a byteCode version of myself ...
-    m := self.
-    code := byteCode.
-    code isNil ifTrue:[
-	m := self asByteCodeMethod.
-	code := m byteCode.
-	code isNil ifTrue:[
-	    m := self
-	]
-    ].
-
-    ObjectMemory snapshotID storeBinaryOn:stream manager:manager.
-    category storeBinaryOn:stream manager:manager.
-
-    m flags storeBinaryOn:stream manager:manager.
-    m literals storeBinaryOn:stream manager:manager.
-    manager sourceMode == #discard ifTrue:[
-	"/ add nil, nil, nil
-	nil storeBinaryOn:stream manager:manager. "/ sourceFileName
-	nil storeBinaryOn:stream manager:manager. "/ sourcePosition
-	nil storeBinaryOn:stream manager:manager. "/ source
-    ] ifFalse:[
-	"/ add sourceFilename, srcPos
-	"/ or  nil, nil, source
-	m sourceFilename storeBinaryOn:stream manager:manager.
-	manager sourceMode == #reference ifTrue:[
-	    srcPos := m sourcePosition.
-	] ifFalse:[
-	    srcPos := nil
-	].
-	srcPos storeBinaryOn:stream manager:manager.
-	srcPos isNil ifTrue:[
-	    m source storeBinaryOn:stream manager:manager.
-	].
-    ].
-
-    code storeBinaryOn:stream manager:manager.
-
-    "Created: 16.1.1996 / 14:41:45 / cg"
-    "Modified: 5.1.1997 / 00:39:29 / cg"
 ! !
 
 !Method methodsFor:'copying'!
@@ -2985,7 +2819,7 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.291 2006-06-07 15:45:06 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.292 2006-08-23 14:07:12 cg Exp $'
 ! !
 
 Method initialize!