private With decodeWith(ActionFactory factory)
        {
            With a      = new With();
            int  size   = reader.readUI16();
            int  target = size + reader.Offset;

            a.endWith = factory.getLabel(target);
            return(a);
        }
        private Branch decodeBranch(int code, ActionFactory factory)
        {
            Branch a      = new Branch(code);
            int    offset = reader.readSI16();
            int    target = offset + reader.Offset;

            a.target = factory.getLabel(target);
            return(a);
        }
        private Try decodeTry(ActionFactory factory)
        {
            Try a = new Try();

            a.flags = reader.readUI8();
            int trySize     = reader.readUI16();
            int catchSize   = reader.readUI16();
            int finallySize = reader.readUI16();

            if (a.hasRegister())
            {
                a.catchReg = reader.readUI8();
            }
            else
            {
                a.catchName = reader.readString();
            }

            // we have now consumed the try action.  what follows is label mgmt

            int tryEnd = reader.Offset + trySize;

            a.endTry = factory.getLabel(tryEnd);

            // place the catchLabel to mark the end point of the catch handler
            if (a.hasCatch())
            {
                a.endCatch = factory.getLabel(tryEnd + catchSize);
            }

            // place the finallyLabel to mark the end point of the finally handler
            if (a.hasFinally())
            {
                a.endFinally = factory.getLabel(tryEnd + finallySize + (a.hasCatch()?catchSize:0));
            }

            return(a);
        }
Esempio n. 4
0
		private With decodeWith(ActionFactory factory)
		{
			With a = new With();
			int size = reader.readUI16();
			int target = size + reader.Offset;
			a.endWith = factory.getLabel(target);
			return a;
		}
Esempio n. 5
0
		private Branch decodeBranch(int code, ActionFactory factory)
		{
			Branch a = new Branch(code);
			int offset = reader.readSI16();
			int target = offset + reader.Offset;
			a.target = factory.getLabel(target);
			return a;
		}
Esempio n. 6
0
		private Try decodeTry(ActionFactory factory)
		{
			Try a = new Try();
			
			a.flags = reader.readUI8();
			int trySize = reader.readUI16();
			int catchSize = reader.readUI16();
			int finallySize = reader.readUI16();
			
			if (a.hasRegister())
				a.catchReg = reader.readUI8();
			else
				a.catchName = reader.readString();
			
			// we have now consumed the try action.  what follows is label mgmt
			
			int tryEnd = reader.Offset + trySize;
			a.endTry = factory.getLabel(tryEnd);
			
			// place the catchLabel to mark the end point of the catch handler
			if (a.hasCatch())
				a.endCatch = factory.getLabel(tryEnd + catchSize);
			
			// place the finallyLabel to mark the end point of the finally handler
			if (a.hasFinally())
				a.endFinally = factory.getLabel(tryEnd + finallySize + (a.hasCatch()?catchSize:0));
			
			return a;
		}