Skip to content

Commit

Permalink
Removal of smalltalk reference follow by a at: in class side. Replace…
Browse files Browse the repository at this point in the history
… by self environment at:.
  • Loading branch information
Alisu committed Sep 24, 2019
1 parent 90ca5ed commit 6544404
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Alien-Core/Alien.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Alien class >> ensureInSpecialObjectsArray [
self ~~ Alien ifTrue: [^self].

index := 53.
((Smalltalk includesKey: #VMObjectIndices)
((self environment includesKey: #VMObjectIndices)
and: [((Smalltalk at: #VMObjectIndices) classPool at: #ClassAlien ifAbsent: []) ~= (index - 1)]) ifTrue:
[self error: 'index probably wrong'].

Expand Down
7 changes: 4 additions & 3 deletions src/Alien-Core/UnsafeAlien.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ UnsafeAlien class >> ensureInSpecialObjectsArray [
So check if the specialObjectsArray is of the expected size before recreating
and slam UnsafeAlien in if the specialObjectsArray is already large enough."

| index |
| index env|
env := self environment.
self ~~ UnsafeAlien ifTrue: [^self].

index := 55.
((Smalltalk includesKey: #VMObjectIndices)
and: [((Smalltalk at: #VMObjectIndices) classPool at: #ClassUnsafeAlien ifAbsent: []) ~= (index - 1)]) ifTrue:
((env includesKey: #VMObjectIndices)
and: [((env at: #VMObjectIndices) classPool at: #ClassUnsafeAlien ifAbsent: []) ~= (index - 1)]) ifTrue:
[self error: 'index probably wrong'].

Smalltalk specialObjectsArray size < index ifTrue:
Expand Down
4 changes: 2 additions & 2 deletions src/Fuel-Platform-Pharo-Core/FLPharoPlatform.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {

{ #category : #testing }
FLPharoPlatform class >> addNativeBoostComponents [
Smalltalk
self environment
at: #NBExternalHandle
ifPresent: [ :handle | ^ self ].

Expand All @@ -18,7 +18,7 @@ FLPharoPlatform class >> addNativeBoostComponents [

{ #category : #testing }
FLPharoPlatform class >> addPackageManifest [
Smalltalk
self environment
at: #PackageManifest
ifPresent: [ ^ self ].

Expand Down
4 changes: 2 additions & 2 deletions src/Spec-MorphicAdapters/WorldPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ WorldPresenter class >> defaultSpec [
WorldPresenter class >> setUpWorld [
World changeProportionalLayout.
World submorphs do: [:e | e delete ].
(Smalltalk at: #PolymorphSystemSettings)
(self environment at: #PolymorphSystemSettings)
perform: #desktopColor:
with: self theme backgroundColor.
(Smalltalk at: #TaskbarMorph) perform: #showTaskbar: with: false
(self environment at: #TaskbarMorph) perform: #showTaskbar: with: false
]

{ #category : #private }
Expand Down
2 changes: 1 addition & 1 deletion src/Text-Core/RunArray.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ RunArray class >> scanFrom: strm [
char == $f ifTrue: [attrList add:
(TextFontChange new fontNumber: (Integer readFrom: strm ifFail: [0]))].
char == $F ifTrue: [attrList add: (TextFontReference toFont:
(Smalltalk at: #StrikeFont ifPresent: [:sf | sf familyName: (strm upTo: $#) size: (Integer readFrom: strm ifFail: [0])]))].
(self environment at: #StrikeFont ifPresent: [:sf | sf familyName: (strm upTo: $#) size: (Integer readFrom: strm ifFail: [0])]))].
char == $b ifTrue: [attrList add: (TextEmphasis bold)].
char == $i ifTrue: [attrList add: (TextEmphasis italic)].
char == $u ifTrue: [attrList add: (TextEmphasis underlined)].
Expand Down
9 changes: 5 additions & 4 deletions src/Zinc-HTTP/ZnDigestAuthenticator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ ZnDigestAuthenticator class >> hasMD5Support [

{ #category : #accessing }
ZnDigestAuthenticator class >> md5Hash: aString [
| hash |
| hash env|
env := self environment.
"Answer hash of aString as lowercase 32 digit hex String."
Smalltalk at: #MD5 ifPresent: [ :cls |
env at: #MD5 ifPresent: [ :cls |
^ ((cls new initialize) hashStream: (aString asByteArray readStream)) hex ].
hash := Smalltalk at: #CMD5Hasher ifPresent: [ :cls |
hash := env at: #CMD5Hasher ifPresent: [ :cls |
cls hashMessage: aString ].
hash ifNil: [
hash := Smalltalk at: #TCryptoRandom ifPresent: [ :cls |
hash := env at: #TCryptoRandom ifPresent: [ :cls |
(cls basicNew perform: #md5HashMessage: with: aString) asInteger ] ].
hash ifNotNil: [
hash := hash hex asLowercase.
Expand Down

0 comments on commit 6544404

Please sign in to comment.