Example #1
0
 public ISend send(int fromContext) {
   if (fromContext == ISymbolTable.CONSTRUCTOR)
     compilerErrors.warning(
         "send on unconnected component channels from constructors causes deadlock");
   Send newcode = new Send(fromContext);
   newCodeBody(newcode);
   return newcode;
 }
Example #2
0
 public IProcCall proc_call(STEntry ste, ISymbolTable context) {
   if (context.getContext() == ISymbolTable.CONSTRUCTOR)
     compilerErrors.warning(
         "procedure calls from constructors can cause deadlock if procedures use unconnected component channels");
   ProcCall newcode = new ProcCall(ste, context, findComponentContainer());
   newCodeBody(newcode);
   return newcode;
 }
Example #3
0
 public IStop stop(int fromContext) {
   if (fromContext == ISymbolTable.CONSTRUCTOR)
     compilerErrors.warning("stop not allowed in constructors");
   Stop newcode = new Stop(fromContext);
   Component container = findComponentContainer();
   if (container != null) container.setContains_stop_statement(true);
   newCodeBody(newcode);
   return newcode;
 }
Example #4
0
 public IAcknowledge acknowledge(STEntry lhs, STEntry rhs, int fromContext) {
   if (fromContext == ISymbolTable.CONSTRUCTOR)
     compilerErrors.warning(
         "acknowledge x from y on unconnected component channels from constructors causes deadlock");
   Acknowledge newcode = new Acknowledge(lhs, rhs, fromContext);
   if (currentCode != null
       && currentCode instanceof DeclarationContainer) { // following compilation error
     // this is always the case in non-erroneous programs
     ((DeclarationContainer) currentCode).addLocation(newcode);
   }
   newCodeBody(newcode);
   return newcode;
 }