author | Claus Gittinger <cg@exept.de> |
Sat, 01 Apr 2000 15:28:48 +0200 | |
changeset 5351 | f9529bd6b6e4 |
parent 2247 | 3e227e6ea1fb |
child 5353 | 286dbcd4c605 |
permissions | -rw-r--r-- |
2247 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
5351
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
15 |
"{ Package: 'stx:libbasic' }" |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
16 |
|
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
17 |
CheapBlock variableSubclass:#VarArgCheapBlock |
2247 | 18 |
instanceVariableNames:'' |
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Kernel-Methods' |
|
22 |
! |
|
23 |
||
24 |
!VarArgCheapBlock class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
||
39 |
||
40 |
! |
|
41 |
||
42 |
documentation |
|
43 |
" |
|
44 |
read the documentation in VarArgBlocks. |
|
45 |
||
46 |
||
47 |
[author:] |
|
48 |
Claus Gittinger |
|
49 |
||
50 |
[see also:] |
|
51 |
Block CheapBlock |
|
52 |
" |
|
53 |
! ! |
|
54 |
||
5351
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
55 |
!VarArgCheapBlock class methodsFor:'initialization'! |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
56 |
|
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
57 |
initialize |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
58 |
"must clear the is-block flag bit in the class |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
59 |
(otherwise, the VM might try to inline value-messages)" |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
60 |
|
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
61 |
flags := flags bitClear:(Behavior flagBlock). |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
62 |
flags := flags bitOr:(Behavior flagBlockLike). |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
63 |
|
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
64 |
" |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
65 |
self flags. |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
66 |
self initialize. |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
67 |
self flags. |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
68 |
" |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
69 |
|
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
70 |
|
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
71 |
! ! |
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
72 |
|
2247 | 73 |
!VarArgCheapBlock methodsFor:'evaluation'! |
74 |
||
75 |
value |
|
76 |
"evaluate the receiver with no block args." |
|
77 |
||
78 |
^ super value:#() |
|
79 |
||
80 |
"Created: 23.1.1997 / 04:57:49 / cg" |
|
81 |
! |
|
82 |
||
83 |
value:arg |
|
84 |
"evaluate the receiver with a single argument." |
|
85 |
||
86 |
^ super value:(Array with:arg) |
|
87 |
||
88 |
"Created: 23.1.1997 / 04:57:57 / cg" |
|
89 |
! |
|
90 |
||
91 |
value:arg1 value:arg2 |
|
92 |
"evaluate the receiver with two arguments." |
|
93 |
||
94 |
^ super value:(Array with:arg1 with:arg2) |
|
95 |
||
96 |
"Created: 23.1.1997 / 04:58:03 / cg" |
|
97 |
! |
|
98 |
||
99 |
value:arg1 value:arg2 value:arg3 |
|
100 |
"evaluate the receiver with three arguments." |
|
101 |
||
102 |
^ super value:(Array with:arg1 with:arg2 with:arg3) |
|
103 |
||
104 |
"Created: 23.1.1997 / 04:58:09 / cg" |
|
105 |
! |
|
106 |
||
107 |
value:arg1 value:arg2 value:arg3 value:arg4 |
|
108 |
"evaluate the receiver with four arguments." |
|
109 |
||
110 |
^ super value:(Array |
|
111 |
with:arg1 |
|
112 |
with:arg2 |
|
113 |
with:arg3 |
|
114 |
with:arg4) |
|
115 |
||
116 |
"Modified: 22.1.1997 / 19:41:22 / cg" |
|
117 |
"Created: 23.1.1997 / 04:58:14 / cg" |
|
118 |
! |
|
119 |
||
120 |
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 |
|
121 |
"evaluate the receiver with five arguments." |
|
122 |
||
123 |
^ super value:(Array |
|
124 |
with:arg1 |
|
125 |
with:arg2 |
|
126 |
with:arg3 |
|
127 |
with:arg4 |
|
128 |
with:arg5) |
|
129 |
||
130 |
"Modified: 22.1.1997 / 19:41:26 / cg" |
|
131 |
"Created: 23.1.1997 / 04:58:18 / cg" |
|
132 |
! |
|
133 |
||
134 |
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6 |
|
135 |
"evaluate the receiver with six arguments." |
|
136 |
||
137 |
^ super value:(Array |
|
138 |
with:arg1 |
|
139 |
with:arg2 |
|
140 |
with:arg3 |
|
141 |
with:arg4 |
|
142 |
with:arg5 |
|
143 |
with:arg6) |
|
144 |
||
145 |
"Modified: 22.1.1997 / 19:41:29 / cg" |
|
146 |
"Created: 23.1.1997 / 04:58:22 / cg" |
|
147 |
! |
|
148 |
||
149 |
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6 value:arg7 |
|
150 |
"evaluate the receiver with seven arguments." |
|
151 |
||
152 |
^ super value:(Array |
|
153 |
with:arg1 |
|
154 |
with:arg2 |
|
155 |
with:arg3 |
|
156 |
with:arg4 |
|
157 |
with:arg5 |
|
158 |
with:arg6 |
|
159 |
with:arg7) |
|
160 |
||
161 |
"Modified: 22.1.1997 / 19:41:33 / cg" |
|
162 |
"Created: 23.1.1997 / 04:58:26 / cg" |
|
163 |
! |
|
164 |
||
165 |
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6 value:arg7 value:arg8 |
|
166 |
"evaluate the receiver with eight arguments." |
|
167 |
||
168 |
^ super value:(Array |
|
169 |
with:arg1 |
|
170 |
with:arg2 |
|
171 |
with:arg3 |
|
172 |
with:arg4 |
|
173 |
with:arg5 |
|
174 |
with:arg6 |
|
175 |
with:arg7 |
|
176 |
with:arg8) |
|
177 |
||
178 |
"Created: 23.1.1997 / 04:58:30 / cg" |
|
179 |
! |
|
180 |
||
181 |
valueWithArguments:argArray |
|
182 |
"evaluate the receiver with all arguments in argArray." |
|
183 |
||
184 |
^ super value:argArray |
|
185 |
||
186 |
"Created: 23.1.1997 / 04:59:16 / cg" |
|
187 |
! ! |
|
188 |
||
189 |
!VarArgCheapBlock methodsFor:'testing'! |
|
190 |
||
191 |
isVarArgBlock |
|
192 |
"return true, if this block accepts a variable number of arguments" |
|
193 |
||
194 |
^ true |
|
195 |
||
196 |
"Created: 23.1.1997 / 05:00:18 / cg" |
|
197 |
! ! |
|
198 |
||
199 |
!VarArgCheapBlock class methodsFor:'documentation'! |
|
200 |
||
201 |
version |
|
5351
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
202 |
^ '$Header: /cvs/stx/stx/libbasic/VarArgCheapBlock.st,v 1.2 2000-04-01 13:28:34 cg Exp $' |
2247 | 203 |
! ! |
5351
f9529bd6b6e4
oops - must setup the isBLOCK / isBLOCKLIKE flags correctly
Claus Gittinger <cg@exept.de>
parents:
2247
diff
changeset
|
204 |
VarArgCheapBlock initialize! |