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 }
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; }
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); }
public new IParrot_PMC[] Invoke(IParrot_PMC signature) { return base.Invoke(signature); }
public void AddArgument(IParrot_PMC arg) { this[this.ArgNum] = arg; this.ArgNum++; }
public Parrot_PMC Instantiate(IParrot_PMC init) { return new Parrot_PMC(this.Parrot, this.InstantiatePointer(init)); }
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(); } }
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; }
public IParrot_PMC[] InvokeMethod(Parrot_String name, IParrot_PMC signature) { Pmc.Sub sub = this.FindMethod(name) as Pmc.Sub; return sub.Invoke(signature); }