Commit 33fb5c0
authored
[cpp] Marshalling Extern Types (#11981)
* Initial class, interface, and enum separation
* fold init stuff
* Move interface header generation into its own module
* reduce some duplication
* managed interface implementation gen in its own module
* cache dependencies in the ctx
* move to gencpp with the other context data func
* remove interface code from class gen modules
* Use option for reference wildcard
* path Map
* Add back objc guard
* calculate IDs up front
* separate id lookup table
* Object IDs module to hide cache
* remap enum constructors
* more interface dead code removal
* tcpp interface type
* name, flags, and debug level in tcpp_class
* remove unused constructor var list return item
* separate out header field generation
* separate managed and native header gen functions
* move header stuff into shared function
* break class impl field gen function down
* add converted fields to tcpp_class
* Initial split for managed and native class impl
* map for haxe and native implementations
* use a list for haxe and native implementations
* use tcpp_class field variables
* field rename and meta / rtti filtering
* create fields and default functions at class transform
* use container flag
* Mark and visit using variables and fix inverted container flag
* static mark and visit use static variables list
* print reflective fields
* don't duplicate boot generation code
* don't duplicate init function generation
* don't duplicate dynamic function allocation generation
* generate properties and __Field function
* fold right member get fields
* static get fields
* shared member and static get fold functions
* static set function uses ordered fields
* member set uses organised fields
* turn abstract functions into normal functions
* cppia gen uses organised functions
* simplify ScriptNamedFunction generation
* bit of simplification of more cppia stuff
* GetFields uses organised fields
* move class retyping into retyper
* remap interface functions
* store interface hash
* store meta and rtti fields in remapped interface
* dead code removal
* tcpp interfaces only store their functions
* remapped enum fields rename for consistency
* calculate interface slots ahead of time
* remap interface arg names
* retype the interfaces stored on retyped classes
* retype tcpp_class supers
* find_class_implementation uses tcpp_class
* folds for class interface code
* other minor cleanup
* use flags in class generation to selectively generate some funcs
* retype class functions
* retype class variables
* dedicated var and dyn function boot functions
* dead code cleanup
* use bindings instead of to_list
* own implementation of of_list
* replace another to_list
* Fix pointer and struct wrapping
* fix debug level not being reset between classes
* add space after static
* remove unused variable
* ensure SourceFile paths are made absolute
* some debugging
* remove debugging prints and store class params
* don't use already mangled name when generating the getter name in reflection
* same for setters
* dont use new gc references function
* better handling of static and virtual attributes
* generate scriptable class using tcpp class function lists
* go back to type cant be null
* Container flag refers to entire inheritance tree
* allow code to easily distinguish between the different container types
* remove accidentally tracked file
* pass a context object around the retyper
* closures tracked in retyper ctx
* injection stored in retyper ctx
* declarations track by retyper ctx
* this handling moved into ctx
* gc stack handled by retyper ctx
* function return type handled by retyper ctx
* move loop goto management into retyper ctx
* consistent retyper ctx variable name
* move remaining counter into the fold
* shared string_map_of_list function
* initial value type support
* generic templates and correct return types
* Boxing of captured locals and use marshalling struct helper
* cast dynamic to a reference object
* always use a reference object instead of sometimes directly a boxed object
* cast variant to value type
* error on to value type field closures
* Use dedicated new marshal types
* Update forgotten about old cpp reference
* use _hx_vt as a prefix
* support namespace field
* omit brackets for stack constructors which have no arguments
* Fix alignment of reference declarations in closures
* default to creating boxed value types and deal with the few special cases
* some nullable support
* move auto cast into a separate file
* retype tvar to tcpp specific type
* retype tvar to simplify code and fix closure argument assignment
* promote function and lambda args if captured
* unify closure and function arg generation
* initial attempt at assigning value types a state
* some cleanup surrounding value type state assignment
* remove the two variable creation system
* implement class fields and statics
* wrap value type arguments for new non based struct value type
* cleanup of code and default values
* support enums
* treat abstract this variable as a reference and cast with a promoted type
* pointer type interop support
* ensure arrays of value types are boxed
* treat nullable value types as promoted
* default to heap construction for references
* treat extern value type fields of extern value types as refences
* avoid double :: when no namespace is specified
* another pass to catch some missing :: prefixes
* Initial enum support and comparison operator support
* correct enum casting
* handle extern value type field access and assignment correctly
* fallback to stack allocation instead of heap
* Allow creating reference state values types on the stack
* require reference semantics metadata
* Don't use the package if no namespace is provided
* add inheritance and casting tests
* support star of and dereference native functions
* Initial support for pointer types
* Add forgotten meta json change
* make sure all boxed pointer vars are allocated
* handle adding pointer stars once
* Use custom marshal pointer type for pointer references
* pointer and value specific reference cpp types
* don't retype args with dynamic
* bits of cleanup and specifying some types more
* Remove need for assignment filter, now fixed at source
* remove useless argument
* retype null promoted pointers into boxed objects
* inheritance casting with pointer types as well
* Look for include meta on extern abstracts
* don't add * to pointer type and references
* Don't use subscript operator for pointers of marshal types
* less code duplication and unwrap marshal type params
* do something for cppia
* require reference semantics on pointer types
* Don't allow constructors on pointer types
* Initial support for managed externs
* first pass of the _obj handling
* Handle static functions and variable
* Fix incorrect template handling with standard naming
* another standard naming fix
* allow static fields on extern pointers
* better static handling and helper function name consistency
* Exclude marshal types from having debug info generated
* rename marshal type enum for consistency
* add managed marshal type to cppia enum
* don't follow away marshalling enum abstracts to ensure we see meta
* More generic extern abstract following
* Add a bunch of errors
* Fix error position
* Move meta up and fill in doc comment
* try a different way of dealing with extern abstracts metadata
* actually fix include and abstract issue
* Ensure all marshal types are object returns in cppia wrapper classes
* I knew arguments were hiding in there somewhere...
* use proper marshalling state
* deal with args in the return call as well
* do same for interfaces
* forgotten bracket
* fix call dump
* rework cppia glue generation
* do similar cleanup for interfaces
* store the interface return type as a tcpp
* store interface args as retyped versions
* bloody submodules
* require value semantics instead
* Deal with generated temporaries which need to be value types
Also a quick fix for templated return types
* less string maps
* Support array access on marshaling types
* initial templated function support
* Guard against unresolved extern parameters
* reinterpreting to value types
* Fix pointer to pointer types, and add view extern
* static function template types
* Document some marshal functions
* Document marshal toString functions
* ViewExtensions convenience functions
* view compare and marshal read / write helpers
* bit of code shuffling and checking for stack only types in classes and enums
* store errors in one place
* make view stack only and use size_t for length
* Guard again promoting stack only value type in expressions
* endian specific read and write functions, plus ref to view
* view based FPHelper
* Dodge pointer vs user var fusion issue
* Change the public api to use int64 over size_t
* throw when converting big view to haxe type
* view based byte implementation
* test using hxcpp fork
* set docgen to use hxcpp fork as well
* Revert "set docgen to use hxcpp fork as well"
This reverts commit fcd3c1a.
* Revert "test using hxcpp fork"
This reverts commit 31ecd0b.1 parent 0dbb355 commit 33fb5c0
File tree
25 files changed
+2465
-881
lines changed- src-json
- src/generators
- cpp
- filters
- gen
- std
- cpp
- _std/haxe/io
- marshal
- haxe/io
25 files changed
+2465
-881
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1016 | 1043 | | |
1017 | 1044 | | |
1018 | 1045 | | |
| |||
1138 | 1165 | | |
1139 | 1166 | | |
1140 | 1167 | | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | 1168 | | |
1148 | 1169 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
44 | 54 | | |
45 | 55 | | |
46 | 56 | | |
| |||
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | | - | |
| 102 | + | |
84 | 103 | | |
85 | 104 | | |
86 | | - | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
92 | 111 | | |
93 | 112 | | |
94 | 113 | | |
95 | | - | |
96 | | - | |
| 114 | + | |
| 115 | + | |
97 | 116 | | |
98 | 117 | | |
99 | 118 | | |
| |||
104 | 123 | | |
105 | 124 | | |
106 | 125 | | |
107 | | - | |
108 | | - | |
| 126 | + | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
| |||
166 | 185 | | |
167 | 186 | | |
168 | 187 | | |
169 | | - | |
| 188 | + | |
170 | 189 | | |
171 | | - | |
| 190 | + | |
172 | 191 | | |
173 | 192 | | |
174 | 193 | | |
175 | 194 | | |
176 | 195 | | |
177 | | - | |
| 196 | + | |
178 | 197 | | |
179 | 198 | | |
180 | 199 | | |
| |||
211 | 230 | | |
212 | 231 | | |
213 | 232 | | |
| 233 | + | |
| 234 | + | |
214 | 235 | | |
215 | 236 | | |
216 | 237 | | |
| |||
240 | 261 | | |
241 | 262 | | |
242 | 263 | | |
| 264 | + | |
243 | 265 | | |
244 | 266 | | |
245 | 267 | | |
| |||
262 | 284 | | |
263 | 285 | | |
264 | 286 | | |
265 | | - | |
266 | | - | |
| 287 | + | |
| 288 | + | |
267 | 289 | | |
268 | 290 | | |
269 | 291 | | |
| |||
280 | 302 | | |
281 | 303 | | |
282 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
283 | 311 | | |
284 | 312 | | |
285 | 313 | | |
| 314 | + | |
286 | 315 | | |
287 | 316 | | |
288 | 317 | | |
| |||
0 commit comments