forked from adobe-flash/avmplus
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDomainClass.h
65 lines (51 loc) · 1.89 KB
/
DomainClass.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
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
/* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __avmshell_DomainClass__
#define __avmshell_DomainClass__
#ifndef AVMSHELL_BUILD
#error "This file is only for use with avmshell"
#endif
namespace avmplus
{
class GC_AS3_EXACT(DomainObject, ScriptObject)
{
friend class DomainClass;
protected:
DomainObject(VTable *vtable, ScriptObject *delegate);
public:
void init(DomainObject *base);
Atom loadBytes(ByteArrayObject* bytes, uint32_t swfVersion);
ClassClosure* getClass(Stringp name);
// AS3 declaration requires these are ByteArrayObject
ByteArrayObject* get_domainMemory() const;
void set_domainMemory(ByteArrayObject* mem);
private:
ScriptObject* finddef(const Multiname& multiname, DomainEnv* domainEnv);
// ------------------------ DATA SECTION BEGIN
GC_DATA_BEGIN(DomainObject)
public:
GCMember<DomainEnv> GC_POINTER(domainEnv);
GCMember<Toplevel> GC_POINTER(domainToplevel);
GC_DATA_END(DomainObject)
private:
DECLARE_SLOTS_DomainObject;
// ------------------------ DATA SECTION END
};
class GC_AS3_EXACT(DomainClass, ClassClosure)
{
protected:
DomainClass(VTable* cvtable);
public:
DomainObject* get_currentDomain();
int get_MIN_DOMAIN_MEMORY_LENGTH();
// ------------------------ DATA SECTION BEGIN
GC_NO_DATA(DomainClass)
private:
DECLARE_SLOTS_DomainClass;
// ------------------------ DATA SECTION END
};
}
#endif /* __avmshell_DomainClass__ */