forked from mathk/gst-thunder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStore.st
56 lines (38 loc) · 860 Bytes
/
Store.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Instruction subclass: Store [
Store class >> store: aType value: anObject to: anObject2 [
^ self new
store: aType value: anObject to: anObject2;
yourself
]
| type value dest |
store: aType value: anObject to: anObject2 [
type := aType.
value := anObject.
dest := anObject2
]
type [
^ type
]
value [
^ value
]
destination [
^ dest
]
writeFrom: aByteArray at: anInteger put: anObject [
^ self type writeFrom: aByteArray at: anInteger put: anObject
]
accept: aVisitor [
aVisitor visitStore: self
]
printOn: aStream [
aStream
nextPutAll: 'store ', type name.
aStream
nextPutAll: ' value '.
value printOn: aStream.
aStream
nextPutAll: ' to '.
dest printOn: aStream
]
]