forked from dolphinsmalltalk/DolphinVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
STMethod.h
44 lines (31 loc) · 1.19 KB
/
STMethod.h
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
/******************************************************************************
File: STMethod.h
Description:
VM representation of method related Smalltalk classes.
N.B. The classes here defined are well known to the VM, and must not
be modified in the image. Note also that these classes may also have
a representation in the assembler modules (so see istasm.inc)
******************************************************************************/
#ifndef _IST_STMETHOD_H_
#define _IST_STMETHOD_H_
#include "STObject.h"
#include "STMethodHeader.h"
// Turn off warning about zero length arrays
#pragma warning ( disable : 4200)
class CompiledMethod //: public Object
{
public:
STMethodHeader m_header; // Must look like a small integer
BehaviorOTE* m_methodClass;
SymbolOTE* m_selector;
Oop m_source;
Oop m_byteCodes; // ByteArray of byte codes
Oop m_aLiterals[];
enum { HeaderIndex=ObjectFixedSize, MethodClassIndex, SelectorIndex, SourceIndex, ByteCodesIndex, FixedSize };
enum { LiteralStart=FixedSize };
};
typedef TOTE<CompiledMethod> MethodOTE;
// Debug dumpers
ostream& operator<<(ostream& st, const MethodOTE*);
ostream& operator<<(ostream& st, const CompiledMethod&);
#endif