The Trunk: Kernel-ul.1241.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-ul.1241.mcz

commits-2
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.1241.mcz

==================== Summary ====================

Name: Kernel-ul.1241
Author: ul
Time: 19 June 2019, 4:35:56.986493 pm
UUID: 630a46a4-296a-4e1c-9976-535b317e9d8c
Ancestors: Kernel-mt.1240

- added missing Object >> #perform:with:with:with:with:with: based on primitive 83
- added missing implementation of #value:value:value:value:value: based on primitives 205, 207 and 83
- MessageSend >> #value:value:value:value: uses #perform:with:with:with:with:

=============== Diff against Kernel-mt.1240 ===============

Item was added:
+ ----- Method: BlockClosure>>value:value:value:value:value: (in category 'evaluating') -----
+ value: firstArg value: secondArg value: thirdArg value: fourthArg value: fifthArg
+ "Activate the receiver, creating a closure activation (Context)
+ whose closure is the receiver and whose caller is the sender of this
+ message. Supply the arguments and copied values to the activation
+ as its arguments and copied temps. Primitive. Essential."
+ <primitive: 205>
+ | newContext |
+ numArgs ~= 5 ifTrue:
+ [self numArgsError: 5].
+ false
+ ifTrue: "Old code to simulate the closure value primitive on VMs that lack it."
+ [newContext := self asContextWithSender: thisContext sender.
+ newContext at: 1 put: firstArg.
+ newContext at: 2 put: secondArg.
+ newContext at: 3 put: thirdArg.
+ newContext at: 4 put: fourthArg.
+ newContext at: 5 put: fifthArg.
+ thisContext privSender: newContext]
+ ifFalse: [self primitiveFailed]!

Item was added:
+ ----- Method: FullBlockClosure>>value:value:value:value:value: (in category 'evaluating') -----
+ value: firstArg value: secondArg value: thirdArg value: fourthArg value: fifthArg
+ "Activate the receiver, creating a closure activation (MethodContext)
+ whose closure is the receiver and whose caller is the sender of this
+ message. Supply the arguments and copied values to the activation
+ as its arguments and copied temps. Primitive. Essential."
+ <primitive: 207>
+ | newContext |
+ numArgs ~= 5 ifTrue:
+ [self numArgsError: 5].
+ false
+ ifTrue: "Old code to simulate the closure value primitive on VMs that lack it."
+ [newContext := self asContextWithSender: thisContext sender.
+ newContext at: 1 put: firstArg.
+ newContext at: 2 put: secondArg.
+ newContext at: 3 put: thirdArg.
+ newContext at: 4 put: fourthArg.
+ newContext at: 5 put: fifthArg.
+ thisContext privSender: newContext]
+ ifFalse: [self primitiveFailed]!

Item was changed:
  ----- Method: MessageSend>>value:value:value:value: (in category 'evaluating') -----
  value: firstArg value: secondArg value: thirdArg value: fourthArg
  "Send the message with these arguments and answer the return value"
 
+ ^receiver perform: selector with: firstArg with: secondArg with: thirdArg with: fourthArg!
- ^receiver perform: selector withArguments: { firstArg. secondArg. thirdArg. fourthArg }!

Item was added:
+ ----- Method: MessageSend>>value:value:value:value:value: (in category 'evaluating') -----
+ value: firstArg value: secondArg value: thirdArg value: fourthArg value: fifthArg
+ "Send the message with these arguments and answer the return value"
+
+ ^receiver perform: selector with: firstArg with: secondArg with: thirdArg with: fourthArg with: fifthArg!

Item was added:
+ ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----
+ perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
+ "Send the selector, aSymbol, to the receiver with the given arguments.
+ Fail if the number of arguments expected by the selector is not four.
+ Primitive. Optional. See Object documentation whatIsAPrimitive."
+
+ <primitive: 83>
+ ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!