Ejemplo n.º 1
0
        public ExceptionContext(ExceptionContext parentContext)
        {
            // Store parent-child relation.
            this.parentContext  = parentContext;
            this.parentFunction = parentContext.parentFunction;
            parentContext.children.Add(this);
            module = parentFunction.GetModule();

            // Initialize more variables.
            this.children = new List <ExceptionContext> ();
            this.blocks   = new List <BasicBlock> ();
            this.handlers = new List <Handler> ();
            this.cleanup  = null;
        }
Ejemplo n.º 2
0
        public ExceptionContext(ExceptionContext parentContext)
        {
            // Store parent-child relation.
            this.parentContext = parentContext;
            this.parentFunction = parentContext.parentFunction;
            parentContext.children.Add(this);
            module = parentFunction.GetModule();

            // Initialize more variables.
            this.children = new List<ExceptionContext> ();
            this.blocks = new List<BasicBlock> ();
            this.handlers = new List<Handler> ();
            this.cleanup = null;
        }
Ejemplo n.º 3
0
        public ExceptionContext(Function parentFunction)
        {
            // Store parent-child relation.
            this.parentContext = null;
            this.parentFunction = parentFunction;
            module = parentFunction.GetModule();
            if(parentFunction.exceptionContext != null)
                throw new ModuleException("A function only can have one (toplevel) exception context.");

            parentFunction.exceptionContext = this;

            // Initialize more variables.
            this.children = new List<ExceptionContext> ();
            this.blocks = new List<BasicBlock> ();
            this.handlers = new List<Handler> ();
            this.cleanup = null;
        }
Ejemplo n.º 4
0
        public ExceptionContext(Function parentFunction)
        {
            // Store parent-child relation.
            this.parentContext  = null;
            this.parentFunction = parentFunction;
            module = parentFunction.GetModule();
            if (parentFunction.exceptionContext != null)
            {
                throw new ModuleException("A function only can have one (toplevel) exception context.");
            }

            parentFunction.exceptionContext = this;

            // Initialize more variables.
            this.children = new List <ExceptionContext> ();
            this.blocks   = new List <BasicBlock> ();
            this.handlers = new List <Handler> ();
            this.cleanup  = null;
        }