public ParrotException(Parrot parrot, IParrot_PMC exception)
 {
     this.raw_exception = exception;
     this.msg = exception.ToString();
     this.Parrot = parrot;
     // TODO: Verify that this is an exception PMC
 }
Example #2
0
 public IntPtr InstantiatePointer(IParrot_PMC init)
 {
     IntPtr pmc_ptr = IntPtr.Zero;
     int result = Parrot_api_pmc_new_from_class(this.Parrot.RawPointer, this.RawPointer, init.RawPointer, out pmc_ptr);
     if (result != 1)
         this.Parrot.GetErrorResult();
     return pmc_ptr;
 }
Example #3
0
 public Parrot(Parrot parent, string exename)
 {
     IntPtr raw_parent = parent == null ? IntPtr.Zero : parent.RawPointer;
     IntPtr interp_raw;
     int result = Parrot_api_make_interpreter(raw_parent, 0, IntPtr.Zero, out interp_raw);
     if (result != 1)
         this.GetErrorResult();
     this.Interp = new Pmc.Interpreter(this, interp_raw);
     if (!String.IsNullOrEmpty(exename))
         this.SetExecutableName(exename);
 }
Example #4
0
 public new IParrot_PMC[] Invoke(IParrot_PMC signature)
 {
     return base.Invoke(signature);
 }
Example #5
0
 public void AddArgument(IParrot_PMC arg)
 {
     this[this.ArgNum] = arg;
     this.ArgNum++;
 }
Example #6
0
 public Parrot_PMC Instantiate(IParrot_PMC init)
 {
     return new Parrot_PMC(this.Parrot, this.InstantiatePointer(init));
 }
Example #7
0
 protected IntPtr this[IParrot_PMC key]
 {
     get {
         IntPtr value_ptr = IntPtr.Zero;
         int result = Parrot_api_pmc_get_keyed(this.Parrot.RawPointer, this.RawPointer, key.RawPointer, out value_ptr);
         if (result != 1)
             this.Parrot.GetErrorResult();
         return value_ptr;
     }
     set {
         int result = Parrot_api_pmc_set_keyed(this.Parrot.RawPointer, this.RawPointer, key.RawPointer, value);
         if (result != 1)
             this.Parrot.GetErrorResult();
     }
 }
Example #8
0
 protected IParrot_PMC[] Invoke(IParrot_PMC signature)
 {
     int result = Parrot_api_pmc_invoke(this.Parrot.RawPointer, this.RawPointer, signature.RawPointer);
     if (result != 1)
         this.Parrot.GetErrorResult();
     // TODO: Iterate over the list of return values, wrap them up, return them.
     return null;
 }
Example #9
0
 public IParrot_PMC[] InvokeMethod(Parrot_String name, IParrot_PMC signature)
 {
     Pmc.Sub sub = this.FindMethod(name) as Pmc.Sub;
     return sub.Invoke(signature);
 }