forked from dolphinsmalltalk/DolphinVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTHashedCollection.h
More file actions
50 lines (34 loc) · 1.25 KB
/
STHashedCollection.h
File metadata and controls
50 lines (34 loc) · 1.25 KB
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
/******************************************************************************
File: STHashedCollection.h
Description:
VM representation of Smalltalk collection classes.
N.B. Some of 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)
The VM doesn't care about the implementation of dictionaries really, and
only represent it here because we do care about the implementation
of MethodDictionary
******************************************************************************/
#ifndef _IST_STHASHEDCOLLECTION_H_
#define _IST_STHASHEDCOLLECTION_H_
#include "STCollection.h"
class SetBase : public Collection
{
public:
Oop m_tally;
enum { TallyIndex=Collection::FixedSize, FixedSize };
};
class Set : public SetBase
{
public:
Oop m_elements[];
};
class MethodDictionary : public SetBase
{
public:
ArrayOTE* m_methods; // Offset 1 (MethodArrayIndex) - External Array of values (see inherited m_elements)
SymbolOTE* m_selectors[]; // Offset 2 (SelectorStart) - Internal array of keys
enum { MethodArrayIndex=SetBase::FixedSize, FixedSize };
};
typedef TOTE<MethodDictionary> MethodDictOTE;
#endif // EOF