| ... | @@ -1218,6 +1218,10 @@ void zig_print_analysis_dump(CodeGen *g, FILE *f, const char *one_indent, const | ... | @@ -1218,6 +1218,10 @@ void zig_print_analysis_dump(CodeGen *g, FILE *f, const char *one_indent, const |
| 1218 | jw_object_field(jw, "rootPkg"); | 1218 | jw_object_field(jw, "rootPkg"); |
| 1219 | anal_dump_pkg_ref(&ctx, g->main_pkg); | 1219 | anal_dump_pkg_ref(&ctx, g->main_pkg); |
| 1220 | | 1220 | |
| | 1221 | // FIXME: Remove this ugly workaround. |
| | 1222 | // Right now the code in docs/main.js relies on the root of the main package being itself. |
| | 1223 | g->main_pkg->package_table.put(buf_create_from_str("root"), g->main_pkg); |
| | 1224 | |
| 1221 | // Poke the functions | 1225 | // Poke the functions |
| 1222 | for (size_t i = 0; i < g->fn_defs.length; i += 1) { | 1226 | for (size_t i = 0; i < g->fn_defs.length; i += 1) { |
| 1223 | ZigFn *fn = g->fn_defs.at(i); | 1227 | ZigFn *fn = g->fn_defs.at(i); |