Skip to content

Commit

Permalink
Pull fixed-to-var-arity delegators up to Object
Browse files Browse the repository at this point in the history
  • Loading branch information
shingarov committed Jun 27, 2024
1 parent 984bece commit 316de6f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 60 deletions.
20 changes: 20 additions & 0 deletions src/PreSmalltalks-Pharo/Object.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,23 @@ Object >> primPerform: selector withArguments: argArray inSuperclass: lookupClas
ifFalse: [ ^ self error: 'Undefined behavior on wrong arity' ].
self primitiveFailed
]

{ #category : #'*PreSmalltalks-Pharo' }
Object >> value: arg [
^self valueWithArguments: { arg }
]

{ #category : #'*PreSmalltalks-Pharo' }
Object >> value: arg1 value: arg2 [
^self valueWithArguments: { arg1. arg2 }
]

{ #category : #'*PreSmalltalks-Pharo' }
Object >> value: arg1 value: arg2 value: arg3 [
^self valueWithArguments: { arg1. arg2. arg3 }
]

{ #category : #'*PreSmalltalks-Pharo' }
Object >> value: arg1 value: arg2 value: arg3 value: arg4 [
^self valueWithArguments: { arg1. arg2. arg3. arg4 }
]
20 changes: 0 additions & 20 deletions src/Refinements/EVar.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,6 @@ EVar >> uniq1: α [
^self
]

{ #category : #'function application' }
EVar >> value: arg1 [
^self valueWithArguments: {arg1}
]

{ #category : #'function application' }
EVar >> value: arg1 value: arg2 [
^self valueWithArguments: {arg1.arg2}
]

{ #category : #'function application' }
EVar >> value: arg1 value: arg2 value: arg3 [
^self valueWithArguments: {arg1.arg2.arg3}
]

{ #category : #'function application' }
EVar >> value: arg1 value: arg2 value: arg3 value: arg4 [
^self valueWithArguments: {arg1.arg2.arg3.arg4}
]

{ #category : #'function application' }
EVar >> valueWithArguments: args [
^args inject: self into: [ :acc :thisArg | EApp expr: acc imm: thisArg ]
Expand Down
20 changes: 0 additions & 20 deletions src/Refinements/HVar.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -120,26 +120,6 @@ HVar >> value [
^self valueWithArguments: #()
]

{ #category : #'function application' }
HVar >> value: arg [
^self valueWithArguments: {arg}
]

{ #category : #'function application' }
HVar >> value: arg1 value: arg2 [
^self valueWithArguments: {arg1. arg2}
]

{ #category : #'function application' }
HVar >> value: arg1 value: arg2 value: arg3 [
^self valueWithArguments: {arg1. arg2. arg3}
]

{ #category : #'function application' }
HVar >> value: arg1 value: arg2 value: arg3 value: arg4 [
^self valueWithArguments: {arg1. arg2. arg3. arg4}
]

{ #category : #'function application' }
HVar >> valueWithArguments: args [
"Create a Smalltalk-side representation of the receiver
Expand Down
20 changes: 0 additions & 20 deletions src/Refinements/NaturalTransformation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,6 @@ NaturalTransformation >> printOn: aStream [
aStream nextPutAll: ' components)'.
]

{ #category : #evaluating }
NaturalTransformation >> value: arg1 [
^self valueWithArguments: {arg1}
]

{ #category : #evaluating }
NaturalTransformation >> value: arg1 value: arg2 [
^self valueWithArguments: {arg1.arg2}
]

{ #category : #evaluating }
NaturalTransformation >> value: arg1 value: arg2 value: arg3 [
^self valueWithArguments: {arg1.arg2.arg3}
]

{ #category : #evaluating }
NaturalTransformation >> value: arg1 value: arg2 value: arg3 value: arg4 [
^self valueWithArguments: {arg1.arg2.arg3.arg4}
]

{ #category : #evaluating }
NaturalTransformation >> valueWithArguments: args [
| D thisComponent C f |
Expand Down

0 comments on commit 316de6f

Please sign in to comment.