-
Notifications
You must be signed in to change notification settings - Fork 64
/
UnicornRegisterDescriptor.class.st
75 lines (56 loc) · 1.29 KB
/
UnicornRegisterDescriptor.class.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Class {
#name : #UnicornRegisterDescriptor,
#superclass : #Object,
#instVars : [
'simulator',
'name',
'alias'
],
#category : #'VMMakerTests-Unicorn'
}
{ #category : #accessing }
UnicornRegisterDescriptor >> alias [
^ alias
]
{ #category : #accessing }
UnicornRegisterDescriptor >> alias: aString [
alias := aString
]
{ #category : #actions }
UnicornRegisterDescriptor >> copyValueToClipboard [
Clipboard clipboardText: self value hex
]
{ #category : #actions }
UnicornRegisterDescriptor >> inspectValue [
self value inspect
]
{ #category : #accessing }
UnicornRegisterDescriptor >> name [
^ name
]
{ #category : #accessing }
UnicornRegisterDescriptor >> name: anObject [
name := anObject
]
{ #category : #accessing }
UnicornRegisterDescriptor >> printOn: aStream [
(self value isKindOf: Boolean )
ifTrue: [ ^ aStream print: self value ].
aStream print: self value hex
]
{ #category : #actions }
UnicornRegisterDescriptor >> printValue [
simulator memory interpreter longPrintOop: self value
]
{ #category : #accessing }
UnicornRegisterDescriptor >> simulator [
^ simulator
]
{ #category : #accessing }
UnicornRegisterDescriptor >> simulator: anObject [
simulator := anObject
]
{ #category : #accessing }
UnicornRegisterDescriptor >> value [
^ simulator perform: name
]