Dimitar Dobrev
19cb1f5470
Added an off by default option for generating abstract implementations because the MS ABI branch does not always work.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
463864e71c
Moved the generation of a virtual table call to a separate function, for independence on back-ends.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
449777e245
Replaced a hard-coded variable name.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
dfff92bb9f
Moved the getting of the access of a class as a string to a separate function.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
da6887ff07
Fixed the allocation of internal abstract implementations, and fixed their constructors to take a pointer to the abstract type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
4cfcfa1b16
Corrected the implementation of abstract methods to properly handle classes, instance arguments and indirect return types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
9752096a4c
Fixed a bug in MS mode and added a test.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
06e69225b9
Implemented the MS branch of the abstract implementations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
a3869c95c5
Generated the proper return statements in the abstract implementations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
6d2c0eaed8
Generated internal implementations of abstract classes in a new pass.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
c93e77166c
Added a new option GenerateInternalImports that outputs "__Internal" as the library name for DllImports. Fixes #54 .
...
For more details about what it does: http://www.mono-project.com/Embedding_Mono#Exposing_C_code_to_the_CIL_universe ).
12 years ago
triton
365862419e
Fixed support for classes with trivial default constructors.
12 years ago
triton
279c9c83cf
Fixed wrapping of null pointers to actually return null CLR references.
12 years ago
Dimitar Dobrev
1fc9880be9
Generated the correct calling convention in the UnmanagedFunctionPointerAttribute of delegates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
b06f206878
Fixed the generation of static function to use the correct return type.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
0ae181b2cf
Added suffixes to generated variables to avoid conflicts.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
fbe5851237
Added UnmanagedFunctionPointerAttribute to generated delegates to avoid run-time crashes.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
e8f219c81c
Use foreach instead of explicit for.
12 years ago
triton
8c0c76ca59
Reworked operator overloading support.
12 years ago
triton
c8abdeb192
Cleaned up operator overload helpers.
12 years ago
triton
6c1e8fdbbf
When generating the internal name for a function, take into account its original function.
12 years ago
triton
df01104ab7
Fixed GetFunctionNativeIdentifier to work with function operators.
12 years ago
triton
a964df9069
Renamed HiddenStructureReturn to IndirectReturnType as it is a lot more clear.
12 years ago
Dimitar Dobrev
5208fafef7
Moved GeneratedIdentifier to the base Generator so that the former is available to all back-ends.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
cd65094792
Fixed the generation of virtual tables to use the new format of internal generated identifiers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
8312ff0a20
Removed the hard-coded "ret" variable.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
01d3779e2b
Corrected the generation of the native constructor when in a structure.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
64fb8ecbc0
Used the qualified identifier when allocating return values, to handle nested types.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
712a3904a6
Removed the "protected" modifier of setters when in a structure. Changed a generated local variable to a non-conflicting name.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
cd8d893601
Fixed the class containing context functions to be unsafe.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
9dfb30265e
Simplified GetFunctionIdentifier and GetFunctionNativeIdentifier.
12 years ago
triton
62078d449e
Simplified generated code dealing with hidden structure parameters.
12 years ago
triton
d8adef816b
Copy constructor P/Invokes are now generated in C# backend.
12 years ago
Dimitar Dobrev
978a400251
Removed the "protected" and "virtual" modifiers of "Dispose(bool)" when the containing type is a structure.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
db1c413f87
Ensure safe property and variable names.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
66ea1cd62c
Ignore any mangled declaration not found in library symbols.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
9161e58cf8
Ignored functions not found in library symbols.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
c490d25e74
Reworked property handling to check if each property getter/setter can be generated.
...
Fixes a bug where we tried to generate a setter for a const field.
12 years ago
Dimitar Dobrev
652c6e1011
Stripped "lib" from the beginning of a library name for compatibility with the .NET (that is, on Windows) way of importing DLL-s.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
58b2529df3
A simple prototype for supporting unions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
d59e46bbc3
Removed useless code.
12 years ago
triton
6130c896fc
Extracted internal parameter gathering in its own method.
12 years ago
triton
eb909c6fba
Added an "argument prefix" generator to the C# context so typemaps can add prefixes before arguments are generated.
12 years ago
triton
beead40dec
Fixed handling of field properties in C# backend.
12 years ago
triton
d4b4ec6793
Minor code cleanups.
12 years ago
triton
e5ba3ac401
Reworked C# type printing and marshaling to keep the root full type in the respective contexts.
...
This allows us to access the root type in the type maps to do proper handling of pointers. It's a bit of an hacky approach and it will be improved once there is a better more general type matching framework.
12 years ago
triton
ee3641338c
Rework class fields generation in the C# backend to be simpler and behave correctly under more situations.
12 years ago
triton
3e505737d7
Rework the handling for functions that need hidden structure parameters.
...
The main changes are:
- The original return type is now kept as the type of the generated parameter
- The return type of the function is set to void to represent what is actually happening.
This also fixes a bunch of bugs related due to using the wrong return type in some places.
12 years ago
triton
6814684072
Added virtual function overriding support to the C# backend.
12 years ago
triton
f2999bafd0
Add the 'virtual' keyword in the C# generated method signatures.
12 years ago