Skip to content

Commit

Permalink
Slight refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Jan 10, 2024
1 parent 554e14e commit f6d4a36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/Sandblocks-Smalltalk/SBVariantProxy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ SBVariantProxy >> updateOriginalWithOwnValues [
| variantThatNeedsChanging |
variantThatNeedsChanging := self containedMethod detectVariant: original.

variantThatNeedsChanging ifNil: [self delete. ^ self].
variantThatNeedsChanging ifNil: [^self delete].

original replaceBy: (original := self firstSubmorph copyBlock).
original isVariant ifFalse: [self delete. ^ self].
original isVariant ifFalse: [^ self delete].

variantThatNeedsChanging replaceValuesFrom: original copyBlock.
self sandblockEditor markChanged: self containedMethod
Expand All @@ -112,8 +112,9 @@ SBVariantProxy >> updateSelfAfterMethodUpdate: newMethod [

| variantThatMaybeChanged |
variantThatMaybeChanged := newMethod detectVariant: original.
containedMethod := newMethod.

variantThatMaybeChanged ifNil: [self delete. ^ self].
variantThatMaybeChanged ifNil: [^self delete].

(variantThatMaybeChanged sourceString ~= self firstSubmorph sourceString)
ifTrue: [
Expand Down

0 comments on commit f6d4a36

Please sign in to comment.