Exemplo n.º 1
0
 public override IPStmt VisitPopStmt(PParser.PopStmtContext context)
 {
     method.CanChangeState = true;
     if (method.Role.HasFlag(FunctionRole.TransitionFunction))
     {
         throw handler.ChangedStateMidTransition(context, method);
     }
     return(new PopStmt(context));
 }
Exemplo n.º 2
0
        public override IPStmt VisitPopStmt(PParser.PopStmtContext context)
        {
            if (machine?.IsSpec == true)
            {
                throw handler.IllegalMonitorOperation(context, context.POP().Symbol, machine);
            }

            if (!method.Signature.ReturnType.IsSameTypeAs(PrimitiveType.Null))
            {
                throw handler.PopInNonVoidFunction(context);
            }

            method.CanChangeState = true;
            if (method.Role.HasFlag(FunctionRole.TransitionFunction))
            {
                throw handler.ChangedStateMidTransition(context, method);
            }

            return(new PopStmt(context));
        }
Exemplo n.º 3
0
 public override object VisitPopStmt(PParser.PopStmtContext context)
 {
     return(null);
 }