Commit 3c50e5f2 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Remove uneeded generation of the sr local variable (suggested by Philippe.)

parent 382318b1
......@@ -3,8 +3,6 @@ mixins/
intent) from the scaPrimitive membrane (suggested by Philippe)
opt/oo/
* ServiceReferenceClassGenerator: generate sr only when needed (suggested by
Philippe)
* ServiceReferenceClassGenerator and CallableReferenceClassGenerator: fix buggy
generated code when the conv local variable is not defined. This is due to the
fact that the interface is not conversational but that one wants yet to end
......
......@@ -39,7 +39,6 @@ import org.objectweb.fractal.juliac.ucf.UnifiedMethod;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.MethodSourceCodeVisitor;
import org.osoa.sca.CallableReference;
import org.osoa.sca.ServiceReference;
import org.osoa.sca.annotations.Callback;
import org.osoa.sca.annotations.Conversational;
import org.osoa.sca.annotations.EndsConversation;
......@@ -189,7 +188,6 @@ extends AbstractProxyClassGenerator {
// Retrieve the delegate
mv.visitln(" final "+signature+" impl = getService();");
mv.visitln(" final "+ServiceReference.class.getName()+"<"+signature+"> sr = this;");
// OneWay method
if( oneWayMeth != null ) {
......@@ -227,7 +225,7 @@ extends AbstractProxyClassGenerator {
mv.visit (" "+CallableReference.class.getName()+"<"+callbackClass.getName()+"> cb = ");
mv.visit ("new "+cbcrclname+"<"+callbackClass.getName()+">(");
mv.visitln(callbackClass.getName()+".class,cbci);");
mv.visitln(" sr.setCallback(cb);");
mv.visitln(" setCallback(cb);");
mv.visitln(" "+CallbackManager.class.getName()+" cbm = "+CallbackManager.class.getName()+".get();");
mv.visitln(" cbm.push(cb);");
}
......@@ -252,7 +250,7 @@ extends AbstractProxyClassGenerator {
}
if( callbackClass != Void.class ) {
mv.visitln(" cbm.pop();");
mv.visitln(" sr.setCallback(null);");
mv.visitln(" setCallback(null);");
}
if( oneWayMeth != null ) {
mv.visitln(" }");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment