Example #1
0
 // Native function constructor
 public Function(Module.Module module, String name, Func <Value[], Value[]> action, Type type)
 {
     this.Module = module;
     Name        = name;
     Type        = type;
     GlobalIndex = Module.Store.runtime.AddFunction(this);
     native      = action;
 }
Example #2
0
        // Standard constructor
        public Function(Module.Module module, String name, Type type = null, UInt32 index = 0xFFFFFFFF, Instruction.Instruction start = null)
        {
            Module      = module;
            Name        = name;
            Index       = index;
            GlobalIndex = Module.Store.runtime.AddFunction(this);

            Type = new Type(new byte[] { }, new byte[] { });
            if (type != null)
            {
                Type = type;
            }
        }
Example #3
0
 public Parser(byte[] bytes, Module.Module module)
 {
     this.bytes = bytes;
     index      = 0;
     Module     = module;
 }
Example #4
0
 public Module.Module LoadModule(Module.Module module)
 {
     Modules.Add(module.Name, module);
     return(module);
 }