| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
unit)
|
|
|
|
| |
and bitCount(), add unit test (passed)
|
| |
|
|
|
|
| |
synchronized delegation; TODO: Unit tests.
|
| |
|
|
|
|
| |
ArrayIndexOutOfBoundsException
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IntBitfield
IntBitfield's 64bit bit-size is exceeding its use-case,
making it less efficient and complicated.
Bitfield offers a fast path implementation for 32 bits
as well as a int[] implementation.
TODO: 32 bit Unaligned putInt32(..) and getInt32(..),
currently throwing UnsupportedOperationException for int[] impl.
|
| |
|
| |
|
|
|
|
| |
tests
|
|
|
|
| |
Signed-off-by: Xerxes Rånby <[email protected]>
|
|
|
|
|
|
|
| |
Further refine code, see commit f6a5ac4473135bbc4bc1a5f537e060df45eb4824.
- Perform a NULL check on Buffers.newDirectByteBuffer(..) result.
- Only copy memory if capacity > 0, incl fetching direct buffer address
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
See commit e424c28f869269f5a22c22ef017230346b22847a (first patch)
Since JVMUtil_NewDirectByteBufferCopy is being called w/ 'size_t'
values, e.g. 'count * sizeof(Structure)',
we shall validate whether 'capacity' is valid, i.e. <= MAX_INT.
After validation, 'capacity' is being cast to 'jint' before
being passed to the java method.
|
|
|
|
|
|
|
|
|
|
|
| |
Prevents jlong to jint truncation
when capacity is passed from jni to java.
com.jogamp.common.nio.Buffers newDirectByteBuffer
and the underlying java.nio.ByteBuffer allocateDirect
only work with capacitys of int size.
Signed-off-by: Xerxes Rånby <[email protected]>
|
|
|
|
| |
CompatibilityType.BACKWARD_COMPATIBLE_BINARY
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
java space, incl. [native] numbers
Rewrite ConstantDefinition:
Add sub-class CNumber:
- containing integer/float values and their original qualifiers
[long, double, unsigned]
- conversion to java number
ConstantDefinition:
- holds native expression
- optionally holds CNumber representing native expression,
if [only] a number
- can compute equivalent java expression
with result type (JavaExpr)
Add static native number reg-expression
for number detection and parsing.
Add static native number to CNumber conversion methods.
+++
Retrieve full LISP tree and convert to serialized expression
to be utilized for expressions used in enumerates.
Parse enumerates, allowing const native expressions:
- Utilize ConstantDefinition
either for definite CNumber or expression
- Simply add "+1" for new default values,
if previous is an expression
|
|
|
|
|
|
| |
ArrayHashMap; Unify ctor for both impl.
Add/Enhance unit tests for both.
|
|
|
|
| |
-> v23x
|
|
|
|
|
|
|
| |
JavaConfiguration.canonicalStructFieldSymbol(..)
Patch harmonizes configuration, was also using 'structCTypeName' besides 'containingJTypeName',
but surely it makes no sense to use different type names for struct-field configurations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
regexp-constant and java-parser. (Due to PCPP -> JCPP)
Lack of parsing binary exponent floats is exposed due to using JCPP
and correct constant-definitions.
- JavaParser.g:
- Add support for hexadecimal w/ binary exponent floats
- TAB -> 4 spaces
- ConstantDefinition.java:
- Add RegExp 'fpRegexp', patternDecimalNumber:
decimal number w/ support for hexadecimal w/ binary exponent floats.
- isDecimalNumber(..): Use patternDecimalNumber
instead of try-and-error (NumberFormatException)
- patternCPPOperand: exclude patternDecimalNumber!
- JavaEmitter.java:
- Respect explicit suffix [dD] for double type.
- Drop floating point suffixes [fF]
- Test: Added tests for hexadecimal w/ binary exponent floats
|
| |
|
|
|
|
| |
Level setter for handler.
|
|
|
|
| |
JCPP submodule, build, test and doc)
|
|
|
|
| |
Cleanup / Preparation)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8
Regression of commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8
'isToolLibComplete()' returned false if dynLinkGlobal is null,
even if no tool-lib has been used. In which case dynLinkGlobal
has not been initialized and hence is always null.
'isToolLibComplete()' now takes no tool-lib into consideration!
Currently only 'OVRDynamicLibraryBundleInfo' of JOGL's 'oculusvr' binding
used this configuration within JogAmp.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
renamed original
'DelegateImplementation' is a variation of 'ManuallyImplement'.
'ManuallyImplement' emits the interface method, but suppresses
the Java and native-code implementation.
The latter shall be implemented manually by the user.
'DelegateImplementation' emits the interface method,
and the _private_ renamed Java and native-code implementation.
Both can be called from the manual user implementation,
hence delegation.
Configuration:
DelegateImplementation <ORIG-SYMBOL> <RENAMED-IMPL-SYMBOL>
I.e. delegation model shall apply to <ORIG-SYMBOL>
and the Java and native-code implementation renamed to <RENAMED-IMPL-SYMBOL>.
The user manual implementation of <ORIG-SYMBOL>
may delegate to <RENAMED-IMPL-SYMBOL>.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
manuallyImplement(AliasedSymbol) for FunctionSymbol
|
| |
|
|
|
|
| |
(Expose source location for log/error messages)
|
|
|
|
| |
instead of an NPE
|
|
|
|
|
|
|
|
|
| |
Commit 414a0146660cadd35d5ae270f7f819717e9c7374
removed the const/volatile of the local return variable.
This change also casts the function calling result
to the same - hence removing a possible c-compiler warning
of dropping qualifier const.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We cannot have the local variable holding the return type 'const'
and assign a value to it later.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Code regarding 'aliased typedef struct' is tagged in JavaEmitter and HeaderParser:
'NOTE: Struct Name Resolution (JavaEmitter, HeaderParser)'
Prefers containing cstruct typedef pointer
if available _and_ if cstruct is _not_ a typedef!
- Removed: 'HeaderParser.resolveAnonCompound(..)' no more required,
since CompoundType always sets its name!
Commit cf9f28cf249393f42d7d2835775521dfadee6b92
- JavaEmitter.emitStruct:
- Regard above 'aliased typedef struct' NOTE
- JavaEmitter.typeToJavaType:
- Regard above 'aliased typedef struct' NOTE
- ReferencedStructs
- Drop duplicate CompoundType instances of same name.
This can happen due to const/volatile and ASTLocusTag variants.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix IntType 'unsigned'
- Need to handle 'unsigned' for typedef and !typedef,
when exposing 'unsigned' for code emission.
- Consider IntType.typedefUnsigned in hash/equals
- Type: Use copy-ctor instead of Clonable enhancing strong typing.
- add 'Type clone(final ASTLocusTag newLoc)'
- Consider Type.typedefCVAttributes in hash/equals
|
| |
|
|
|
|
|
|
|
| |
when desired, not at 'log' call
Removes load to assemble the getDebugString() of Type and JavaType
when invoking log function. Note: the log may be skipped if log-level is not reached.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
newCVVariant(..), don't pass given cv-attr as typedef
Add getCName(..) for proper C-type code
- Add 'unsigned ' if not typedef and is unsigned.
- Allows removal of special case in CMethodBindingEmitter
- Fixes ProcAddressCMethodBindingEmitter typedef emission
and removes clang warnings, caused by this (many).
Fix its newCVVariant(..), don't pass given cv-attr as typedef
- Proper delegation of 'const', regression of prev. commits
|
|
|
|
| |
apidoc of getter/setter
|
|
|
|
|
| |
Enhances semantic exception in code generation
by adding the AST location of the type or function declaration.
|