Advertisement
Guest User

Untitled

a guest
Aug 18th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ;
  2. import format.abc.Data;
  3. class Void_abc
  4. {
  5.     public static function write(ctx:format.abc.Context, inits:Hash<Index<MethodType>>,classes:Hash<Index<ClassDef>>, localFunctions:Hash<Index<MethodType>>):Void
  6.     {
  7.         //
  8.         //      Void
  9.         //
  10.         var f = null;
  11.         var cl = ctx.beginClass('Void', false);
  12.         {
  13.         classes.set("Void", ctx.getClass(cl));
  14.         cl.isFinal = true;
  15.         cl.isInterface = false;
  16.         cl.isSealed = true;
  17.         //cl.namespace = ctx._namespace(NProtected(ctx.string('Void')));
  18.         cl.superclass = ctx.type('Object');
  19.         ctx.addClassSuper('Object');
  20.         ctx.defineField('tag', ctx.type('String'), false, null, false, ctx._namespace(NPublic(ctx.string(""))),0);
  21.         ctx.defineField('index', ctx.type('int'), false, null, false, ctx._namespace(NPublic(ctx.string(""))),0);
  22.         ctx.defineField('params', ctx.type('Array'), false, null, false, ctx._namespace(NPublic(ctx.string(""))),0);
  23.         ctx.defineField('__enum__', ctx.type('Boolean'), false, null, true, ctx._namespace(NPublic(ctx.string(""))),0);
  24.         ctx.defineField('__isenum', ctx.type('Boolean'), true, null, true, ctx._namespace(NPublic(ctx.string(""))),2);
  25.         ctx.defineField('__constructs__', ctx.type('*'), true, null, false, ctx._namespace(NPublic(ctx.string(""))),1);
  26.  
  27.         f=ctx.beginMethod('Void', [ctx.type('String'),ctx.type('int'),ctx.type('*')], ctx.type('void'), false, false, false, true, KNormal, {native:false, variableArgs:false, argumentsDefined : false, usesDXNS:false, newBlock:false, unused:false, debugName:ctx.string('""'), defaultParameters:null, paramNames:null}, ctx._namespace(NPublic(ctx.string(""))));
  28.         {
  29.         cl.constructor = f.type;
  30.             ctx.op(OThis);
  31.             ctx.op(OScope);
  32.             ctx.op(ODebugFile(ctx.string('C:/Program Files/Motion-Twin/haxe/rev/haxe_r3911/std/StdTypes.hx')));
  33.             //extern enum Void { }
  34.             ctx.op(ODebugLine(31));
  35.             ctx.op(ODebugReg(ctx.string('tag'),0,31));
  36.             ctx.op(ODebugReg(ctx.string('index'),1,31));
  37.             ctx.op(ODebugReg(ctx.string('params'),2,31));
  38.             ctx.op(OFindProp(ctx.type('tag')));
  39.             ctx.op(OReg(1));
  40.             ctx.op(OInitProp(ctx.type('tag')));
  41.             ctx.op(OFindProp(ctx.type('index')));
  42.             ctx.op(OReg(2));
  43.             ctx.op(OInitProp(ctx.type('index')));
  44.             ctx.op(OFindProp(ctx.type('params')));
  45.             ctx.op(OReg(3));
  46.             ctx.op(OInitProp(ctx.type('params')));
  47.             ctx.op(ORetVoid);
  48.         f.maxStack = 2;
  49.         f.maxScope = 1;
  50.         //f.nRegs = 4;
  51.         }
  52.  
  53.         ctx.beginFunction([], ctx.type('void'), {native:false, variableArgs:false, argumentsDefined : false, usesDXNS:false, newBlock:false, unused:false, debugName:ctx.string('""'), defaultParameters:null, paramNames:null});
  54.         {
  55.         f = ctx.curFunction.f;
  56.         cl.statics = f.type;
  57.             ctx.op(ODebugFile(ctx.string('C:/Program Files/Motion-Twin/haxe/rev/haxe_r3911/std/StdTypes.hx')));
  58.             //extern enum Void { }
  59.             ctx.op(ODebugLine(31));
  60.             ctx.op(ORetVoid);
  61.         f.maxStack = 0;
  62.         f.maxScope = 0;
  63.         //f.nRegs = 1;
  64.         }
  65.  
  66.         f=ctx.beginMethod('toString', [], ctx.type('String'), false, false, true, false, KNormal, {native:false, variableArgs:false, argumentsDefined : false, usesDXNS:false, newBlock:false, unused:false, debugName:ctx.string('""'), defaultParameters:null, paramNames:null}, ctx._namespace(NPublic(ctx.string(""))));
  67.         {
  68.             ctx.op(ODebugFile(ctx.string('C:/Program Files/Motion-Twin/haxe/rev/haxe_r3911/std/StdTypes.hx')));
  69.             //extern enum Void { }
  70.             ctx.op(ODebugLine(31));
  71.             ctx.op(OGetLex(ctx.type('flash.Boot')));
  72.             ctx.op(OThis);
  73.             ctx.op(OCallProperty(ctx.type('enum_to_string'),1));
  74.             ctx.op(ORet);
  75.         f.maxStack = 2;
  76.         f.maxScope = 0;
  77.         //f.nRegs = 1;
  78.         }
  79.  
  80.         ctx.beginFunction([], ctx.type('void'),{native:false, variableArgs:false, argumentsDefined : false, usesDXNS:false, newBlock:false, unused:false, debugName:ctx.string('""'), defaultParameters:null, paramNames:null});
  81.         {
  82.         f = ctx.curFunction.f;
  83.         inits.set('Void', f.type);
  84.             ctx.op(OThis);
  85.             ctx.op(OScope);
  86.             ctx.op(ODebugFile(ctx.string('C:/Program Files/Motion-Twin/haxe/rev/haxe_r3911/std/StdTypes.hx')));
  87.             //extern enum Void { }
  88.             ctx.op(ODebugLine(31));
  89.             ctx.op(OGetGlobalScope);
  90.             ctx.op(OGetLex(ctx.type('Object')));
  91.             ctx.op(OScope);
  92.             ctx.op(OGetLex(ctx.type('Object')));
  93.             ctx.op(OClassDef(classes.get('Void')));
  94.             ctx.op(OPopScope);
  95.             ctx.op(ODup);
  96.             ctx.allocRegister();
  97.             ctx.op(OSetReg(1));
  98.             ctx.op(OInitProp(ctx.type('Void')));
  99.             ctx.op(OReg(1));
  100.             ctx.op(OArray(0));
  101.             ctx.op(OSetProp(ctx.type('__constructs__')));
  102.             ctx.op(ORetVoid);
  103.         f.maxStack = 3;
  104.         f.maxScope = 2;
  105.         //f.nRegs = 2;
  106.         }
  107.         ctx.getData().inits[(ctx.getData().inits.length - 1)].method = inits.get('Void');
  108.         ctx.endClass(false);
  109.         }
  110.     }
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement