Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
frascati
frascati
Commits
3c50e5f2
Commit
3c50e5f2
authored
Aug 11, 2010
by
Lionel Seinturier
Browse files
Remove uneeded generation of the sr local variable (suggested by Philippe.)
parent
382318b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tinfi/TODO.txt
View file @
3c50e5f2
...
...
@@ -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
...
...
tinfi/opt/oo/src/main/java/org/ow2/frascati/tinfi/opt/oo/ServiceReferenceClassGenerator.java
View file @
3c50e5f2
...
...
@@ -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
(
" }"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment