--- a/Behavior.st Mon Feb 13 20:07:11 2017 +0100
+++ b/Behavior.st Mon Feb 13 20:07:19 2017 +0100
@@ -1466,30 +1466,30 @@
|oldMethod ns nsName selector newLookupObject|
(newSelector isMemberOf:Symbol) ifFalse:[
- self error:'invalid selector'.
+ self error:'invalid selector'.
].
ns := newMethod nameSpace.
(ns notNil and:[(nsName := ns name) ~= self programmingLanguage defaultSelectorNameSpacePrefix]) ifTrue:[
- selector := (':' , nsName , '::' , newSelector) asSymbol.
- newLookupObject := Smalltalk at: #NamespaceAwareLookup. "/ so it can be nilled to disable that feature
+ selector := (':' , nsName , '::' , newSelector) asSymbol.
+ newLookupObject := Smalltalk at: #NamespaceAwareLookup. "/ so it can be nilled to disable that feature
] ifFalse:[
- selector := newSelector
+ selector := newSelector
].
"/ Q (cg): isn't that something that the caller should decide?
oldMethod := self compiledMethodAt:selector.
oldMethod notNil ifTrue:[
- newMethod restricted:(oldMethod isRestricted).
- newMethod setPrivacy:(oldMethod privacy) flushCaches:false.
+ newMethod restricted:(oldMethod isRestricted).
+ newMethod setPrivacy:(oldMethod privacy) flushCaches:false.
].
(self primAddSelector:selector withMethod:newMethod) ifFalse:[^ false].
newLookupObject notNil ifTrue:[
- lookupObject ~= newLookupObject ifTrue:[
- self lookupObject: newLookupObject
- ]
+ lookupObject ~= newLookupObject ifTrue:[
+ self lookupObject: newLookupObject
+ ]
].
"
@@ -1499,18 +1499,18 @@
"
"
problem: this is slower; since looking for all subclasses is (currently)
- a bit slow :-(
- We need the hasSubclasses-info bit in Behavior; now
+ a bit slow :-(
+ We need the hasSubclasses-info bit in Behavior; now
self withAllSubclassesDo:[:aClass |
- ObjectMemory flushInlineCachesFor:aClass withArgs:nargs.
- ObjectMemory flushMethodCacheFor:aClass
+ ObjectMemory flushInlineCachesFor:aClass withArgs:nargs.
+ ObjectMemory flushMethodCacheFor:aClass
].
"
"/
"/ pass the selector AND the old method as changeArg
- "/ - this allows for watchers to find out if its a new method or a method-change
+ "/ - this allows for watchers to find out if it's a new method or a method-change
"/
self changed:#methodDictionary with:(Array with:selector with:oldMethod).
@@ -1532,6 +1532,7 @@
"Created: / 11-12-1995 / 13:59:37 / cg"
"Modified: / 04-08-2006 / 11:39:28 / cg"
"Modified: / 20-07-2010 / 11:29:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 13-02-2017 / 19:55:19 / cg"
!
basicAddSelector:newSelector withMethod:newMethod
@@ -2990,17 +2991,18 @@
readFrom:aStream
"read an objects printed representation from the argument, aStream
and return it.
- The read object must be a kind of myself if its not, an error is raised.
+ The read object must be a kind of myself;
+ if it's not, an error is raised.
This is the reverse operation to 'storeOn:'.
WARNING: storeOn: does not handle circular references and multiple
- references to the same object.
- Use #storeBinary:/readBinaryFrom: for this."
+ references to the same object.
+ Use #storeBinary:/readBinaryFrom: for this."
^ self
- readFrom:aStream
- onError:[ self conversionErrorSignal
- raiseWith:aStream errorString:' for: ' , self name ]
+ readFrom:aStream
+ onError:[ self conversionErrorSignal
+ raiseWith:aStream errorString:' for: ' , self name ]
"
|s|
@@ -3008,6 +3010,8 @@
#(1 2 3 4) storeOn:s.
Object readFrom:(ReadStream on:s contents)
"
+
+ "Modified (comment): / 13-02-2017 / 19:55:37 / cg"
!
readFrom:aStream onError:exceptionBlock
@@ -3871,12 +3875,14 @@
!
canBeSubclassed
- "return true, if its allowed to create subclasses of the receiver.
+ "return true, if it's allowed to create subclasses of the receiver.
This method is redefined in SmallInteger and UndefinedObject, since
instances are detected by their pointer-fields, i.e. they do not have
a class entry (you don't have to understand this :-)"
^ true
+
+ "Modified (comment): / 13-02-2017 / 19:55:23 / cg"
!
commonSuperclass:aClass