diff --git a/lib/comp.c b/lib/comp.c index 4e27f1e..f6372d3 100644 --- a/lib/comp.c +++ b/lib/comp.c @@ -1517,6 +1517,7 @@ static int compile_cons_xlist_expression (hcl_t* hcl, hcl_oop_t obj) if (HCL_IS_CONS_CONCODED(hcl,obj,HCL_CONCODE_EXPLIST)) { + /* nothing to patch */ } else { @@ -1526,6 +1527,11 @@ static int compile_cons_xlist_expression (hcl_t* hcl, hcl_oop_t obj) cf->operand = HCL_SMOOI_TO_OOP(nargs); } } + /* TODO:??? else if (HCL_IS_CONS_CONCODED(hcl, car, HCL_CONCODE_EXPLIST)) + { + HCL_ASSERT (hcl, hcl->option.trait & HCL_CLI_MODE); + SWITCH_TOP_CFRAME (hcl, COP_COMPILE_OBJECT, HCL_SMOOI_TO_OOP(0)); + } */ else { hcl_setsynerrbfmt (hcl, HCL_SYNERR_CALLABLE, HCL_NULL, HCL_NULL, "invalid callable %O in function call - %O", car, obj); /* error location */ diff --git a/lib/exec.c b/lib/exec.c index c3604a1..b26cf5d 100644 --- a/lib/exec.c +++ b/lib/exec.c @@ -1008,6 +1008,7 @@ static HCL_INLINE int call_primitive (hcl_t* hcl, hcl_ooi_t nargs) #include #include #include +#include extern char **environ; diff --git a/lib/hcl-s.h b/lib/hcl-s.h index fb1a38b..180e660 100644 --- a/lib/hcl-s.h +++ b/lib/hcl-s.h @@ -199,7 +199,6 @@ HCL_EXPORT void hcl_server_freemem ( ); - HCL_EXPORT int hcl_server_proto_feed_reply ( hcl_server_proto_t* proto, const hcl_ooch_t* ptr, diff --git a/lib/work.txt b/lib/work.txt new file mode 100644 index 0000000..3aa4a2a --- /dev/null +++ b/lib/work.txt @@ -0,0 +1,75 @@ +(ls -laF @((pwd) (pwd) (pwd))) +2018-08-08 00:32:16 +0900 000000 push_literal @0 +2018-08-08 00:32:16 +0900 000001 push_literal @1 +2018-08-08 00:32:16 +0900 000002 push_literal @2 +2018-08-08 00:32:16 +0900 000003 call 0 pwd +2018-08-08 00:32:16 +0900 000004 push_literal @2 +2018-08-08 00:32:16 +0900 000005 call 0 pwd +2018-08-08 00:32:16 +0900 000006 push_literal @2 +2018-08-08 00:32:16 +0900 000007 call 0 pwd +2018-08-08 00:32:16 +0900 000008 call 2 +2018-08-08 00:32:16 +0900 000009 pop_stacktop +2018-08-08 00:32:16 +0900 @0 ls +2018-08-08 00:32:16 +0900 @1 -laF +2018-08-08 00:32:16 +0900 @2 pwd + + + + +(ls -laF @((echo qq) (echo jj) (echo -n cc))) +2018-08-08 00:57:55 +0900 000000 push_literal @0 +2018-08-08 00:57:55 +0900 000001 push_literal @1 +2018-08-08 00:57:55 +0900 000002 push_literal @2 +2018-08-08 00:57:55 +0900 000003 push_literal @3 +2018-08-08 00:57:55 +0900 000004 call 1 echo qq +2018-08-08 00:57:55 +0900 000005 push_literal @2 +2018-08-08 00:57:55 +0900 000006 push_literal @4 +2018-08-08 00:57:55 +0900 000007 call 1 echo jj +2018-08-08 00:57:55 +0900 000008 push_literal @2 +2018-08-08 00:57:55 +0900 000009 push_literal @5 +2018-08-08 00:57:55 +0900 000010 push_literal @6 +2018-08-08 00:57:55 +0900 000011 call 2 echo -n cc +2018-08-08 00:57:55 +0900 000012 call 2 ls -laF .... +2018-08-08 00:57:55 +0900 000013 pop_stacktop +2018-08-08 00:57:55 +0900 @0 ls +2018-08-08 00:57:55 +0900 @1 -laF +2018-08-08 00:57:55 +0900 @2 echo +2018-08-08 00:57:55 +0900 @3 qq +2018-08-08 00:57:55 +0900 @4 jj +2018-08-08 00:57:55 +0900 @5 -n +2018-08-08 00:57:55 +0900 @6 cc + + + +(ls -laF @((@((pwd))))) + + + +ls -laF ( + ( + pwd + ps -ef + ) +) ====> (ls -laF @( + ( + @( + (pwd) + (ps -ef) + ) + ) + ) + ) + + + +ls -laF ( + ( + pwd + ps -ef + ) -qq +) ===========> (ls -laF @( + ( + @((pwd) (ps -ef)) -qq + ) + ) + )