- /* retrieve the member info that we stored in the first pass.
- TODO: better getter/setter support? */
- if(!state->cls) state->method->info = registry_findclass(state->package, name)->function;
- else state->method->info = registry_findmember(state->cls->info, name, 0);
- state->method->info->return_type = return_type;
-
- global->variable_count = 0;
- /* state->vars is initialized by state_new */
- 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);
+ state->method = dict_lookup(global->token2info, (void*)(ptroff_t)as3_tokencount);
+ parserassert(state->method);
+
+ if(state->cls) {
+ state->cls->has_constructor |= state->method->is_constructor;