1 /* 2 Ming, an SWF output library 3 Copyright (C) 2007 Klaus Rechert 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 20 #ifndef __ABCTYPES_H_ 21 #define __ABCTYPES_H_ 22 23 typedef enum { 24 __add = 0xa0, 25 __add_i = 0xc5, 26 __astype = 0x86, 27 __astypelate = 0x87, 28 __bitand = 0xa8, 29 __bitnot = 0x97, 30 __bitor = 0xa9, 31 __bitxor = 0xaa, 32 __call = 0x41, 33 __callmethod = 0x43, 34 __callproperty = 0x46, 35 __callproplex = 0x4c, 36 __callpropvoid = 0x4f, 37 __callstatic = 0x44, 38 __callsuper = 0x45, 39 __callsupervoid = 0x4e, 40 __checkfilter = 0x78, 41 __coerce = 0x80, 42 __coerce_a = 0x82, 43 __coerce_s = 0x85, 44 __construct = 0x42, 45 __constructprop = 0x4a, 46 __constructsuper= 0x49, 47 __convert_b = 0x76, 48 __convert_i = 0x73, 49 __convert_d = 0x75, 50 __convert_o = 0x77, 51 __convert_u = 0x74, 52 __convert_s = 0x70, 53 __debug = 0xef, 54 __debugfile = 0xf1, 55 __debugline = 0xf0, 56 __declocal = 0x94, 57 __declocal_i = 0xc3, 58 __decrement = 0x93, 59 __decrement_i = 0xc1, 60 __deleteproperty= 0x6a, 61 __divide = 0xa3, 62 __dup = 0x2a, 63 __dxns = 0x06, 64 __dxnslate = 0x07, 65 __equals = 0xab, 66 __esc_xattr = 0x72, 67 __esc_xelem = 0x71, 68 __findproperty = 0x5d, 69 __getdescendants= 0x59, 70 __getglobalscope= 0x64, 71 __getglobalslot = 0x6e, 72 __getlex = 0x60, 73 __getlocal = 0x62, 74 __getlocal_1 = 0xd0, 75 __getlocal_2 = 0xd1, 76 __getlocal_3 = 0xd2, 77 __getlocal_4 = 0xd3, 78 __getproperty = 0x66, 79 __getscopeobject= 0x65, 80 __getslot = 0x6c, 81 __getsuper = 0x04, 82 __greaterequals = 0x00, /* unknow */ 83 __greaterthan = 0xaf, 84 __hasnext = 0x1f, 85 __hasnext2 = 0x32, 86 __ifeq = 0x13, 87 __iffalse = 0x12, 88 __ifge = 0x18, 89 __ifgt = 0x17, 90 __ifle = 0x16, 91 __iflt = 0x15, 92 __ifnge = 0x0f, 93 __ifngt = 0x0e, 94 __ifnle = 0x0d, 95 __ifnlt = 0x0c, 96 __ifne = 0x14, 97 __ifstricteq = 0x19, 98 __ifstrictne = 0x1a, 99 __iftrue = 0x11, 100 __in = 0xb4, 101 __inclocal = 0x92, 102 __inclocal_i = 0xc2, 103 __increment = 0x91, 104 __increment_i = 0xc0, 105 __initproperty = 0x68, 106 __instanceof = 0xb1, 107 __istype = 0xb2, 108 __istypelate = 0xb3, 109 __jump = 0x10, 110 __kill = 0x08, 111 __label = 0x09, 112 __lessequals = 0xae, 113 __lessthan = 0xad, 114 __lookupswitch = 0x1b, 115 __lsshift = 0xa5, 116 __modulo = 0xa4, 117 __multiply = 0xa2, 118 __multiply_i = 0xc7, 119 __negate = 0x90, 120 __negate_i = 0xc4, 121 __newactivation = 0x57, 122 __newarray = 0x56, 123 __newcatch = 0x5a, 124 __newclass = 0x58, 125 __newfunction = 0x40, 126 __newobject = 0x55, 127 __nextname = 0x1e, 128 __nextvalue = 0x23, 129 __nop = 0x02, 130 __not = 0x96, 131 __pop = 0x29, 132 __popscope = 0x1d, 133 __pushbyte = 0x24, 134 __pushdouble = 0x2f, 135 __pushfalse = 0x27, 136 __pushint = 0x2d, 137 __pushnamespace = 0x31, 138 __pushnan = 0x28, 139 __pushnull = 0x20, 140 __pushscope = 0x30, 141 __pushshort = 0x25, 142 __pushstring = 0x2c, 143 __pushtrue = 0x26, 144 __pushuint = 0x2e, 145 __pushundefined = 0x21, 146 __pushwith = 0x1c, 147 __returnvalue = 0x48, 148 __returnvoid = 0x47, 149 __rshift = 0xa6, 150 __setlocal = 0x63, 151 __setlocal_0 = 0xd4, 152 __setlocal_1 = 0xd5, 153 __setlocal_2 = 0xd6, 154 __setlocal_3 = 0xd7, 155 __setglobalslot = 0x6f, 156 __setproperty = 0x61, 157 __setslot = 0x6d, 158 __setsuper = 0x05, 159 __strictequals = 0xac, 160 __subtract = 0xa1, 161 __subtract_i = 0xc6, 162 __swap = 0x2b, 163 __throw = 0x03, 164 __abc_typeof = 0x95, 165 __urshift = 0xa7, 166 } SWFAbcOpCode; 167 168 /* ABC Constants */ 169 #define ABC_CONST_QNAME 0x07 170 #define ABC_CONST_QNAME_A 0x0D 171 #define ABC_CONST_RTQNAME 0x0F 172 #define ABC_CONST_RTQNAME_A 0x10 173 #define ABC_CONST_RTQNAME_L 0x11 174 #define ABC_CONST_RTQNAME_LA 0x12 175 #define ABC_CONST_MULTINAME 0x09 176 #define ABC_CONST_MULTINAME_A 0x0E 177 #define ABC_CONST_MULTINAME_L 0x1B 178 #define ABC_CONST_MULTINAME_LA 0x1C 179 #define ABC_INT 0x03 180 #define ABC_UINT 0x04 181 #define ABC_DOUBLE 0x06 182 #define ABC_UTF8 0x01 183 #define ABC_TRUE 0x0B 184 #define ABC_FALSE 0x0A 185 #define ABC_NULL 0x0C 186 #define ABC_UNDEF 0x00 187 #define ABC_NAMESPACE 0x08 188 #define ABC_PACKAGE_NS 0x16 189 #define ABC_PACKAGE_INTERNAL_NS 0x17 190 #define ABC_PROTECTED_NS 0x18 191 #define ABC_EXPLICIT_NS 0x19 192 #define ABC_STATIC_PROTECTED_NS 0x1A 193 #define ABC_PRIVATE_NS 0x05 194 195 /* method_info flags */ 196 #define ABC_METHOD_NEED_ARGS 0x01 197 #define ABC_METHOD_NEED_ACTIVATION 0x02 198 #define ABC_METHOD_NEED_REST 0x04 199 #define ABC_METHOD_HAS_OPTIONAL 0x08 200 #define ABC_METHOD_SET_DXNS 0x40 201 #define ABC_METHOD_HAS_PARAM_NAMES 0x80 202 203 /* instance_info flags */ 204 #define ABC_CLASS_SEALED 0x01 205 #define ABC_CLASS_FINAL 0x02 206 #define ABC_CLASS_INTERFACE 0x04 207 #define ABC_CLASS_PROTECTED_NS 0x08 208 209 /* Trait Constants */ 210 #define ABC_CONST_TRAIT_SLOT 0x00 211 #define ABC_CONST_TRAIT_METHOD 0x01 212 #define ABC_CONST_TRAIT_GETTER 0x02 213 #define ABC_CONST_TRAIT_SETTER 0x03 214 #define ABC_CONST_TRAIT_CLASS 0x04 215 #define ABC_CONST_TRAIT_FUNCTION 0x05 216 #define ABC_CONST_TRAIT_CONST 0x06 217 218 #define ABC_TRAIT_ATTR_FINAL 0x01 219 #define ABC_TRAIT_ATTR_OVERRIDE 0x02 220 #define ABC_TRAIT_ATTR_METADATA 0x04 221 222 #endif 223