summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/procaddress
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-08-08 21:46:55 +0200
committerMichael Bien <[email protected]>2009-08-08 21:46:55 +0200
commit889b9574958b04988ab3acbabab109745fbc379a (patch)
tree5f3485268de0f59f113c9d524561fc49b50ad75f /src/java/com/sun/gluegen/procaddress
parenta07c223b8dbde8f81886b7b2bf602e26ab9531b3 (diff)
parent5f8e46324f245c99080d2c340cd4fb2ec9c4fa8d (diff)
Merge branch 'master' of ssh://[email protected]/gluegen~gluegen-git
Diffstat (limited to 'src/java/com/sun/gluegen/procaddress')
-rwxr-xr-xsrc/java/com/sun/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java8
-rwxr-xr-xsrc/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java27
2 files changed, 13 insertions, 22 deletions
diff --git a/src/java/com/sun/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java b/src/java/com/sun/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
index b7aadc9..54263a5 100755
--- a/src/java/com/sun/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java
@@ -66,14 +66,6 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter {
return super.getName();
}
}
-
- public String getRenamedMethodName() {
- if (callThroughProcAddress) {
- return ProcAddressEmitter.WRAP_PREFIX + super.getRenamedMethodName();
- } else {
- return super.getRenamedMethodName();
- }
- }
},
methodToWrap.getDefaultOutput(),
methodToWrap.getJavaPackageName(),
diff --git a/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java b/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java
index 8f849ac..871dc5e 100755
--- a/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java
+++ b/src/java/com/sun/gluegen/procaddress/ProcAddressEmitter.java
@@ -102,23 +102,21 @@ public class ProcAddressEmitter extends JavaEmitter
return new ProcAddressConfiguration();
}
- protected List generateMethodBindingEmitters(FunctionSymbol sym) throws Exception
- {
- return generateMethodBindingEmittersImpl(sym);
+ protected List generateMethodBindingEmitters(HashSet/*<MethodBinding>*/ methodBindingSet, FunctionSymbol sym) throws Exception {
+ return generateMethodBindingEmittersImpl(methodBindingSet, sym);
}
protected boolean needsModifiedEmitters(FunctionSymbol sym) {
if (!needsProcAddressWrapper(sym) ||
- getConfig().isUnimplemented(sym.getName())) {
+ getConfig().isUnimplemented(getAliasedSymName(sym))) {
return false;
}
return true;
}
- private List generateMethodBindingEmittersImpl(FunctionSymbol sym) throws Exception
- {
- List defaultEmitters = super.generateMethodBindingEmitters(sym);
+ private List generateMethodBindingEmittersImpl(HashSet/*<MethodBinding>*/ methodBindingSet, FunctionSymbol sym) throws Exception {
+ List defaultEmitters = super.generateMethodBindingEmitters(methodBindingSet, sym);
// if the superclass didn't generate any bindings for the symbol, let's
// honor that (for example, the superclass might have caught an Ignore
@@ -140,7 +138,7 @@ public class ProcAddressEmitter extends JavaEmitter
if (needsProcAddressWrapper(sym)) {
if (getProcAddressConfig().emitProcAddressTable()) {
// emit an entry in the GL proc address table for this method.
- emitProcAddressTableEntryForSymbol(sym);
+ emitProcAddressTableEntryForString(getAliasedSymName(sym));
}
}
@@ -254,9 +252,15 @@ public class ProcAddressEmitter extends JavaEmitter
emitters.add(res);
}
+ private String getAliasedSymName(FunctionSymbol sym) {
+ String symName = getConfig().getJavaSymbolRename(sym.getName());
+ if(null==symName) symName=sym.getName();
+ return symName;
+ }
+
protected boolean needsProcAddressWrapper(FunctionSymbol sym)
{
- String symName = sym.getName();
+ String symName = getAliasedSymName(sym);
ProcAddressConfiguration config = getProcAddressConfig();
@@ -378,11 +382,6 @@ public class ProcAddressEmitter extends JavaEmitter
w.close();
}
- protected void emitProcAddressTableEntryForSymbol(FunctionSymbol cFunc)
- {
- emitProcAddressTableEntryForString(cFunc.getName());
- }
-
protected void emitProcAddressTableEntryForString(String str)
{
// Deal gracefully with forced proc address generation in the face