public void AllocateType() { var ctx = CreateContext(); var frame = ctx.Execute((generator, o) => generator.Emit(OpCodes.RET)); var obj = IshtarGC.AllocTypeInfoObject(T.STRING, frame); IshtarGC.FreeObject(&obj, frame); }
public void AllocateField() { var ctx = CreateContext(); var frame = ctx.Execute((generator, o) => generator.Emit(OpCodes.RET)); var obj = IshtarGC.AllocFieldInfoObject(T.STRING.Field["Length"], frame); new IshtarLayerField(obj, frame); IshtarGC.FreeObject(&obj, frame); }
public void AllocateMethod() { var ctx = CreateContext(); var frame = ctx.Execute((generator, o) => generator.Emit(OpCodes.RET)); var obj = IshtarGC.AllocMethodInfoObject(T.STRING.Method["op_Equal(String,String)"], frame); var fn = new IshtarLayerFunction(obj, frame); Assert.AreEqual("op_Equal", fn.Name); IshtarGC.FreeObject(&obj, frame); }
public unsafe void CorrectAllocateString() { var result = IshtarMarshal.ToIshtarObject("foo"); IshtarGC.FreeObject(&result, new CallFrame()); }
public unsafe void CorrectAllocateObject() { var result = IshtarGC.AllocObject(VeinTypeCode.TYPE_I8.AsRuntimeClass()); IshtarGC.FreeObject(&result, new CallFrame()); }