-
Notifications
You must be signed in to change notification settings - Fork 65
/
CogClass.class.st
40 lines (37 loc) · 1.27 KB
/
CogClass.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
"
I am a place to hang various pieces of translation support.
"
Class {
#name : #CogClass,
#superclass : #VMClass,
#category : #'VMMaker-JIT'
}
{ #category : #'translation support' }
CogClass >> cCoerceSimple: value to: cTypeString [
"Type coercion for translation and simulation.
For simulation answer a suitable surrogate for the struct types"
<doNotGenerate>
^ cTypeString caseOf: {
([ #'unsigned long' ] -> [ value ]).
([ #'unsigned int' ] -> [ value ]).
([ #'unsigned short' ] -> [ value ]).
([ #sqInt ] -> [ value ]).
([ #sqIntptr_t ] -> [ value ]).
([ #usqIntptr_t ] -> [ value ]).
([ #usqInt ] -> [ value ]).
([ #sqLong ] -> [ value ]).
([ #usqLong ] -> [ value ]).
([ #'AbstractInstruction *' ] -> [ value ]).
([ #'SpurSegmentInfo *' ] -> [ value ]).
([ #'BytecodeFixup *' ] -> [ value ]).
([ #'CogMethod *' ] -> [ value ]).
([ #'char *' ] -> [ value ]).
([ #'sqInt *' ] -> [ value ]).
([ #'void *' ] -> [ value ]).
([ #void ] -> [ value ]).
([ #'void (*)()' ] -> [ value ]).
([ #'void (*)(void)' ] -> [ value ]).
([ #'unsigned long (*)(void)' ] -> [ value ]).
([ #'void (*)(unsigned long,unsigned long)' ] -> [ value ]).
([ #'usqIntptr_t (*)(void)' ] -> [ value ]) }
]