+static void function_initvars(params_t*params, int flags)
+{
+ if(state->method->inner)
+ new_variable("this", 0, 0);
+ else if(!state->method->is_global)
+ new_variable((flags&FLAG_STATIC)?"class":"this", state->cls->info, 0);
+ else
+ new_variable("globalscope", 0, 0);
+
+ param_list_t*p=0;
+ for(p=params->list;p;p=p->next) {
+ new_variable(p->param->name, p->param->type, 0);
+ }
+
+ methodstate_list_t*l = state->method->innerfunctions;
+ while(l) {
+ methodstate_t*m = l->methodstate;
+ m->var_index = new_variable(m->info->name, TYPE_FUNCTION(m->info), 0);
+ l = l->next;
+ }
+}
+