- int count=0;
-
- while(s) {
- //TODO: take a look at the current scope stack, maybe
- // we can re-use something
- s = s->superclass;
- if(!s)
- break;
-
- multiname_t*s2 = sig2mname(s);
- __ getlex2(m, s2);
- multiname_destroy(s2);
-
- __ pushscope(m); count++;
- m->code = m->code->prev->prev; // invert
- }
- /* continue appending after last op end */
- while(m->code && m->code->next) m->code = m->code->next;
-
- /* TODO: if this is one of *our* classes, we can also
- do a getglobalscope/getslot <nr> (which references
- the init function's slots) */
- if(extends2) {
- __ getlex2(m, extends2);
- __ dup(m);
- /* notice: we get a Verify Error #1107 if the top elemnt on the scope
- stack is not the superclass */
- __ pushscope(m);count++;
- } else {
- __ pushnull(m);
- /* notice: we get a verify error #1107 if the top element on the scope
- stack is not the global object */
- __ getlocal_0(m);
- __ pushscope(m);count++;
- }
- __ newclass(m,state->cls->abc);
- while(count--) {
- __ popscope(m);
- }
- __ setslot(m, slotindex);
-
- /* flash.display.MovieClip handling */
- if(!as3_globalclass && (flags&FLAG_PUBLIC) && classinfo_equals(registry_getMovieClip(),extends)) {
- if(state->package && state->package[0]) {
- as3_globalclass = concat3(state->package, ".", classname);
+ int count=0;
+
+ while(s) {
+ //TODO: take a look at the current scope stack, maybe
+ // we can re-use something
+ s = s->superclass;
+ if(!s)
+ break;
+
+ multiname_t*s2 = sig2mname(s);
+ __ getlex2(m, s2);
+ multiname_destroy(s2);
+
+ __ pushscope(m); count++;
+ m->code = m->code->prev->prev; // invert
+ }
+ /* continue appending after last op end */
+ while(m->code && m->code->next) m->code = m->code->next;
+
+ /* TODO: if this is one of *our* classes, we can also
+ do a getglobalscope/getslot <nr> (which references
+ the init function's slots) */
+ if(extends2) {
+ __ getlex2(m, extends2);
+ __ dup(m);
+ /* notice: we get a Verify Error #1107 if the top elemnt on the scope
+ stack is not the superclass */
+ __ pushscope(m);count++;