mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 04:41:37 +03:00
Added vase and stack trace wrapper to input, run hoo in virutalization
This commit is contained in:
parent
f8406bc723
commit
4e007635b1
@ -1037,28 +1037,28 @@ _cw_eval_commence(c3_i argc, c3_c* argv[])
|
||||
}
|
||||
|
||||
printf("executing hoon\n");
|
||||
u3_noun res = u3v_wish(evl_c);
|
||||
u3m_p("Hoon Output",res);
|
||||
c3_c* inp_c;
|
||||
c3_i ret_i = asprintf(&inp_c, "%%- sell !> \n%s", evl_c);
|
||||
c3_assert( ret_i > 0 );
|
||||
|
||||
/*u3_noun bus = u3i_word(55);
|
||||
u3_noun fol = u3i_trel(u3i_word(4),
|
||||
u3i_word(0),
|
||||
u3i_word(1));
|
||||
|
||||
u3_noun cons = u3nc(bus, fol);
|
||||
|
||||
u3_noun res = u3m_soft(0, virt_nock, u3k(cons));
|
||||
u3_noun res = u3m_soft(0, u3v_wish_n, u3i_string(inp_c));
|
||||
|
||||
|
||||
if(0 == u3h(res)){
|
||||
u3m_p("", cons);
|
||||
u3m_p("", u3t(res));
|
||||
u3m_grab(res, cons, u3_none);
|
||||
u3_pier_tank(0,0,u3k(u3t(res)));
|
||||
|
||||
//u3m_p("", cons);
|
||||
//u3m_p("", u3t(res));
|
||||
//u3m_grab(res, cons, u3_none);
|
||||
}else{
|
||||
printf("error\n");
|
||||
u3_pier_punt_goof("error", u3k(res));
|
||||
}
|
||||
u3z(res);
|
||||
u3z(cons);*/
|
||||
printf("finishing");
|
||||
free(inp_c);
|
||||
|
||||
printf("finishing\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,6 +57,11 @@
|
||||
u3_noun
|
||||
u3v_do(const c3_c* txt_c, u3_noun arg);
|
||||
|
||||
/* u3v_wish_n(): text expression with cache.
|
||||
*/
|
||||
u3_noun
|
||||
u3v_wish_n(const u3_noun txt);
|
||||
|
||||
/* u3v_wish(): text expression with cache.
|
||||
*/
|
||||
u3_noun
|
||||
|
@ -107,6 +107,31 @@ _cv_nock_wish(u3_noun txt)
|
||||
return pro;
|
||||
}
|
||||
|
||||
/* u3v_wish(): text expression with cache.
|
||||
*/
|
||||
u3_noun
|
||||
u3v_wish_n(u3_noun txt)
|
||||
{
|
||||
u3t_event_trace("u3v_wish", 'b');
|
||||
u3_weak exp = u3kdb_get(u3k(u3A->yot), u3k(txt));
|
||||
|
||||
if ( u3_none == exp ) {
|
||||
exp = _cv_nock_wish(u3k(txt));
|
||||
|
||||
// It's probably not a good idea to use u3v_wish()
|
||||
// outside the top level... (as the result is uncached)
|
||||
//
|
||||
if ( u3R == &u3H->rod_u ) {
|
||||
u3A->yot = u3kdb_put(u3A->yot, u3k(txt), u3k(exp));
|
||||
}
|
||||
}
|
||||
|
||||
u3t_event_trace("u3v_wish", 'e');
|
||||
|
||||
u3z(txt);
|
||||
return exp;
|
||||
}
|
||||
|
||||
/* u3v_wish(): text expression with cache.
|
||||
*/
|
||||
u3_noun
|
||||
|
Loading…
Reference in New Issue
Block a user