//typedef struct SpecialId_* SpecialId;
struct SpecialId_;
-typedef Type (*idck)(const Env, Exp_Primary*);
-typedef Instr (*idem)(const Emitter, Exp_Primary*);
+typedef Type (*idck)(const Env, const Exp_Primary*);
+typedef Instr (*idem)(const Emitter, const Exp_Primary*);
struct SpecialId_ {
Type type;
m_bool is_const;
};
-#define ID_CHECK(a) ANN Type a(const Env env NUSED, Exp_Primary* prim NUSED)
-#define ID_EMIT(a) ANN Instr a(const Emitter emit NUSED, Exp_Primary* prim NUSED)
+#define ID_CHECK(a) ANN Type a(const Env env NUSED, const Exp_Primary* prim NUSED)
+#define ID_EMIT(a) ANN Instr a(const Emitter emit NUSED, const Exp_Primary* prim NUSED)
ANN static inline Type specialid_type(const Env env,
struct SpecialId_ *spid, const Exp_Primary* prim) {
#include "gwion.h"
#include "operator.h"
#include "import.h"
+#include "emit.h"
#include "specialid.h"
static m_int o_fork_thread, o_shred_cancel, o_fork_done, o_fork_ev, o_fork_retsize, o_fork_retval,
#include "gwion.h"
#include "operator.h"
#include "import.h"
+#include "emit.h"
#include "specialid.h"
#include "func.h"
ANN Type prim_str(const Env, Exp_Primary *const);
ID_CHECK(check_funcpp) {
- prim->primary_type = ae_primary_str;
- prim->d.str = env->func ? env->func->name : env->class_def ?
+ ((Exp_Primary*)prim)->primary_type = ae_primary_str;
+ ((Exp_Primary*)prim)->d.str = env->func ? env->func->name : env->class_def ?
env->class_def->name : env->name;
- return prim_str(env, prim);
+ return prim_str(env, (Exp_Primary * const)prim);
}
GWION_IMPORT(string) {