Dimitar Dobrev
6380e5d7ea
Called Marshal.FreeHGlobal only if the instance was created by Marshal.AllocHGlobal.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
6f8c942b0a
Adjusted pointers when calling functions from secondary or non-dynamic bases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
7d66303ed1
Extracted a constant and deleted a no longer used method.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
81e6ba5ea8
Ensured managed v-tables remain with no empty entries.
...
This doesn't fix any bug that I know of.
However, the patching was obviously wrong for v-tables with repetitive function pointers.
Their managed counterparts ended up with "holes" where the repetions were.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
324e241c25
Fixed the internal abstract impls with default params of a pointer type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
54e8a16fd1
Reverted the representation of Booleans as managed Booleans except in internal structs.
...
Managed booleans are more CPU-efficient than bytes, and some problems with code generation are fixed.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
a20e3aca91
Properly set virtual tables up in the internal ctor by pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
287ad2394d
Properly printed complex comments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
4cc60bed2a
Fixed the pass for multiple inheritance to keep original functions.
...
This would be useful in many situations where the original function is required, for example when looking for indices in v-tables.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
912248b5da
Skipped patching of v-tables for objects not put in the native-managed map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
87845ad51d
Fixed a regression with abstract types with the same property as a base type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
b9e3efbf0c
Removed the option for copy ctors and prevented usage of ignored ones.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
bb59ca17fb
Fixed a crash when a C++ ctor indirectly calls a virtual function on the object being constructed.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
55bc99bc3f
Fixed a bug when overriding a function located in a dependency.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
62a0857613
Copied all entries to the patched Itanium v-table.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
784a939c66
Ensured generated overridden properties are as simple as possible.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
dcb70b6ad0
Removed the now useless internal declarations for virtual non-operators.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
4e981a80e6
Fixed a bug when wrapping virtual properties overridden in indirect derived types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
dc95c8d8c8
Fixed the bodies of functions overriding indirect virtuals.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
b15735d539
Generated GetHashCode in the C# front-end.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
4584ae7485
Fixed warnings in the generated code by properly using "new".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
fa0e66687d
Fixed abstract implementations and bodies of overrides to properly handle abstract overrides.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
ae805eca31
Simplified overrides by just calling the base - all goes through the v-table anyway.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
ff76962bf9
Fixed a potential naming conflict.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
1b5de25f8c
Removed implementations for ignored abstract types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
triton
8a510e4ac9
Workaround abstract implementations being generated even if there's no valid base class.
10 years ago
triton
d06c42129f
Fixed GenerateClassFields to only process actual base classes.
...
More specifically, TemplateParameterType was also coming up here.
Rather than checking for specific dependent types just check that we have a base class.
10 years ago
Dimitar Dobrev
f848f62180
Some refactoring to remove redundant members and casts.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
80643e0457
Added support for parameters with type a reference to a fixed-size array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
5dca339ff2
Forbid the disposal of unowned objects and simplified the generated code.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
d769a81ade
Called virtual destructors through the virtual table.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
cc97558bbe
Replaced the redundant references for v-tables with the native-managed map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
235c556374
Simplified the generated code for v-tables.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
72f062c56f
Reused the virtual call for calls to abstract impls.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
289720d31b
Only hooked the v-tables of wrapped C++ pointers when they have virtual dtors.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
7f8fa9100c
Removed references for v-tables upon destruction of the object.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
f33ae8b801
Revert "Factor the saving of original vtables pointers to its method."
...
This reverts commit 03f610f528
.
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
triton
89cdf8b997
Reworked per-Abi vtable code to correctly handle all platforms.
10 years ago
triton
03f610f528
Factor the saving of original vtables pointers to its method.
10 years ago
triton
e2b74a7697
Implemented virtual function call handling.
...
Closes issues #402 , #496 .
Thanks to Abhinav for his pull which I based this work on.
10 years ago
triton
bc3ace2205
Rework __OriginalVTables to be unique per instance.
...
We need to take into account that the original vtables might differ per object instance.
10 years ago
triton
d4cd37ec11
Rename the VTable field names in the generated code to be more specific.
10 years ago
triton
24eb7cf825
Fixed VTables.GetVTableIndex to work with base/derived overrides.
10 years ago
Dimitar Dobrev
007fb4b57c
Removed parameters wrapped in v-table delegate hooks from the native to managed map.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
triton
0108a5a23e
Invert the if condition to reduce nesting.
10 years ago
Dimitar Dobrev
c4a5cdb893
Fixed the v-table hooks for functions with indirect return params.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
c28b8db3e5
Removed the TODO-s about marshalling char and bool because those are not bugs.
...
See https://msdn.microsoft.com/en-us/library/ef4c3t39.aspx and https://msdn.microsoft.com/en-us/library/75dwhxf7.aspx .
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
91b3a5aef1
Worked around an MS .NET bug which prevents marshalling bools in certain cases.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
cdd6e0eaa8
Restored a deleted piece that helps generate simpler code.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago
Dimitar Dobrev
170e0a5934
Removed char from internal fields because marshalling is broken.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
10 years ago