| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
delegates impl. / Adding ReturnsOpaque
- DelegateImplementation requires own MethodBinding for delegates impl.
The delegation name must be included within
the FunctionSymbol's aliases _only_ for implementations,
where delegation applies.
This allows all subsequent type/cfg checks to hit on AliasedSymbol!
Hence we need to create individual MethodBinding instances
for interfaces and public/private implementations.
- Adding ReturnsOpaque
Configuration:
ReturnsOpaque <Primitive Java Type> <Function Name>
This feature is necessary to achieve 'Opaque' functionality
for function's return type - instead of types in general.
- Fix AliasedSymbolImpl copy-ctor, i.e. this.name = o.name !
|
|
|
|
| |
care of that, when it logs.
|
|
|
|
|
|
|
|
| |
MethodBinding/FunctionBinding Semantics
- Clarify name semantics: name -> [interfaceName, implName, nativeName]
- JavaMethodBindingEmitter: Refine native identity via isNativeMethod + isPrivateNativeMethod
- ProcAddressEmitter: Remove hack whether we need to wrap .. use isNativeMethod + isPrivateNativeMethod
|
|
|
|
| |
argument list; forImplementingMethodCall -> isNativeMethod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for type validation w/ local generated variant (robustness)
ProcAddressCMethodBindingEmitter code regarding having the public 'ProcAddrTypedef' (from input header)
was simply broken, since it always used the local generated 'ProcAddrTypedef',
if 'ProcAddrTypedef' was forced. Hence the public 'ProcAddrTypedef' was ignored in most cases.
ProcAddressCMethodBindingEmitter's semantic changed from:
needsLocalTypedef -> hasProcAddrTypedef
New Code generation:
- always generated the local 'ProcAddrTypedef'
- if hasProcAddrTypedef, use public 'ProcAddrTypedef' for return type variable
- cast local 'ProcAddrTypedef' to public 'ProcAddrTypedef',
which renders the native compiler to validate the local and public types.
|
|
|
|
|
|
|
|
| |
ASTLocationTag log/exception formatting.
Since commit eca019cdea4017227e951d8a9eb30cb34fca4a07, we have ASTLocationTag available.
Hence use it for all logging purposes and emit a standard compiler output,
which shall be parsable by other tools.
|
|
|
|
|
|
|
|
|
|
|
| |
JavaEmitter's Function/Struct Emission
Fix ProcAddressEmitter.getFunctionPointerTypedefName():
- needs to produce function-pointer-type name w/ original name
Fix JavaEmitter's Function/Struct Emission:
- needs to create FunctionSymbol w/ original native name,
- then rename - preserving the original one.
|
|
|
|
| |
ProcAddressEmitter criteria
|
|
|
|
| |
where appropriate
|
|
|
|
|
|
|
| |
incl. ProcAddressTable
Emitted Java classes as well as optional ProcAddressTable shall
use unique generated access modifiers covering all MethodAccess cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completing commit c3054a01990e55ab35756ea23ab7d7c05f24dd37
by allowing passing compound arrays via 'call-by-value.
- Creating linear temp heap, copying NIO values into it
and passing to C function.
Copy-back if not 'const', see below.
- Respect 'const' qualifier to skip write-back of
temp heap passed to C function
- See tag: // FIXME: Compound and Compound-Arrays
for code changes and validation of completeness
- triggers for compound arrays are:
- javaType.isArrayOfCompoundTypeWrappers()
- type.isArray()
- simplified const query by c-type: FunctionEmitter.isBaseTypeConst(ctype)
+++
Tests: Added call-by-value to test1.[ch] binding test!
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
| |
PROCADDRESS_VAR_PREFIX instance, add checkAllPermissions() for reset() and initEntry(..)
- Generated ProcAddressTable's function handles are all package private
- Generated ProcAddressTable's visibility can be set via 'AccessControl' config, default: public.
- ProcAddressTable's reset() and initEntry(..) perform checkAllPermissions() 1st.
|
|
|
|
| |
pointer' _must_ be private!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'gluegen' C Structs on-the-fly (2-pass actually).
Convenient annotation processing (APT) hooked to 'javac' (1.6) via gluegen.jar META-INF
service provider 'javax.annotation.processing.Processor' -> 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor'.
Am implicit APT / JAVAC would be possible, however - to have a proper process
the unit test utilizes an explicit 2 pass run:
<!-- Annotation Processor Only - First -->
<javac destdir="${build_t.java}">
<classpath refid="junit.compile.classpath"/>
<compilerarg value="-proc:only"/>
<compilerarg value="-J-Djogamp.gluegen.structgen.debug"/>
<compilerarg value="-J-Djogamp.gluegen.structgen.output=${build_t.gen}/classes"/>
<src path="${test.base.dir}/com/jogamp/gluegen/test/junit/structgen"/>
</javac>
<!-- Javac Only - Second -->
<javac destdir="${build_t.java}">
<classpath refid="junit.compile.classpath"/>
<compilerarg value="-proc:none"/>
<src path="${test.base.dir}"/>
<src path="${build_t.gen}" />
</javac>
Original code from Michael Bien's 'superglue' git://github.com/mbien/superglue.git,
finally merged to GlueGen (as once intended).
Note: The APT javac pass requires to use 'gluegen.jar' instead of 'gluegen-rt.jar' !
The 2-pass process also alows using the runtime gluegen-rt.jar and hence ensures
clean namespace check at compilation.
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
are ambiguous - better use default generic ones to avoid confusion.
|
|
|
|
| |
allows an enhanced comments of signature (GLEmitter)
|
|
|
|
|
|
|
| |
Reversed Type relocation (commit 92d6c9dc5fa72b01703456452c60822f36c14fff)
from com.jogamp.gluegen.runtime.types back to com.jogamp.gluegen.cgram.types
Enabled MemoryLayoutType.setLayouted(), avoiding double layout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
com.jogamp.gluegen.cgram.types -> com.jogamp.gluegen.runtime.types
This is required for desired runtime memory layout.
- Split CompoundType to StructType + UnionType
- StructLayout:
- Utilizing SizeThunk alignment
- Alignment
1) Natural type alignment
2) Add Size
3) Trailing padding w/ largest element alignment
- Only perform memory layout once for type.
Status:
- Unit test passes w/ static MachineDescriptor64Bit
- FIXME static 32bit is faulty, uses 64bit size/alignment
- TODO runtime struct layout to please all platforms w/o worrying
|
|
|