Bug 1153

Summary: GlueGen: Support [const] [native] expressions and conversion to java space
Product: [JogAmp] Gluegen Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: 2.3.2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
gluegen c156343fec33ceea7f238b9766a9f4985fb92687 gluegen c6d5ee30e023d030697f14ae2c444ce7a5542e94 jcpp eddcad41a1dc2658747235b307bfd4ffd2c27bd3 gluegen 29da0b8bc787767d68cabbc885bad1d80357e1e7 jogl 5deabf720f1101b39376cb211c39f6f0c3474153 jogl dc32ed4f045cbdfdc70fe8572564cd8e3b5eb33b
Workaround: ---
Bug Depends on:    
Bug Blocks: 1151    

Description Sven Gothel 2015-04-01 15:50:15 CEST
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
Comment 1 Sven Gothel 2015-04-01 15:58:03 CEST
gluegen c156343fec33ceea7f238b9766a9f4985fb92687
  - Add ArrayHashMap; Use 'supportNullValue' 
    optimizing ArrayHashSet and ArrayHashMap; 
  - Unify ctor for both impl.
  - Add/Enhance unit tests for both.
gluegen c6d5ee30e023d030697f14ae2c444ce7a5542e94
  - As described, comment 0
  - Preserve order of all constants and functions.
    - Const order is essential to avoid forward definition errors,
      i.e. used before defined (in expressions).
    - Function order might be more desired to compare 
      API header w/ java code.

jcpp    eddcad41a1dc2658747235b307bfd4ffd2c27bd3
  - Adopt to GlueGen change

gluegen 29da0b8bc787767d68cabbc885bad1d80357e1e7
  - Bump JCPP (above)
Comment 2 Sven Gothel 2015-04-01 16:03:03 CEST
(In reply to comment #1)
> gluegen c6d5ee30e023d030697f14ae2c444ce7a5542e94
>   - As described, comment 0
>   - Preserve order of all constants and functions.
>     - Const order is essential to avoid forward definition errors,
>       i.e. used before defined (in expressions).
>     - Function order might be more desired to compare 
>       API header w/ java code.
Further:
    - Alias enum typedef's:
      Alias '_a' -> 'A' for 'typedef enum _a { } A;' in-place
Comment 3 Sven Gothel 2015-04-01 16:06:44 CEST
jogl    5deabf720f1101b39376cb211c39f6f0c3474153
  Adopt to ArrayHashSet change, don't use deprecated ctor 
  (gluegen commit c156343fec33ceea7f238b9766a9f4985fb92687)

jogl    dc32ed4f045cbdfdc70fe8572564cd8e3b5eb33b
  GLEmitter: Only dump extra comment if w/o enum-name or w/o extension
  Since GlueGen handles enum typedef's properly, 
  this relation to the enum-name is already printed.