Commit 617aed2
Marshalling Types (#1189)
* Add marshal header for value type interop
* finalise boxed objects if the type has a destructor
* works with static cast
* add value type tests
* move more conversion functions to reference class
* forward declare everything to avoid order issues
* ValueType construction from boxed pointer
* ValueType no longer inherits from struct
* marshal reference interop with existing pointer types
* Fix trying to dereference a null pointer when creating a boxed object from a reference
* add compare traits specialisation for reference null check
* consistent null checking and throwing
* raise exceptions when value types are assigned null
* reference equality operations
* remove no return
* remove some un-needed constructors
* Make constructors use more templates and use reinterpret cast
* use tagged dispatch
* support pointer types being held in value type helper
* Add new marshal pointer type
* rename marshal types in prep for more pointer stuff
* support reinterpreting value type references
* seemingly working pointer marshalling types
* better null checking with pointer references
* add marshalling tests
* Add pointer collection tests
* Move enums into header files
* test abstract around pointers
* Pointer type changes
* add pointer reference to pointer casting
* add null test to pointer access
* add test for vector of value types
* add tests showing weird null behaviour
* move marshalling tests to existing native tests
* initial managed extern tests
* managed extern local tests for two different naming schemes
* reduce test duplication
* Add tests for classes holding managed externs
* change tests so that static functions are tested
* un-private point
* let enum abstract include meta handle it
* remove analyser meta
* Fix test related to recent pointer changes
* Add pointer ctor overload
* view marshalling type
* Change to value semantics
* Add view tests
* Update some tests
* String marshalling functions
* Marshalling tests
* view based string creation and support char16_t in various hxcpp types
* Marshalling string tests
* const ref a bit
* Don't use byte size in copyTo comparison check
* view extension tests
* Split across multiple headers
* typed read and write helper functions
* Add compare function
* cstring to view conversion function, and allow null pointers
* Add view to pointer conversions
* View length is now size_t
* Add endian specific read and write marshal functions
* Add OOB checks
* change the public api to use int64_t over size_t
* Fix string from view conversions to properly use the view length
* Add OOB exception tests
* bound check read and write
* make sure view write index is int64_t
* add tests for exceptions when reading or writing to small views
* guard including new marshal headers
* fix dodgy conditional
---------
Co-authored-by: Aidan Lee <aidan.lee@evcam.com>1 parent 646aaee commit 617aed2
File tree
73 files changed
+6089
-6
lines changed- include
- cpp
- marshal
- hx
- src
- test
- native
- tests
- marshalling
- classes
- enums
- managed
- native
- pointers
- view
- toolchain
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
73 files changed
+6089
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| 236 | + | |
232 | 237 | | |
233 | 238 | | |
234 | 239 | | |
| |||
270 | 275 | | |
271 | 276 | | |
272 | 277 | | |
| 278 | + | |
| 279 | + | |
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
| |||
457 | 464 | | |
458 | 465 | | |
459 | 466 | | |
| 467 | + | |
460 | 468 | | |
461 | 469 | | |
462 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| |||
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
509 | 513 | | |
510 | 514 | | |
511 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
512 | 521 | | |
513 | 522 | | |
514 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| 283 | + | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
| |||
604 | 607 | | |
605 | 608 | | |
606 | 609 | | |
| 610 | + | |
607 | 611 | | |
608 | 612 | | |
609 | 613 | | |
| |||
633 | 637 | | |
634 | 638 | | |
635 | 639 | | |
| 640 | + | |
| 641 | + | |
636 | 642 | | |
637 | 643 | | |
638 | 644 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments