-
Notifications
You must be signed in to change notification settings - Fork 23
/
STObject.h
68 lines (53 loc) · 1.23 KB
/
STObject.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/******************************************************************************
File: STObject.h
Description:
VM representation of base Object class.
As of 3.10 VM, class moved to OTE
******************************************************************************/
#pragma once
enum { ObjectFixedSize = 0 };
enum { ObjectHeaderSize = 0 };
enum { ObjectByteSize = ObjectHeaderSize*sizeof(MWORD) };
// Turn off warning about zero length arrays
#pragma warning ( disable : 4200)
namespace ST
{
class Object
{
};
// Not real Smalltalk classes
class VariantByteObject : public Object
{
public:
uint8_t m_fields[];
};
class VariantWordObject : public Object
{
public:
uint16_t m_fields[];
};
class VariantQuadObject : public Object
{
public:
uint32_t m_fields[];
};
class VariantCharObject : public Object
{
public:
char m_characters[];
};
// Useful for accessing an object by index
class VariantObject : public Object
{
public:
Oop m_fields[];
};
}
typedef ST::Object* POBJECT;
#if defined (VM)
#include "ote.h"
typedef TOTE<ST::VariantByteObject> BytesOTE;
typedef TOTE<ST::VariantWordObject> WordsOTE;
typedef TOTE<ST::VariantQuadObject> QuadsOTE;
typedef TOTE<ST::VariantObject> PointersOTE;
#endif