Repository navigation
Commit 0d623b7
Give cpp::Function a null mPtr for generational write barriers
With HXCPP_GC_GENERATIONAL, Haxe 4.3.7 writes a barrier on _hx_v.mPtr in
the setter of every cpp.Function field, and cpp::Function had no mPtr,
so any class with such a field failed to compile. A static null mPtr
under HXCPP_GC_GENERATIONAL makes the barrier compile and do nothing;
HX_OBJ_WB skips a null value, and a function pointer is not a GC object.
HaxeFoundation/haxe#13002 stops the generator emitting the barrier, for
compilers that have it.
From HaxeFoundation/hxcpp#1425 by Tutez64.
Fixes #167
Co-authored-by: Enzo Persillet (Tutez) <enzopersillet@gmail.com>1 parent f1f5277 commit 0d623b7
3 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
429 | 435 | | |
430 | 436 | | |
431 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
0 commit comments