@@ -6,7 +6,7 @@ BlockClosure >> value: anArg [
6
6
whose closure is the receiver and whose caller is the sender of this message.
7
7
Supply the argument and copied values to the activation as its arguments and copied temps.
8
8
Primitive. Optional (but you're going to want this for performance)."
9
- < primitive: 207 >
9
+ < primitive: 202 >
10
10
numArgs > 1 ifTrue:
11
11
[^ self curry: {anArg}].
12
12
numArgs < 1 ifTrue:
@@ -20,7 +20,7 @@ BlockClosure >> value: firstArg value: secondArg [
20
20
whose closure is the receiver and whose caller is the sender of this message.
21
21
Supply the arguments and copied values to the activation as its arguments and copied temps.
22
22
Primitive. Optional (but you're going to want this for performance)."
23
- < primitive: 207 >
23
+ < primitive: 203 >
24
24
numArgs > 2 ifTrue:
25
25
[^ self curry: {firstArg.secondArg}].
26
26
numArgs < 2 ifTrue:
@@ -34,7 +34,7 @@ BlockClosure >> value: firstArg value: secondArg value: thirdArg [
34
34
whose closure is the receiver and whose caller is the sender of this message.
35
35
Supply the arguments and copied values to the activation as its arguments and copied temps.
36
36
Primitive. Optional (but you're going to want this for performance)."
37
- < primitive: 207 >
37
+ < primitive: 204 >
38
38
numArgs > 3 ifTrue:
39
39
[^ self curry: {firstArg.secondArg.thirdArg}].
40
40
numArgs < 3 ifTrue:
@@ -48,7 +48,7 @@ BlockClosure >> value: firstArg value: secondArg value: thirdArg value: fourthAr
48
48
whose closure is the receiver and whose caller is the sender of this message.
49
49
Supply the arguments and copied values to the activation as its arguments and copied temps.
50
50
Primitive. Optional (but you're going to want this for performance)."
51
- < primitive: 207 >
51
+ < primitive: 205 >
52
52
numArgs > 4 ifTrue:
53
53
[^ self curry: {firstArg.secondArg.thirdArg.fourthArg}].
54
54
numArgs < 4 ifTrue:
@@ -63,14 +63,17 @@ BlockClosure >> valueWithArguments: anArray [
63
63
Supply the arguments in an anArray and copied values to the activation as its arguments and copied temps.
64
64
Primitive. Optional (but you're going to want this for performance)."
65
65
| newContext ncv |
66
- < primitive: 208 >
66
+ < primitive: 206 >
67
67
numArgs > anArray size ifTrue:
68
68
[^ self curry: anArray].
69
69
numArgs < anArray size ifTrue:
70
70
[^ self uncurry: anArray].
71
- anArray isArray
72
- ifTrue: [self primitiveFailed]
73
- ifFalse: [
74
- " Retrying with an array as parameter. As the primitive only supports arrays"
75
- ^ self valueWithArguments: anArray asArray ]
71
+ newContext := self asContextWithSender: thisContext sender.
72
+ ncv := self numCopiedValues.
73
+ newContext stackp: ncv + numArgs.
74
+ 1 to: numArgs do:
75
+ [:i | newContext at: i put: (anArray at: i)].
76
+ 1 to: ncv do:
77
+ [:i | newContext at: i + numArgs put: (self at: i)].
78
+ thisContext privSender: newContext
76
79
]
0 commit comments