diff options
author | Kenneth Russel <[email protected]> | 2006-01-01 22:51:07 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-01 22:51:07 +0000 |
commit | 875a3de8f54704604d006badf0f0747347319025 (patch) | |
tree | 904c468f43c9c818c57bb0f7f17608066172cf29 /src/classes/com/sun/gluegen/cgram | |
parent | 0747964f0b88d0c9da9c38bf9eff96eb6561f0c1 (diff) |
Fixed more problems related to recent restructuring of glue code
generation to support simultaneous 32- and 64-bit ports. Now uses
size() (on Java side) and sizeof (on C side) when creating direct
Buffers for struct accessors rather than passing MachineDescription
down to JavaMethodBindingEmitter and CMethodBindingEmitter. Now uses
64-bit MachineDescription when sizing outgoing arguments and return
types for bound methods.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@506 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/gluegen/cgram')
3 files changed, 7 insertions, 3 deletions
diff --git a/src/classes/com/sun/gluegen/cgram/types/MachineDescription.java b/src/classes/com/sun/gluegen/cgram/types/MachineDescription.java index 41923979b..b3aaf53aa 100644 --- a/src/classes/com/sun/gluegen/cgram/types/MachineDescription.java +++ b/src/classes/com/sun/gluegen/cgram/types/MachineDescription.java @@ -48,6 +48,7 @@ public class MachineDescription { private int floatSizeInBytes; private int doubleSizeInBytes; private int pointerSizeInBytes; + private int structAlignmentInBytes; public MachineDescription(int charSizeInBytes, int shortSizeInBytes, @@ -56,7 +57,8 @@ public class MachineDescription { int int64SizeInBytes, int floatSizeInBytes, int doubleSizeInBytes, - int pointerSizeInBytes) { + int pointerSizeInBytes, + int structAlignmentInBytes) { this.charSizeInBytes = charSizeInBytes; this.shortSizeInBytes = shortSizeInBytes; this.intSizeInBytes = intSizeInBytes; @@ -65,6 +67,7 @@ public class MachineDescription { this.floatSizeInBytes = floatSizeInBytes; this.doubleSizeInBytes = doubleSizeInBytes; this.pointerSizeInBytes = pointerSizeInBytes; + this.structAlignmentInBytes = structAlignmentInBytes; } public int charSizeInBytes() { return charSizeInBytes; } @@ -75,4 +78,5 @@ public class MachineDescription { public int floatSizeInBytes() { return floatSizeInBytes; } public int doubleSizeInBytes() { return doubleSizeInBytes; } public int pointerSizeInBytes() { return pointerSizeInBytes; } + public int structAlignmentInBytes() { return structAlignmentInBytes; } } diff --git a/src/classes/com/sun/gluegen/cgram/types/MachineDescription32Bit.java b/src/classes/com/sun/gluegen/cgram/types/MachineDescription32Bit.java index 1dbbb700c..7b8f12d92 100644 --- a/src/classes/com/sun/gluegen/cgram/types/MachineDescription32Bit.java +++ b/src/classes/com/sun/gluegen/cgram/types/MachineDescription32Bit.java @@ -41,6 +41,6 @@ package com.sun.gluegen.cgram.types; public class MachineDescription32Bit extends MachineDescription { public MachineDescription32Bit() { - super(1, 2, 4, 4, 8, 4, 8, 4); + super(1, 2, 4, 4, 8, 4, 8, 4, 8); } } diff --git a/src/classes/com/sun/gluegen/cgram/types/MachineDescription64Bit.java b/src/classes/com/sun/gluegen/cgram/types/MachineDescription64Bit.java index 00d581266..10363998f 100644 --- a/src/classes/com/sun/gluegen/cgram/types/MachineDescription64Bit.java +++ b/src/classes/com/sun/gluegen/cgram/types/MachineDescription64Bit.java @@ -41,6 +41,6 @@ package com.sun.gluegen.cgram.types; public class MachineDescription64Bit extends MachineDescription { public MachineDescription64Bit() { - super(1, 2, 4, 8, 8, 4, 8, 8); + super(1, 2, 4, 8, 8, 4, 8, 8, 16); } } |