/home/travis/build/MoarVM/MoarVM/src/core/coerce.h
Line | Count | Source |
1 | | /* Boolification. */ |
2 | | MVMint64 MVM_coerce_istrue_s(MVMThreadContext *tc, MVMString *str); |
3 | | void MVM_coerce_istrue(MVMThreadContext *tc, MVMObject *obj, MVMRegister *res_reg, |
4 | | MVMuint8 *true_addr, MVMuint8 *false_addr, MVMuint8 flip); |
5 | | |
6 | | /* Stringification. */ |
7 | | MVMString * MVM_coerce_i_s(MVMThreadContext *tc, MVMint64 i); |
8 | | MVMString * MVM_coerce_n_s(MVMThreadContext *tc, MVMnum64 n); |
9 | | void MVM_coerce_smart_stringify(MVMThreadContext *tc, MVMObject *obj, MVMRegister *res_reg); |
10 | | |
11 | | /* Numification. */ |
12 | | MVMint64 MVM_coerce_s_i(MVMThreadContext *tc, MVMString *s); |
13 | | MVMnum64 MVM_coerce_s_n(MVMThreadContext *tc, MVMString *s); |
14 | | void MVM_coerce_smart_numify(MVMThreadContext *tc, MVMObject *obj, MVMRegister *res_reg); |
15 | | MVMint64 MVM_coerce_simple_intify(MVMThreadContext *tc, MVMObject *obj); |
16 | | MVMObject* MVM_radix(MVMThreadContext *tc, MVMint64 radix, MVMString *str, MVMint64 offset, MVMint64 flag); |
17 | | |
18 | | /* Size of the int to string coercion cache (we cache 0 ..^ this). */ |
19 | 353k | #define MVM_INT_TO_STR_CACHE_SIZE 64 |
20 | | |
21 | | /* Objification */ |
22 | | void MVM_box_int(MVMThreadContext *tc, MVMint64 value, MVMObject *type, MVMRegister *dst); |
23 | | void MVM_box_num(MVMThreadContext *tc, MVMnum64 value, MVMObject *type, MVMRegister *dst); |
24 | | void MVM_box_str(MVMThreadContext *tc, MVMString *value, MVMObject *type, MVMRegister *dst); |
25 | | void MVM_box_uint(MVMThreadContext *tc, MVMuint64 value, MVMObject *type, MVMRegister *dst); |