Refactored structure and accessors for arrayed objects (at the VM level)
[panda.git] / st / BlockContext.st
blobdaa7bfcfbfda88629686f960762b72286278f29d
2 "evaluation"
4 BlockContext method!
5 value
6         <primitive: 'BlockContext_value'>
7         self primitiveFailed!
9 BlockContext method!
10 value: argument
11         <primitive: 'BlockContext_value'>
12         self primitiveFailed!
14 BlockContext method!
15 value: firstArgument value: secondArgument
16         <primitive: 'BlockContext_value'>
17         self primitiveFailed!
19 BlockContext method!
20 value: firstArgument value: secondArgument value: thirdArgument
21         <primitive: 'BlockContext_value'>
22         self primitiveFailed!
24 BlockContext method!
25 valueWithArguments: anArray
26         <primitive: 'BlockContext_valueWithArguments'>
27         self primitiveFailed!
30 "controlling"
32 BlockContext method!
33 whileTrue
34         ^ [self value] whileTrue: [nil]!
36 BlockContext method!
37 whileFalse
38         ^ [self value] whileFalse: [nil]!
40 BlockContext method!
41 whileTrue: aBlock
42         ^ [self value] whileTrue: [aBlock value]!
44 BlockContext method!
45 whileFalse: aBlock
46         ^ [self value] whileFalse: [aBlock value]!
48 BlockContext method!
49 repeat
50         ^ [self value. true] whileTrue!
53 "error handling"
55 BlockContext method!
56 cannotReturn: anObject
57         self error: 'cannot return object to a context that no longer exists'!