Matthew Flatt
ca0418d47d
ffi/unsafe/objc: remove -A'/
+A', add `#:async-apply'
...
Another run at the problem 57516164de
was meant to solve. The
new solution just gives up when a `drawRect:' method is called
in the wrong thread, which might create refresh glitches but
avoids a deadlock in the case that the Racket thread is blocked
on the update happening in the foreign thread.
2013-04-23 13:48:15 -06:00
Matthew Flatt
57516164de
ffi/unsafe/obj: add +A' and
-A' method modes
...
On Cocoa, a view's `drawRect:' method can be called from a
heartbeat thread that animates controls. Such a call happens
rarely for a `canvas%' or other class where `drawRect:'
is overridden, but since it can happen, ensure that the
callback runs on the Racket thread.
2013-04-19 07:54:30 -06:00
Matthew Flatt
25ddfcbfb3
ffi/com: repairs for parameterized-property setting and for date values
...
Merge to v5.3.4
2013-04-16 10:02:37 -06:00
Matthew Flatt
fff88eeb92
ffi/unsafe/obj: fix use of ivar in rator position
...
Merge to v5.3.4
2013-04-12 14:58:53 -06:00
Matthew Flatt
6e40caa7e2
ffi/com: repairs, including `mysterx' compatibility
...
Restore MysterX-style handling of parameterzied properties in
`com-get-property'. It turns out that the original `com-get-property'
handles parameterized properties by allowing a list in place of a
property-name string, and that handling got lost in the re-write.
Fix the name of `com-get-active-from-from-coclass'.
Fix arity checking for optional arguments.
Closes PR 13603
Closes PR 13604
2013-03-31 11:12:45 -06:00
Matthew Flatt
99453ac506
ffi/unsafe/objc: weaken cache of method-invoke functions
...
A non-weak table meant that on Cocoa, every key press leaked a
foreign-funciton stub.
2013-03-29 08:09:57 -06:00
Matthew Flatt
81a0451849
ffi/unsafe/objc
...
Avoid crash on duplicate Objective-C class declaration.
2013-03-07 21:46:48 -07:00
Matthew Flatt
79266fcf36
ffi/com: improve handling of `type-described'
...
Use a type description when an automation-supplied type
is just 'any.
2013-01-25 05:08:46 -07:00
Matthew Flatt
0f909af765
ffi/com: add `com-get-property*'
...
Accesses a "parameterized property", which is like a method call
but for a name that is categorized as a property.
2012-12-18 06:39:59 -07:00
Matthew Flatt
5d57f6e497
ffi/unsafe/custodian: fix weak-reference problem
...
Also fix a related problem in the `math' MPFR binding (which was
masked by the `ffi/unsafe/custodian' bug).
2012-12-11 09:30:15 -07:00
Ryan Culpepper
a5c415d15a
change allocator wrapper to ignore #f results
...
Supports foreign functions that either allocate or return NULL
(translated to #f).
2012-11-21 12:56:30 -05:00
Eli Barzilay
672910f27b
Lots of bad TAB eliminations.
...
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.
If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces. For example, to see
per-line authors, use "git blame -w <file>". Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Matthew Flatt
fcfff27c31
ffi/com: implement vardesc-based dispatch
...
The `title' property of IE9 triggers the new code, which wasn't
implemented before because I didn't have an example.
2012-10-05 12:26:14 -06:00
Matthew Flatt
7c5174d54e
ffi/com: faster when calling methods on many objects of same type
...
Move the method-type cache to the type-info object, instead of
the instance.
2012-10-05 11:05:42 -06:00
Matthew Flatt
5c2b00ea78
ffi/com: try to reduce overhead on `com-invoke'
...
Also, fix a potential memory bug: the exception-record value
passed to Invoke() as synthesized by `_ptr' was GCable and
movable.
2012-10-05 11:05:41 -06:00
Matthew Flatt
3f825b8d20
ffi/com: fix reference counting
...
Don't AddRef() on "in" arguments, do AddRef() on "out"
or "in-out" arguments.
2012-09-01 09:48:35 -06:00
Matthew Flatt
f1ff9c6059
ffi/com: fix unmarshal of by-ref results
2012-09-01 09:48:35 -06:00
Matthew Flatt
eb7fd51d02
ffi/com: add `any ...' support for method arguments
...
Also allow `?' for the length of an array and suport VT_SAFEARRAY
arguments (mostly the same as VT_ARRAY).
2012-09-01 09:48:35 -06:00
Matthew Flatt
3a2b562ff4
remove debugging printf
2012-09-01 09:48:34 -06:00
Matthew Flatt
d11e58b639
ffi/unsafe/atomic: add `in-atomic-mode?'
...
The new function can be useful for debugging, at least.
2012-08-31 07:33:08 -06:00
Matthew Flatt
d953bc27ba
fix `ffi/unsafe/nsalloc'
...
Using `call-as-atomic' isn't right, because that allows an escape
via `call-as-nonatomic'. Assuming that `call-as-nonatomic' isn't
used, it seems like `call-as-atomic' should be ok, anyway, but
somehow its leads to unbalanced `end-atomic' calls.
2012-08-28 18:45:55 -06:00
Matthew Flatt
85b99de7b1
ffi/unsafe/objc: more support for loading in unsupported contexts
2012-08-27 19:47:44 -06:00
Matthew Flatt
7b49ad088a
ffi/unsafe/objc: `objc_lookUpClass' produces #f when unavailable
...
This change allows `ffi/unsafe/nsstring', for example, to at least load
on all platforms.
2012-08-27 10:29:55 -06:00
Matthew Flatt
a523270025
ffi/com: repair for DCOM instance creation
2012-08-27 08:57:01 -06:00
Matthew Flatt
088d1dadb4
add ffi/unsafe/nsalloc' and
ffi/unsafe/nsstring'
2012-08-24 15:48:58 -06:00
Matthew Flatt
0452bd791d
bytecode optimizer improvement
...
Treat unsafe functional operations (which never raise an
exception) as omitable, which means that simple `let-values'
combinations can be split into `let' bindings, etc.
2012-08-16 13:11:41 -06:00
Matthew Flatt
bb3545ddf7
ffi/unsafe/custodian: #:atexit?' ->
#:at-exit?'
2012-08-12 20:25:47 -06:00
Matthew Flatt
4e5b46405d
ffi/com: release COM objects at exit
...
Uses the new `ffi/unsafe/custodian' library.
2012-08-12 20:17:29 -06:00
Matthew Flatt
42ef79c2ad
add `ffi/unsafe/custodian'
2012-08-12 20:17:29 -06:00
Matthew Flatt
66eaa191e5
ffi/com: fix interaction with `racket/gui'
...
... and other things that use the Windows message
queue by not providing GCable arguments to
IDispatch::Invoke().
Merge to v5.3
2012-08-02 19:20:36 -06:00
Matthew Flatt
38ce4997a9
ffi/com: fix potential interaction of finalization and custodians
...
Includes new `#:manage?' optional argument to `make-com-object'
and better management of internally created objects.
Merge to v5.3
2012-08-02 16:29:03 -06:00
Matthew Flatt
572252daec
ffi/com: thread safety
...
Protect internal data structures via atomic mode.
Merge to v5.3
2012-08-02 16:29:02 -06:00
Matthew Flatt
286efface0
ffi/com: adjust order in object release
...
Release type descriptors before type infos, and release type
infos before objects. (This reordering shouldn't matter if
referencing counting does its usual job, but maybe it's better
to use the obvious order.)
Merge to v5.3
2012-08-02 08:01:00 -06:00
Matthew Flatt
38167dd4fa
ffi/com: remove stray quote
...
Merge to v5.3
2012-08-01 09:34:11 -06:00
Matthew Flatt
9b1db14328
ffi/com: fix clean-up of type descriptors
...
Merge to v5.3
2012-07-29 09:46:30 -06:00
Matthew Flatt
cd90510f07
ffi/com: AddRef on IUnknown arguments to COM methods
...
Merge to v5.3
2012-07-23 14:35:27 -05:00
Matthew Flatt
94498465e6
ffi/com: fix another instance of the `cast' bug
...
Overlooked it during the previous repair; this repair merges
the two formerly broken sites.
2012-07-19 20:20:33 -05:00
Matthew Flatt
c86ee5b6e2
ffi/com: fix an internal cast
...
Merge to v5.3
2012-07-19 19:02:54 -06:00
Matthew Flatt
1e115e2963
ffi/com: repairs for '(box any)
2012-06-26 11:00:11 -06:00
Matthew Flatt
90b5aad56b
ffi/com: fixes for IUnknown and enumeration values
2012-06-25 17:30:03 -06:00
Matthew Flatt
a04ba8aef3
ffi/com: allow a `com-object' as an 'iunknown argument
2012-06-22 09:47:59 +08:00
Matthew Flatt
fbb6a294f3
local-expand' allows a stop list to have only
module*'
...
That is, when the sto plist contains only `module*', core
forms are not implicitly added to the stop list.
2012-06-08 16:08:55 +08:00
Matthew Flatt
09cb2a348f
ffi/com: add 'variant type description
...
Used to prevent extra array dimensions and instead construct nested
arrays.
2012-05-26 06:38:02 -06:00
Matthew Flatt
ffea2b2c02
ffi/unsafe/com: infer 'any type for `com-omit'
2012-04-25 00:11:57 -06:00
Matthew Flatt
38e628be80
ffi/com: add support for type descriptions on values
2012-04-16 08:47:13 -06:00
Matthew Flatt
c695727aec
ffi/unsafe/com: fix arrays of 'any
2012-04-11 19:12:32 -06:00
Matthew Flatt
89307edbce
ffi/unsafe/com: avoid inclusion of no-error result code in error messages
...
Merge to 5.3
2012-04-11 17:55:12 -06:00
Matthew Flatt
bcb22a3adb
ffi/unsafe/com: repair for optional `any' arguments
...
Merge to 5.3
2012-04-11 17:49:08 -06:00
Matthew Flatt
e62f812941
ffi/com: fix another GC problem, this time related to custodians
2012-04-04 07:16:50 -06:00
Matthew Flatt
522a92970e
ffi/com: fix GC issue related to COM events
2012-04-04 07:00:25 -06:00