ire4ever1190 / mike

The new and improved mikero web framework
35 stars 1 forks source link

Fix strtabs issue #49

Closed ire4ever1190 closed 6 days ago

ire4ever1190 commented 1 week ago

Looking at this code (Where I removed irrelevant statements it seems the issue is with the macro not initialising anything

tyOpenArray__WVNPwuOnFGyv6YyGQCJcew T1_;    tyObject_StringTableObj__G9bbVxRU175fg9b8kuOtTHAQ* T2_;
#line 51 FX_191
        // T1 is accessed here, but it hasn't been initialised
    T2_ = NIM_NIL;  T2_ = nstnewStringTableWithTableConstr(T1_.Field0, T1_.Field1, ((tyEnum_StringTableMode__INi19a0eFz0QzSJHG0kXv9bg)0));  if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZstrtabs_u524(T2_); goto BeforeRet_;}  renameTableX60gensym0___test83tatic70iles_u14 = T2_;
#line 56 FX_191

Which leads to a nil access error when running the public files test.

Currently my fix is a major hack (It depends on T1_ being zero'd) but it atleast fixes the issue for now. Will need to track down why the compilers codegen is breaking