Skip to content
This repository
tag: RELEASE_0_5_3
Fetching contributors…

Cannot retrieve contributors at this time

file 378 lines (277 sloc) 11.575 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
# $Id$
# [MAIN] #default section name

# MMD_EQ ... MMD_STRCMP must be in one block
# see src/mmd.c

# INPLACE MMD variant must always be normal op + 1

void init()
# init must be first for JITed vtable meths
void init_pmc(PMC* initializer)
PMC* instantiate(PMC* sig)
PMC* new_from_string(STRING* rep, INTVAL flags)
void morph(INTVAL type) :write
void mark()
void destroy()
PMC* pmc_namespace()

# XXX FIXME should this be marked as writing?
PMC* getprop(STRING* key)
void setprop(STRING* key, PMC* value)
void delprop(STRING* key)
PMC* getprops()

INTVAL type()
INTVAL type_keyed(PMC* key)
INTVAL type_keyed_int(INTVAL key)
INTVAL type_keyed_str(STRING* key)

UINTVAL subtype(INTVAL type)

STRING* name()

PMC* clone()
PMC* clone_pmc(PMC* args)

PMC* find_method(STRING* method_name)

[FETCH]
INTVAL get_integer()
INTVAL get_integer_keyed(PMC* key)
INTVAL get_integer_keyed_int(INTVAL key)
INTVAL get_integer_keyed_str(STRING* key)

FLOATVAL get_number()
FLOATVAL get_number_keyed(PMC* key)
FLOATVAL get_number_keyed_int(INTVAL key)
FLOATVAL get_number_keyed_str(STRING* key)

PMC* get_bignum()

STRING* get_string()
STRING* get_repr()
STRING* get_string_keyed(PMC* key)
STRING* get_string_keyed_int(INTVAL key)
STRING* get_string_keyed_str(STRING* key)

INTVAL get_bool()

PMC* get_pmc()
PMC* get_pmc_keyed(PMC* key)
PMC* get_pmc_keyed_int(INTVAL key)
PMC* get_pmc_keyed_str(STRING* key)
PMC* slice(PMC* key, INTVAL flag)

void* get_pointer()
void* get_pointer_keyed(PMC* key)
void* get_pointer_keyed_int(INTVAL key)
void* get_pointer_keyed_str(STRING* key)

[STORE] :write
void set_integer_native(INTVAL value)
void set_integer_same(PMC* value)
void set_integer_keyed(PMC* key, INTVAL value)
void set_integer_keyed_int(INTVAL key, INTVAL value)
void set_integer_keyed_str(STRING* key, INTVAL value)

void set_number_native(FLOATVAL value)
void set_number_same(PMC* value)
void set_number_keyed(PMC* key, FLOATVAL value)
void set_number_keyed_int(INTVAL key, FLOATVAL value)
void set_number_keyed_str(STRING* key, FLOATVAL value)

void set_bignum_int(INTVAL value)
void set_bignum_num(FLOATVAL value)
void set_bignum_str(STRING* value)

void set_string_native(STRING* value)
void assign_string_native(STRING* value)
void set_string_same(PMC* value)
void set_string_keyed(PMC* key, STRING* value)
void set_string_keyed_int(INTVAL key, STRING* value)
void set_string_keyed_str(STRING* key, STRING* value)

void set_bool(INTVAL value)

void set_pmc(PMC* value)
void assign_pmc(PMC* value)
void set_pmc_keyed(PMC* key, PMC* value)
void set_pmc_keyed_int(INTVAL key, PMC* value)
void set_pmc_keyed_str(STRING* key, PMC* value)

void set_pointer(void* value)
void set_pointer_keyed(PMC* key, void* value)
void set_pointer_keyed_int(INTVAL key, void* value)
void set_pointer_keyed_str(STRING* key, void* value)

[FETCHSIZE]
INTVAL elements()

[POP] :write
INTVAL pop_integer()
FLOATVAL pop_float()
STRING* pop_string()
PMC* pop_pmc()

[PUSH] :write
void push_integer(INTVAL value)
void push_float(FLOATVAL value)
void push_string(STRING* value)
void push_pmc(PMC* value)

[SHIFT] :write
INTVAL shift_integer()
FLOATVAL shift_float()
STRING* shift_string()
PMC* shift_pmc()

[UNSHIFT] :write
void unshift_integer(INTVAL value)
void unshift_float(FLOATVAL value)
void unshift_string(STRING* value)
void unshift_pmc(PMC* value)

## void splice ???

[SPLICE] :write
void splice(PMC* value, INTVAL offset, INTVAL count)

# XXX marking writing here?
[MATH]
PMC* add(PMC* value, PMC* dest) MMD_ADD
PMC* add_int(INTVAL value, PMC* dest) MMD_ADD_INT
PMC* add_float(FLOATVAL value, PMC* dest) MMD_ADD_FLOAT

void i_add(PMC* value) MMD_I_ADD
void i_add_int(INTVAL value) MMD_I_ADD_INT
void i_add_float(FLOATVAL value) MMD_I_ADD_FLOAT

PMC* subtract(PMC* value, PMC* dest) MMD_SUBTRACT
PMC* subtract_int(INTVAL value, PMC* dest) MMD_SUBTRACT_INT
PMC* subtract_float(FLOATVAL value, PMC* dest) MMD_SUBTRACT_FLOAT

void i_subtract(PMC* value) MMD_I_SUBTRACT
void i_subtract_int(INTVAL value) MMD_I_SUBTRACT_INT
void i_subtract_float(FLOATVAL value) MMD_I_SUBTRACT_FLOAT

PMC* multiply(PMC* value, PMC* dest) MMD_MULTIPLY
PMC* multiply_int(INTVAL value, PMC* dest) MMD_MULTIPLY_INT
PMC* multiply_float(FLOATVAL value, PMC* dest) MMD_MULTIPLY_FLOAT

void i_multiply(PMC* value) MMD_I_MULTIPLY
void i_multiply_int(INTVAL value) MMD_I_MULTIPLY_INT
void i_multiply_float(FLOATVAL value) MMD_I_MULTIPLY_FLOAT

PMC* divide(PMC* value, PMC* dest) MMD_DIVIDE
PMC* divide_int(INTVAL value, PMC* dest) MMD_DIVIDE_INT
PMC* divide_float(FLOATVAL value, PMC* dest) MMD_DIVIDE_FLOAT

void i_divide(PMC* value) MMD_I_DIVIDE
void i_divide_int(INTVAL value) MMD_I_DIVIDE_INT
void i_divide_float(FLOATVAL value) MMD_I_DIVIDE_FLOAT

PMC* floor_divide(PMC* value, PMC* dest) MMD_FLOOR_DIVIDE
PMC* floor_divide_int(INTVAL value, PMC* dest) MMD_FLOOR_DIVIDE_INT
PMC* floor_divide_float(FLOATVAL value, PMC* dest) MMD_FLOOR_DIVIDE_FLOAT

void i_floor_divide(PMC* value) MMD_I_FLOOR_DIVIDE
void i_floor_divide_int(INTVAL value) MMD_I_FLOOR_DIVIDE_INT
void i_floor_divide_float(FLOATVAL value) MMD_I_FLOOR_DIVIDE_FLOAT

PMC* modulus(PMC* value, PMC* dest) MMD_MOD
PMC* modulus_int(INTVAL value, PMC* dest) MMD_MOD_INT
PMC* modulus_float(FLOATVAL value, PMC* dest) MMD_MOD_FLOAT

void i_modulus(PMC* value) MMD_I_MOD
void i_modulus_int(INTVAL value) MMD_I_MOD_INT
void i_modulus_float(FLOATVAL value) MMD_I_MOD_FLOAT

PMC* cmodulus(PMC* value, PMC* dest) MMD_CMOD
PMC* cmodulus_int(INTVAL value, PMC* dest) MMD_CMOD_INT
PMC* cmodulus_float(FLOATVAL value, PMC* dest) MMD_CMOD_FLOAT

void i_cmodulus(PMC* value) MMD_I_CMOD
void i_cmodulus_int(INTVAL value) MMD_I_CMOD_INT
void i_cmodulus_float(FLOATVAL value) MMD_I_CMOD_FLOAT

PMC* pow(PMC* value, PMC* dest) MMD_POW
PMC* pow_int(INTVAL value, PMC* dest) MMD_POW_INT
PMC* pow_float(FLOATVAL value, PMC* dest) MMD_POW_FLOAT

void i_pow(PMC* value) MMD_I_POW
void i_pow_int(INTVAL value) MMD_I_POW_INT
void i_pow_float(FLOATVAL value) MMD_I_POW_FLOAT

void increment() :write
void decrement() :write

PMC* absolute(PMC* dest)
void i_absolute() :write

PMC* neg(PMC* dest)
void i_neg() :write

[BITWISE]
PMC* bitwise_or(PMC* value, PMC* dest) MMD_BOR
PMC* bitwise_or_int(INTVAL value, PMC* dest) MMD_BOR_INT

void i_bitwise_or(PMC* value) MMD_I_BOR
void i_bitwise_or_int(INTVAL value) MMD_I_BOR_INT

PMC* bitwise_and(PMC* value, PMC* dest) MMD_BAND
PMC* bitwise_and_int(INTVAL value, PMC* dest) MMD_BAND_INT

void i_bitwise_and(PMC* value) MMD_I_BAND
void i_bitwise_and_int(INTVAL value) MMD_I_BAND_INT

PMC* bitwise_xor(PMC* value, PMC* dest) MMD_BXOR
PMC* bitwise_xor_int(INTVAL value, PMC* dest) MMD_BXOR_INT

void i_bitwise_xor(PMC* value) MMD_I_BXOR
void i_bitwise_xor_int(INTVAL value) MMD_I_BXOR_INT

PMC* bitwise_ors(PMC* value, PMC* dest) MMD_SOR
PMC* bitwise_ors_str(STRING* value, PMC* dest) MMD_SOR_STR

void i_bitwise_ors(PMC* value) MMD_I_SOR
void i_bitwise_ors_str(STRING* value) MMD_I_SOR_STR

PMC* bitwise_ands(PMC* value, PMC* dest) MMD_SAND
PMC* bitwise_ands_str(STRING* value, PMC* dest) MMD_SAND_STR

void i_bitwise_ands(PMC* value) MMD_I_SAND
void i_bitwise_ands_str(STRING* value) MMD_I_SAND_STR

PMC* bitwise_xors(PMC* value, PMC* dest) MMD_SXOR
PMC* bitwise_xors_str(STRING* value, PMC* dest) MMD_SXOR_STR

void i_bitwise_xors(PMC* value) MMD_I_SXOR
void i_bitwise_xors_str(STRING* value) MMD_I_SXOR_STR

PMC* bitwise_not(PMC* dest)
void i_bitwise_not() :write

PMC* bitwise_nots(PMC* dest)
void i_bitwise_nots() :write

PMC* bitwise_shl(PMC* value, PMC* dest) MMD_BSL
PMC* bitwise_shl_int(INTVAL value, PMC* dest) MMD_BSL_INT

void i_bitwise_shl(PMC* value) MMD_I_BSL
void i_bitwise_shl_int(INTVAL value) MMD_I_BSL_INT

PMC* bitwise_shr(PMC* value, PMC* dest) MMD_BSR
PMC* bitwise_shr_int(INTVAL value, PMC* dest) MMD_BSR_INT

void i_bitwise_shr(PMC* value) MMD_I_BSR
void i_bitwise_shr_int(INTVAL value) MMD_I_BSR_INT

PMC* bitwise_lsr(PMC* value, PMC* dest) MMD_LSR
PMC* bitwise_lsr_int(INTVAL value, PMC* dest) MMD_LSR_INT

void i_bitwise_lsr(PMC* value) MMD_I_LSR
void i_bitwise_lsr_int(INTVAL value) MMD_I_LSR_INT

[CMP]
INTVAL is_equal(PMC* value) MMD_EQ
INTVAL is_equal_num(PMC* value) MMD_NUMEQ
INTVAL is_equal_string(PMC* value) MMD_STREQ

INTVAL is_same(PMC* value)

INTVAL cmp(PMC* value) MMD_CMP
INTVAL cmp_num(PMC* value) MMD_NUMCMP
INTVAL cmp_string(PMC* value) MMD_STRCMP

PMC* logical_or(PMC* value, PMC* dest) MMD_LOR

PMC* logical_and(PMC* value, PMC* dest) MMD_LAND

PMC* logical_xor(PMC* value, PMC* dest) MMD_LXOR

PMC* logical_not(PMC* dest)
void i_logical_not() :write


[STRING]
PMC* concatenate(PMC* value, PMC* dest) MMD_CONCAT
PMC* concatenate_str(STRING* value, PMC* dest) MMD_CONCAT_STR

void i_concatenate(PMC* value) MMD_I_CONCAT
void i_concatenate_str(STRING* value) MMD_I_CONCAT_STR

PMC* repeat(PMC* value, PMC* dest) MMD_REPEAT
PMC* repeat_int(INTVAL value, PMC* dest) MMD_REPEAT_INT

void i_repeat(PMC* value) MMD_I_REPEAT
void i_repeat_int(INTVAL value) MMD_I_REPEAT_INT

void substr(INTVAL offset, INTVAL length, PMC* dest)
STRING* substr_str(INTVAL offset, INTVAL length)

[EXISTS]
INTVAL exists_keyed(PMC* key)
INTVAL exists_keyed_int(INTVAL key)
INTVAL exists_keyed_str(STRING* key)

[MAIN]
INTVAL defined()
INTVAL defined_keyed(PMC* key)
INTVAL defined_keyed_int(INTVAL key)
INTVAL defined_keyed_str(STRING* key)

[DELETE] :write
void delete_keyed(PMC* key)
void delete_keyed_int(INTVAL key)
void delete_keyed_str(STRING* key)

[MAIN]
PMC* nextkey_keyed(PMC* key, INTVAL what)
PMC* nextkey_keyed_int(INTVAL key, INTVAL what)
PMC* nextkey_keyed_str(STRING* key, INTVAL what)
PMC* get_iter()

opcode_t* invoke(void* next)

INTVAL can(STRING* method)

INTVAL does(STRING* method)

INTVAL isa_pmc(PMC* lookup)
INTVAL isa(STRING* _class)

PMC* get_attr(INTVAL idx)
PMC* get_attr_str(STRING* idx)
PMC* get_attr_keyed(PMC* key, STRING* idx)
void set_attr(INTVAL idx, PMC* value) :write
void set_attr_str(STRING* idx, PMC* value) :write
void set_attr_keyed(PMC* key, STRING* idx, PMC* value) :write

PMC* get_class()

void add_parent(PMC* parent) :write
void remove_parent(PMC* parent) :write

void add_role(PMC* role) :write
void remove_role(PMC* role) :write

void add_attribute(STRING* name, PMC* type) :write
void remove_attribute(STRING* name) :write

void add_method(STRING* method_name, PMC* sub_pmc) :write
void remove_method(STRING* method_name) :write

void add_vtable_override(STRING* vtable_name, PMC* sub_pmc) :write
void remove_vtable_override(STRING* vtable_name) :write

PMC* inspect()
PMC* inspect_str(STRING* what)

void freeze(visit_info* info)
void thaw (visit_info* info) :write
void thawfinish (visit_info* info) :write
void visit (visit_info* info)

void share()

PMC* share_ro()
Something went wrong with that request. Please try again.