diff options
Diffstat (limited to 'vere')
-rw-r--r-- | vere/pkg/noun/nock.c | 15 | ||||
-rw-r--r-- | vere/pkg/vere/solid_boot_test.c | 70 |
2 files changed, 25 insertions, 60 deletions
diff --git a/vere/pkg/noun/nock.c b/vere/pkg/noun/nock.c index 8de6d7e..959ec96 100644 --- a/vere/pkg/noun/nock.c +++ b/vere/pkg/noun/nock.c @@ -2920,12 +2920,23 @@ static u3_noun _n_burn_on(u3_noun bus, u3_noun fol) { static c3_w burn_count = 0; - if ( burn_count < 30 ) { + if ( burn_count < 500 ) { // Increased to 500 to capture solid pill boot u3_noun hib = u3h(fol); if ( c3y == u3du(hib) ) { u3l_log("[C-Burn:%u] cell-cell formula", burn_count); } else { u3l_log("[C-Burn:%u] opcode %u", burn_count, hib); + // For call #1, dump more details + if ( burn_count == 1 ) { + u3_noun gal = u3t(fol); + u3l_log("[C-Burn:1-DEBUG] gal is %s", (c3y == u3du(gal)) ? "cell" : "atom"); + if ( c3y == u3du(gal) ) { + u3_noun gal_h = u3h(gal); + u3l_log("[C-Burn:1-DEBUG] head(gal) is %s, val=%u", + (c3y == u3du(gal_h)) ? "cell" : "atom", + (c3y == u3du(gal_h)) ? u3h(gal_h) : gal_h); + } + } } burn_count++; } @@ -2944,7 +2955,7 @@ u3n_nock_on(u3_noun bus, u3_noun fol) u3_noun pro; static c3_w call_count = 0; - if ( call_count < 10 ) { + if ( call_count < 100 ) { // Increased to 100 u3l_log(">>> u3n_nock_on call #%u <<<", call_count); call_count++; } diff --git a/vere/pkg/vere/solid_boot_test.c b/vere/pkg/vere/solid_boot_test.c index 00078ee..1d5c11d 100644 --- a/vere/pkg/vere/solid_boot_test.c +++ b/vere/pkg/vere/solid_boot_test.c @@ -255,71 +255,25 @@ static void _setup(void) { - c3_d len_d = u3_Ivory_pill_len; - c3_y* byt_y = u3_Ivory_pill; - u3_cue_xeno* sil_u; - u3_weak pil; - u3C.wag_w |= u3o_hashless; - u3m_boot_lite(1 << 26); - // this follows king.c - sil_u = u3s_cue_xeno_init_with(ur_fib27, ur_fib28); - if ( u3_none == (pil = u3s_cue_xeno_with(sil_u, len_d, byt_y)) ) { - printf("*** fail _setup 1\n"); - exit(1); - } - - u3l_log("embed_pil_is_atom %u", u3a_is_atom(pil)); - u3_noun local_pil = u3m_file("/home/y/code/urbit/vere/ocaml/solid.pill"); - u3_noun cued_pil = u3ke_cue(local_pil); - - u3l_log("local_pil_is_atom %u", u3a_is_atom(local_pil)); - u3l_log("cued_pil_is_atom %u", u3a_is_atom(cued_pil)); - - c3_d len_pp; - { - u3_noun len = u3qb_lent(pil); - u3_assert( c3y == u3r_safe_chub(len, &len_pp) ); - u3z(len); - } - u3l_log("embedded pill length %llu", (unsigned long long)len_pp); - c3_d len_pp2; - { - u3_noun len = u3qb_lent(cued_pil); - u3_assert( c3y == u3r_safe_chub(len, &len_pp2) ); - u3z(len); - } - u3l_log("file_pill_length %llu", (unsigned long long)len_pp2); + u3m_boot_lite(1 << 28); // 256MB loom for solid pill - // 1. Direct equality check - c3_o match = u3r_sing(pil, cued_pil); - u3l_log("pills equal: %u", match); + // Load OCaml's ivory.pill file instead of embedded + u3l_log("Loading ivory.pill from OCaml directory..."); + u3_noun ivory_jammed = u3m_file("/home/y/code/urbit/vere/ocaml/ivory.pill"); + u3l_log("Cuing ivory.pill..."); + u3_noun pil = u3ke_cue(ivory_jammed); + // Don't free ivory_jammed - it's managed by u3m_file - // 2. Compare mugs (32-bit hashes) - u3l_log("embedded mug: %x", u3r_mug(pil)); - u3l_log("file mug: %x", u3r_mug(cued_pil)); - - // 3. If they're cells, compare heads - if ( c3y == u3a_is_cell(pil) && c3y == u3a_is_cell(cued_pil) ) { - u3l_log("head mug embedded: %x", u3r_mug(u3h(pil))); - u3l_log("head mug file: %x", u3r_mug(u3h(cued_pil))); - } + u3l_log("ivory_pil is_atom: %u", u3a_is_atom(pil)); - // 4. Jam both and compare sizes - u3_noun jam1 = u3qe_jam(pil); - u3_noun jam2 = u3qe_jam(cued_pil); - u3l_log("jammed embedded: %u met", u3r_met(3, jam1)); - u3l_log("jammed file: %u met", u3r_met(3, jam2)); - u3l_log("jams equal: %u", u3r_sing(jam1, jam2)); - u3z(jam1); u3z(jam2); - - - // - u3s_cue_xeno_done(sil_u); + // Boot with ivory pill + u3l_log("Booting with ivory.pill from OCaml..."); if ( c3n == u3v_boot_lite(pil) ) { - printf("*** fail _setup 2\n"); + printf("*** fail: ivory boot failed\n"); exit(1); } + u3l_log("✓ Ivory boot completed!"); } /* _test_lily(): test small noun parsing. |