2 code_t* abc_add(code_t*prev)
4 code_t*self = add_opcode(prev, 0xa0);
7 code_t* abc_add_i(code_t*prev)
9 code_t*self = add_opcode(prev, 0xc5);
12 code_t* abc_astype(code_t*prev, char* name)
14 code_t*self = add_opcode(prev, 0x86);
15 self->data[0] = multiname_fromstring(name);
18 code_t* abc_astype2(code_t*prev, multiname_t* name)
20 code_t*self = add_opcode(prev, 0x86);
21 self->data[0] = multiname_clone(name);
24 code_t* abc_astypelate(code_t*prev)
26 code_t*self = add_opcode(prev, 0x87);
29 code_t* abc_bitand(code_t*prev)
31 code_t*self = add_opcode(prev, 0xA8);
34 code_t* abc_bitnot(code_t*prev)
36 code_t*self = add_opcode(prev, 0x97);
39 code_t* abc_bitor(code_t*prev)
41 code_t*self = add_opcode(prev, 0xa9);
44 code_t* abc_bitxor(code_t*prev)
46 code_t*self = add_opcode(prev, 0xaa);
49 code_t* abc_call(code_t*prev, int v)
51 code_t*self = add_opcode(prev, 0x41);
52 self->data[0] = (void*)(ptroff_t)v;
55 code_t* abc_callmethod(code_t*prev, abc_method_body_t* m, int v)
57 code_t*self = add_opcode(prev, 0x43);
59 self->data[1] = (void*)(ptroff_t)v;
62 code_t* abc_callproplex(code_t*prev, char* name, int v)
64 code_t*self = add_opcode(prev, 0x4c);
65 self->data[0] = multiname_fromstring(name);
66 self->data[1] = (void*)(ptroff_t)v;
69 code_t* abc_callproplex2(code_t*prev, multiname_t* name, int v)
71 code_t*self = add_opcode(prev, 0x4c);
72 self->data[0] = multiname_clone(name);
73 self->data[1] = (void*)(ptroff_t)v;
76 code_t* abc_callproperty(code_t*prev, char* name, int v)
78 code_t*self = add_opcode(prev, 0x46);
79 self->data[0] = multiname_fromstring(name);
80 self->data[1] = (void*)(ptroff_t)v;
83 code_t* abc_callproperty2(code_t*prev, multiname_t* name, int v)
85 code_t*self = add_opcode(prev, 0x46);
86 self->data[0] = multiname_clone(name);
87 self->data[1] = (void*)(ptroff_t)v;
90 code_t* abc_callpropvoid(code_t*prev, char* name, int v)
92 code_t*self = add_opcode(prev, 0x4f);
93 self->data[0] = multiname_fromstring(name);
94 self->data[1] = (void*)(ptroff_t)v;
97 code_t* abc_callpropvoid2(code_t*prev, multiname_t* name, int v)
99 code_t*self = add_opcode(prev, 0x4f);
100 self->data[0] = multiname_clone(name);
101 self->data[1] = (void*)(ptroff_t)v;
104 code_t* abc_callstatic(code_t*prev, abc_method_t* m, int v)
106 code_t*self = add_opcode(prev, 0x44);
108 self->data[1] = (void*)(ptroff_t)v;
111 code_t* abc_callsuper(code_t*prev, char* name, int v)
113 code_t*self = add_opcode(prev, 0x45);
114 self->data[0] = multiname_fromstring(name);
115 self->data[1] = (void*)(ptroff_t)v;
118 code_t* abc_callsuper2(code_t*prev, multiname_t* name, int v)
120 code_t*self = add_opcode(prev, 0x45);
121 self->data[0] = multiname_clone(name);
122 self->data[1] = (void*)(ptroff_t)v;
125 code_t* abc_callsupervoid(code_t*prev, char* name, int v)
127 code_t*self = add_opcode(prev, 0x4e);
128 self->data[0] = multiname_fromstring(name);
129 self->data[1] = (void*)(ptroff_t)v;
132 code_t* abc_callsupervoid2(code_t*prev, multiname_t* name, int v)
134 code_t*self = add_opcode(prev, 0x4e);
135 self->data[0] = multiname_clone(name);
136 self->data[1] = (void*)(ptroff_t)v;
139 code_t* abc_checkfilter(code_t*prev)
141 code_t*self = add_opcode(prev, 0x78);
144 code_t* abc_coerce(code_t*prev, char* name)
146 code_t*self = add_opcode(prev, 0x80);
147 self->data[0] = multiname_fromstring(name);
150 code_t* abc_coerce2(code_t*prev, multiname_t* name)
152 code_t*self = add_opcode(prev, 0x80);
153 self->data[0] = multiname_clone(name);
156 code_t* abc_coerce_a(code_t*prev)
158 code_t*self = add_opcode(prev, 0x82);
161 code_t* abc_coerce_s(code_t*prev)
163 code_t*self = add_opcode(prev, 0x85);
166 code_t* abc_construct(code_t*prev, int v)
168 code_t*self = add_opcode(prev, 0x42);
169 self->data[0] = (void*)(ptroff_t)v;
172 code_t* abc_constructprop(code_t*prev, char* name, int v)
174 code_t*self = add_opcode(prev, 0x4a);
175 self->data[0] = multiname_fromstring(name);
176 self->data[1] = (void*)(ptroff_t)v;
179 code_t* abc_constructprop2(code_t*prev, multiname_t* name, int v)
181 code_t*self = add_opcode(prev, 0x4a);
182 self->data[0] = multiname_clone(name);
183 self->data[1] = (void*)(ptroff_t)v;
186 code_t* abc_constructsuper(code_t*prev, int v)
188 code_t*self = add_opcode(prev, 0x49);
189 self->data[0] = (void*)(ptroff_t)v;
192 code_t* abc_convert_b(code_t*prev)
194 code_t*self = add_opcode(prev, 0x76);
197 code_t* abc_convert_i(code_t*prev)
199 code_t*self = add_opcode(prev, 0x73);
202 code_t* abc_convert_d(code_t*prev)
204 code_t*self = add_opcode(prev, 0x75);
207 code_t* abc_convert_o(code_t*prev)
209 code_t*self = add_opcode(prev, 0x77);
212 code_t* abc_convert_u(code_t*prev)
214 code_t*self = add_opcode(prev, 0x74);
217 code_t* abc_convert_s(code_t*prev)
219 code_t*self = add_opcode(prev, 0x70);
222 code_t* abc_debug(code_t*prev, void* debuginfo)
224 code_t*self = add_opcode(prev, 0xef);
225 /* FIXME: write debuginfo debuginfo */
228 code_t* abc_debugfile(code_t*prev, char* s)
230 code_t*self = add_opcode(prev, 0xf1);
231 self->data[0] = strdup(s);
234 code_t* abc_debugline(code_t*prev, int v)
236 code_t*self = add_opcode(prev, 0xf0);
237 self->data[0] = (void*)(ptroff_t)v;
240 code_t* abc_declocal(code_t*prev, int reg)
242 code_t*self = add_opcode(prev, 0x94);
243 self->data[0] = (void*)(ptroff_t)reg;
246 code_t* abc_declocal_i(code_t*prev, int reg)
248 code_t*self = add_opcode(prev, 0xc3);
249 self->data[0] = (void*)(ptroff_t)reg;
252 code_t* abc_decrement(code_t*prev)
254 code_t*self = add_opcode(prev, 0x93);
257 code_t* abc_decrement_i(code_t*prev)
259 code_t*self = add_opcode(prev, 0xc1);
262 code_t* abc_deleteproperty(code_t*prev, char* name)
264 code_t*self = add_opcode(prev, 0x6a);
265 self->data[0] = multiname_fromstring(name);
268 code_t* abc_deleteproperty2(code_t*prev, multiname_t* name)
270 code_t*self = add_opcode(prev, 0x6a);
271 self->data[0] = multiname_clone(name);
274 code_t* abc_divide(code_t*prev)
276 code_t*self = add_opcode(prev, 0xa3);
279 code_t* abc_dup(code_t*prev)
281 code_t*self = add_opcode(prev, 0x2a);
284 code_t* abc_dxns(code_t*prev, char* s)
286 code_t*self = add_opcode(prev, 0x06);
287 self->data[0] = strdup(s);
290 code_t* abc_dxnslate(code_t*prev)
292 code_t*self = add_opcode(prev, 0x07);
295 code_t* abc_equals(code_t*prev)
297 code_t*self = add_opcode(prev, 0xab);
300 code_t* abc_esc_xattr(code_t*prev)
302 code_t*self = add_opcode(prev, 0x72);
305 code_t* abc_esc_xelem(code_t*prev)
307 code_t*self = add_opcode(prev, 0x71);
310 code_t* abc_findproperty(code_t*prev, char* name)
312 code_t*self = add_opcode(prev, 0x5e);
313 self->data[0] = multiname_fromstring(name);
316 code_t* abc_findproperty2(code_t*prev, multiname_t* name)
318 code_t*self = add_opcode(prev, 0x5e);
319 self->data[0] = multiname_clone(name);
322 code_t* abc_findpropstrict(code_t*prev, char* name)
324 code_t*self = add_opcode(prev, 0x5d);
325 self->data[0] = multiname_fromstring(name);
328 code_t* abc_findpropstrict2(code_t*prev, multiname_t* name)
330 code_t*self = add_opcode(prev, 0x5d);
331 self->data[0] = multiname_clone(name);
334 code_t* abc_getdescendants(code_t*prev, char* name)
336 code_t*self = add_opcode(prev, 0x59);
337 self->data[0] = multiname_fromstring(name);
340 code_t* abc_getdescendants2(code_t*prev, multiname_t* name)
342 code_t*self = add_opcode(prev, 0x59);
343 self->data[0] = multiname_clone(name);
346 code_t* abc_getglobalscope(code_t*prev)
348 code_t*self = add_opcode(prev, 0x64);
351 code_t* abc_getglobalslot(code_t*prev, int v)
353 code_t*self = add_opcode(prev, 0x6e);
354 self->data[0] = (void*)(ptroff_t)v;
357 code_t* abc_getlex(code_t*prev, char* name)
359 code_t*self = add_opcode(prev, 0x60);
360 self->data[0] = multiname_fromstring(name);
363 code_t* abc_getlex2(code_t*prev, multiname_t* name)
365 code_t*self = add_opcode(prev, 0x60);
366 self->data[0] = multiname_clone(name);
369 code_t* abc_getlocal(code_t*prev, int reg)
371 code_t*self = add_opcode(prev, 0x62);
372 self->data[0] = (void*)(ptroff_t)reg;
375 code_t* abc_getlocal_0(code_t*prev)
377 code_t*self = add_opcode(prev, 0xd0);
380 code_t* abc_getlocal_1(code_t*prev)
382 code_t*self = add_opcode(prev, 0xd1);
385 code_t* abc_getlocal_2(code_t*prev)
387 code_t*self = add_opcode(prev, 0xd2);
390 code_t* abc_getlocal_3(code_t*prev)
392 code_t*self = add_opcode(prev, 0xd3);
395 code_t* abc_getproperty(code_t*prev, char* name)
397 code_t*self = add_opcode(prev, 0x66);
398 self->data[0] = multiname_fromstring(name);
401 code_t* abc_getproperty2(code_t*prev, multiname_t* name)
403 code_t*self = add_opcode(prev, 0x66);
404 self->data[0] = multiname_clone(name);
407 code_t* abc_getscopeobject(code_t*prev, int v)
409 code_t*self = add_opcode(prev, 0x65);
410 self->data[0] = (void*)(ptroff_t)v;
413 code_t* abc_getslot(code_t*prev, int v)
415 code_t*self = add_opcode(prev, 0x6c);
416 self->data[0] = (void*)(ptroff_t)v;
419 code_t* abc_getsuper(code_t*prev, char* name)
421 code_t*self = add_opcode(prev, 0x04);
422 self->data[0] = multiname_fromstring(name);
425 code_t* abc_getsuper2(code_t*prev, multiname_t* name)
427 code_t*self = add_opcode(prev, 0x04);
428 self->data[0] = multiname_clone(name);
431 code_t* abc_greaterthan(code_t*prev)
433 code_t*self = add_opcode(prev, 0xaf);
436 code_t* abc_greaterequals(code_t*prev)
438 code_t*self = add_opcode(prev, 0xb0);
441 code_t* abc_hasnext(code_t*prev)
443 code_t*self = add_opcode(prev, 0x1f);
446 code_t* abc_hasnext2(code_t*prev, int reg, int reg2)
448 code_t*self = add_opcode(prev, 0x32);
449 self->data[0] = (void*)(ptroff_t)reg;
450 self->data[1] = (void*)(ptroff_t)reg2;
453 code_t* abc_ifeq(code_t*prev, code_t* label)
455 code_t*self = add_opcode(prev, 0x13);
456 self->data[0] = 0; //placeholder
457 self->branch = label;
460 code_t* abc_iffalse(code_t*prev, code_t* label)
462 code_t*self = add_opcode(prev, 0x12);
463 self->data[0] = 0; //placeholder
464 self->branch = label;
467 code_t* abc_ifge(code_t*prev, code_t* label)
469 code_t*self = add_opcode(prev, 0x18);
470 self->data[0] = 0; //placeholder
471 self->branch = label;
474 code_t* abc_ifgt(code_t*prev, code_t* label)
476 code_t*self = add_opcode(prev, 0x17);
477 self->data[0] = 0; //placeholder
478 self->branch = label;
481 code_t* abc_ifle(code_t*prev, code_t* label)
483 code_t*self = add_opcode(prev, 0x16);
484 self->data[0] = 0; //placeholder
485 self->branch = label;
488 code_t* abc_iflt(code_t*prev, code_t* label)
490 code_t*self = add_opcode(prev, 0x15);
491 self->data[0] = 0; //placeholder
492 self->branch = label;
495 code_t* abc_ifnge(code_t*prev, code_t* label)
497 code_t*self = add_opcode(prev, 0x0f);
498 self->data[0] = 0; //placeholder
499 self->branch = label;
502 code_t* abc_ifngt(code_t*prev, code_t* label)
504 code_t*self = add_opcode(prev, 0x0e);
505 self->data[0] = 0; //placeholder
506 self->branch = label;
509 code_t* abc_ifnle(code_t*prev, code_t* label)
511 code_t*self = add_opcode(prev, 0x0d);
512 self->data[0] = 0; //placeholder
513 self->branch = label;
516 code_t* abc_ifnlt(code_t*prev, code_t* label)
518 code_t*self = add_opcode(prev, 0x0c);
519 self->data[0] = 0; //placeholder
520 self->branch = label;
523 code_t* abc_ifne(code_t*prev, code_t* label)
525 code_t*self = add_opcode(prev, 0x14);
526 self->data[0] = 0; //placeholder
527 self->branch = label;
530 code_t* abc_ifstricteq(code_t*prev, code_t* label)
532 code_t*self = add_opcode(prev, 0x19);
533 self->data[0] = 0; //placeholder
534 self->branch = label;
537 code_t* abc_ifstrictne(code_t*prev, code_t* label)
539 code_t*self = add_opcode(prev, 0x1a);
540 self->data[0] = 0; //placeholder
541 self->branch = label;
544 code_t* abc_iftrue(code_t*prev, code_t* label)
546 code_t*self = add_opcode(prev, 0x11);
547 self->data[0] = 0; //placeholder
548 self->branch = label;
551 code_t* abc_in(code_t*prev)
553 code_t*self = add_opcode(prev, 0xb4);
556 code_t* abc_inclocal(code_t*prev, int reg)
558 code_t*self = add_opcode(prev, 0x92);
559 self->data[0] = (void*)(ptroff_t)reg;
562 code_t* abc_inclocal_i(code_t*prev, int reg)
564 code_t*self = add_opcode(prev, 0xc2);
565 self->data[0] = (void*)(ptroff_t)reg;
568 code_t* abc_increment(code_t*prev)
570 code_t*self = add_opcode(prev, 0x91);
573 code_t* abc_increment_i(code_t*prev)
575 code_t*self = add_opcode(prev, 0xc0);
578 code_t* abc_initproperty(code_t*prev, char* name)
580 code_t*self = add_opcode(prev, 0x68);
581 self->data[0] = multiname_fromstring(name);
584 code_t* abc_initproperty2(code_t*prev, multiname_t* name)
586 code_t*self = add_opcode(prev, 0x68);
587 self->data[0] = multiname_clone(name);
590 code_t* abc_instanceof(code_t*prev)
592 code_t*self = add_opcode(prev, 0xb1);
595 code_t* abc_istype(code_t*prev, char* name)
597 code_t*self = add_opcode(prev, 0xb2);
598 self->data[0] = multiname_fromstring(name);
601 code_t* abc_istype2(code_t*prev, multiname_t* name)
603 code_t*self = add_opcode(prev, 0xb2);
604 self->data[0] = multiname_clone(name);
607 code_t* abc_istypelate(code_t*prev)
609 code_t*self = add_opcode(prev, 0xb3);
612 code_t* abc_jump(code_t*prev, code_t* label)
614 code_t*self = add_opcode(prev, 0x10);
615 self->data[0] = 0; //placeholder
616 self->branch = label;
619 code_t* abc_kill(code_t*prev, int reg)
621 code_t*self = add_opcode(prev, 0x08);
622 self->data[0] = (void*)(ptroff_t)reg;
625 code_t* abc_label(code_t*prev)
627 code_t*self = add_opcode(prev, 0x09);
630 code_t* abc_lessequals(code_t*prev)
632 code_t*self = add_opcode(prev, 0xae);
635 code_t* abc_lessthan(code_t*prev)
637 code_t*self = add_opcode(prev, 0xad);
640 code_t* abc_lookupswitch(code_t*prev, lookupswitch_t* l)
642 code_t*self = add_opcode(prev, 0x1b);
646 code_t* abc_lshift(code_t*prev)
648 code_t*self = add_opcode(prev, 0xa5);
651 code_t* abc_modulo(code_t*prev)
653 code_t*self = add_opcode(prev, 0xa4);
656 code_t* abc_multiply(code_t*prev)
658 code_t*self = add_opcode(prev, 0xa2);
661 code_t* abc_multiply_i(code_t*prev)
663 code_t*self = add_opcode(prev, 0xc7);
666 code_t* abc_negate(code_t*prev)
668 code_t*self = add_opcode(prev, 0x90);
671 code_t* abc_negate_i(code_t*prev)
673 code_t*self = add_opcode(prev, 0xc4);
676 code_t* abc_newactivation(code_t*prev)
678 code_t*self = add_opcode(prev, 0x57);
681 code_t* abc_newarray(code_t*prev, int v)
683 code_t*self = add_opcode(prev, 0x56);
684 self->data[0] = (void*)(ptroff_t)v;
687 code_t* abc_newcatch(code_t*prev, int v)
689 code_t*self = add_opcode(prev, 0x5a);
690 self->data[0] = (void*)(ptroff_t)v;
693 code_t* abc_newclass(code_t*prev, abc_class_t* m)
695 code_t*self = add_opcode(prev, 0x58);
699 code_t* abc_newfunction(code_t*prev, abc_method_body_t* m)
701 code_t*self = add_opcode(prev, 0x40);
705 code_t* abc_newobject(code_t*prev, int v)
707 code_t*self = add_opcode(prev, 0x55);
708 self->data[0] = (void*)(ptroff_t)v;
711 code_t* abc_nextname(code_t*prev)
713 code_t*self = add_opcode(prev, 0x1e);
716 code_t* abc_nextvalue(code_t*prev)
718 code_t*self = add_opcode(prev, 0x23);
721 code_t* abc_nop(code_t*prev)
723 code_t*self = add_opcode(prev, 0x02);
726 code_t* abc_not(code_t*prev)
728 code_t*self = add_opcode(prev, 0x96);
731 code_t* abc_pop(code_t*prev)
733 code_t*self = add_opcode(prev, 0x29);
736 code_t* abc_popscope(code_t*prev)
738 code_t*self = add_opcode(prev, 0x1d);
741 code_t* abc_pushbyte(code_t*prev, int v)
743 code_t*self = add_opcode(prev, 0x24);
744 self->data[0] = (void*)(ptroff_t)v;
747 code_t* abc_pushdouble(code_t*prev, double f)
749 code_t*self = add_opcode(prev, 0x2f);
750 double*fp = malloc(sizeof(double));
755 code_t* abc_pushfalse(code_t*prev)
757 code_t*self = add_opcode(prev, 0x27);
760 code_t* abc_pushint(code_t*prev, int i)
762 code_t*self = add_opcode(prev, 0x2d);
763 self->data[0] = (void*)(ptroff_t)i;
766 code_t* abc_pushnamespace(code_t*prev, int v)
768 code_t*self = add_opcode(prev, 0x31);
769 self->data[0] = (void*)(ptroff_t)v;
772 code_t* abc_pushnan(code_t*prev)
774 code_t*self = add_opcode(prev, 0x28);
777 code_t* abc_pushnull(code_t*prev)
779 code_t*self = add_opcode(prev, 0x20);
782 code_t* abc_pushscope(code_t*prev)
784 code_t*self = add_opcode(prev, 0x30);
787 code_t* abc_pushshort(code_t*prev, int v)
789 code_t*self = add_opcode(prev, 0x25);
790 self->data[0] = (void*)(ptroff_t)v;
793 code_t* abc_pushstring(code_t*prev, char* s)
795 code_t*self = add_opcode(prev, 0x2c);
796 self->data[0] = strdup(s);
799 code_t* abc_pushtrue(code_t*prev)
801 code_t*self = add_opcode(prev, 0x26);
804 code_t* abc_pushuint(code_t*prev, unsigned int u)
806 code_t*self = add_opcode(prev, 0x2e);
807 self->data[0] = (void*)(ptroff_t)u;
810 code_t* abc_pushundefined(code_t*prev)
812 code_t*self = add_opcode(prev, 0x21);
815 code_t* abc_pushwith(code_t*prev)
817 code_t*self = add_opcode(prev, 0x1c);
820 code_t* abc_returnvalue(code_t*prev)
822 code_t*self = add_opcode(prev, 0x48);
825 code_t* abc_returnvoid(code_t*prev)
827 code_t*self = add_opcode(prev, 0x47);
830 code_t* abc_rshift(code_t*prev)
832 code_t*self = add_opcode(prev, 0xa6);
835 code_t* abc_setlocal(code_t*prev, int reg)
837 code_t*self = add_opcode(prev, 0x63);
838 self->data[0] = (void*)(ptroff_t)reg;
841 code_t* abc_setlocal_0(code_t*prev)
843 code_t*self = add_opcode(prev, 0xd4);
846 code_t* abc_setlocal_1(code_t*prev)
848 code_t*self = add_opcode(prev, 0xd5);
851 code_t* abc_setlocal_2(code_t*prev)
853 code_t*self = add_opcode(prev, 0xd6);
856 code_t* abc_setlocal_3(code_t*prev)
858 code_t*self = add_opcode(prev, 0xd7);
861 code_t* abc_setglobalslot(code_t*prev, int v)
863 code_t*self = add_opcode(prev, 0x6f);
864 self->data[0] = (void*)(ptroff_t)v;
867 code_t* abc_setproperty(code_t*prev, char* name)
869 code_t*self = add_opcode(prev, 0x61);
870 self->data[0] = multiname_fromstring(name);
873 code_t* abc_setproperty2(code_t*prev, multiname_t* name)
875 code_t*self = add_opcode(prev, 0x61);
876 self->data[0] = multiname_clone(name);
879 code_t* abc_setslot(code_t*prev, int v)
881 code_t*self = add_opcode(prev, 0x6d);
882 self->data[0] = (void*)(ptroff_t)v;
885 code_t* abc_setsuper(code_t*prev, char* name)
887 code_t*self = add_opcode(prev, 0x05);
888 self->data[0] = multiname_fromstring(name);
891 code_t* abc_setsuper2(code_t*prev, multiname_t* name)
893 code_t*self = add_opcode(prev, 0x05);
894 self->data[0] = multiname_clone(name);
897 code_t* abc_strictequals(code_t*prev)
899 code_t*self = add_opcode(prev, 0xac);
902 code_t* abc_subtract(code_t*prev)
904 code_t*self = add_opcode(prev, 0xa1);
907 code_t* abc_subtract_i(code_t*prev)
909 code_t*self = add_opcode(prev, 0xc6);
912 code_t* abc_swap(code_t*prev)
914 code_t*self = add_opcode(prev, 0x2b);
917 code_t* abc_throw(code_t*prev)
919 code_t*self = add_opcode(prev, 0x03);
922 code_t* abc_typeof(code_t*prev)
924 code_t*self = add_opcode(prev, 0x95);
927 code_t* abc_urshift(code_t*prev)
929 code_t*self = add_opcode(prev, 0xa7);
932 code_t* abc___break__(code_t*prev)
934 code_t*self = add_opcode(prev, 0xff);