-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
104 lines (92 loc) · 3.58 KB
/
TODO
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<http://code.google.com/p/mobjc/w/list>
https://home.comcast.net/~jesse98/public/mobjc_docs/namespaces.html
set args /Library/Frameworks/Mono.framework/Versions/1.9/lib/mono/2.0/nunit-console.exe -fixture=BaseClassTests -nologo bin/tests.dll
* Launcher script needs to quote the $@
* Would be nice if the launcher script worked when run without write access. Maybe could
add a default mono link?
* Do we still need --desktop?
* Experiment with using the native GC:
- can't load a -fobjc-gc-only dll into a non-gc app
- can load a -fobjc-gc dll into a non-gc app (like mono), but don't think it will use the gc
but maybe it will if objc_startCollectorThread is called (see the cocoa fundamentals)
- note that when testing this mobjc should be uninstalled or mono will load the
installed lib
- compile the native glue with -fobjc-gc-only
- provide Register and Unregister methods that take an id and stick it in a collection
- will need a mutex on native side
- get rid of auto pools (use a define to toggle these on and off)
- get rid of NSObject::Create
- get rid of the doRetain ctors
- get rid of retaincount
- might want to expose objc_startCollectorThread (see runtime section in http://developer.apple.com/mac/library/documentation/cocoa/conceptual/GarbageCollection/Articles/gcAPI.html)
- nsobject should probably not be disposable
- look at memory unit tests
- look at app memory test
static NSCountedSet* s_objects = nil;
static NSLock* s_lock = nil;
void InitGC()
{
s_objects = [[NSCountedSet alloc] initWithCapacity:100];
s_lock = [[NSLock alloc] init];
}
void RegisterObject(id object)
{
[s_lock lock];
[s_objects addObject:object];
[s_lock unlock];
}
void UnregisterObject(id object)
{
[s_lock lock];
[s_objects removeObject:object];
[s_lock unlock];
}
* Need to always generate response files.
* Should be able to call arbitrary .net code from native code.
* Might be nice to have some Smokey rules:
- if managed class inherits from a managed class, attr and c# classes have to have
the same base
- subclasses need ExportClassAttribute if a base class has it
* Need to do something with glue packaging. Ideally a universal binary with ppc, intel,
and 64-bit targets. If not that, then cross compile libs and have instal.sh install the
right one.
* Think about adding a retain mode.
public enum RetainMode
{
Normal, // NSObject doesn't do any implicit retains
Exports, // if the NSObject's actual type is decorated with ExportClassAttribute then the NSObject ctor does a retain
All // the NSObject always does a retain
}
* Build a universal glue lib?
* Release checklist:
- search for TODO (everywhere)
- run gendarme
- make sure tests work in debug
- make sure app works in debug
- make RELEASE=1 check
- make RELEASE=1 run-app
- make sure app memory test is OK
- review tar target
- make sure everything is checked in
- use svn log -r 1:HEAD > CHANGE_LOG
- update CHANGES file
- update version number
- remove build_num file
- build debug
- install
- upload new html docs
- update README and wiki
- upload a new version to googlecode
- send an announcement
- make sure everything is checked in
* Limitations:
- 64-bit is doable but not there yet (mono doesn't support it either tho)
- can't export static methods
- can't add methods to an instance (as opposed to a class)
- thread safety needs to be tested
- native subclass of a managed class isn't tested
Marshal.StringToHGlobalAuto(str);
GCHandle.Alloc(array, GCHandleType.Pinned);
Marshal.StructureToPtr(struct, buffer, false);
Marshal.PtrToStringAuto((IntPtr) p)
NSObject.h