… | |
… | |
29 | along with gvpe; if not, write to the Free Software |
29 | along with gvpe; if not, write to the Free Software |
30 | Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
30 | Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
31 | */ |
31 | */ |
32 | |
32 | |
33 | #include <string> |
33 | #include <string> |
34 | #include <cstdint> |
34 | #include <inttypes.h> |
35 | |
35 | |
36 | namespace cpjit |
36 | namespace cpjit |
37 | { |
37 | { |
38 | |
38 | |
39 | typedef std::string idstr; |
39 | typedef std::string idstr; |
… | |
… | |
66 | typedef uint64_t U64; |
66 | typedef uint64_t U64; |
67 | typedef int64_t I64; |
67 | typedef int64_t I64; |
68 | typedef float F32; |
68 | typedef float F32; |
69 | typedef double F64; |
69 | typedef double F64; |
70 | |
70 | |
71 | template<> struct typestr<U8 > { static const char *str }; |
71 | template<> struct typestr<U8 > { static const char str[] }; |
72 | template<> struct typestr<U16 > { static const char *str }; |
72 | template<> struct typestr<U16 > { static const char str[] }; |
73 | template<> struct typestr<U32 > { static const char *str }; |
73 | template<> struct typestr<U32 > { static const char str[] }; |
74 | template<> struct typestr<U64 > { static const char *str }; |
74 | template<> struct typestr<U64 > { static const char str[] }; |
75 | template<> struct typestr<I8 > { static const char *str }; |
75 | template<> struct typestr<I8 > { static const char str[] }; |
76 | template<> struct typestr<I16 > { static const char *str }; |
76 | template<> struct typestr<I16 > { static const char str[] }; |
77 | template<> struct typestr<I32 > { static const char *str }; |
77 | template<> struct typestr<I32 > { static const char str[] }; |
78 | template<> struct typestr<I64 > { static const char *str }; |
78 | template<> struct typestr<I64 > { static const char str[] }; |
79 | template<> struct typestr<F32 > { static const char *str }; |
79 | template<> struct typestr<F32 > { static const char str[] }; |
80 | template<> struct typestr<F64 > { static const char *str }; |
80 | template<> struct typestr<F64 > { static const char str[] }; |
81 | template<> struct typestr<U8 *> { static const char *str }; |
81 | template<> struct typestr<U8 *> { static const char str[] }; |
82 | template<> struct typestr<U16 *> { static const char *str }; |
82 | template<> struct typestr<U16 *> { static const char str[] }; |
83 | template<> struct typestr<U32 *> { static const char *str }; |
83 | template<> struct typestr<U32 *> { static const char str[] }; |
84 | template<> struct typestr<U64 *> { static const char *str }; |
84 | template<> struct typestr<U64 *> { static const char str[] }; |
85 | template<> struct typestr<I8 *> { static const char *str }; |
85 | template<> struct typestr<I8 *> { static const char str[] }; |
86 | template<> struct typestr<I16 *> { static const char *str }; |
86 | template<> struct typestr<I16 *> { static const char str[] }; |
87 | template<> struct typestr<I32 *> { static const char *str }; |
87 | template<> struct typestr<I32 *> { static const char str[] }; |
88 | template<> struct typestr<I64 *> { static const char *str }; |
88 | template<> struct typestr<I64 *> { static const char str[] }; |
89 | template<> struct typestr<F32 *> { static const char *str }; |
89 | template<> struct typestr<F32 *> { static const char str[] }; |
90 | template<> struct typestr<F64 *> { static const char *str }; |
90 | template<> struct typestr<F64 *> { static const char str[] }; |
91 | |
91 | |
92 | template<typename R, typename A1> |
92 | template<typename R, typename A1> |
93 | struct function : func_base |
93 | struct function : func_base |
94 | { |
94 | { |
95 | function (env &e, const idstr &id) |
95 | function (env &e, const idstr &id) |