picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 584b287f67db7faa66eedeab77bf681affeaa32a
parent 250674d243161243ee1a02d3b859c90634fd1c1d
Author: Alexander Burger <abu@software-lab.de>
Date:   Fri, 16 Nov 2012 11:59:45 +0100

Backtrace tuning
Diffstat:
Mdoc/refT.html | 10++++++----
Mlib/app.l | 3++-
Mlib/map | 46+++++++++++++++++++++++-----------------------
Msrc64/main.l | 28++++++++++++++++++----------
Msrc64/tags | 158++++++++++++++++++++++++++++++++++++++++----------------------------------------
5 files changed, 128 insertions(+), 117 deletions(-)

diff --git a/doc/refT.html b/doc/refT.html @@ -486,11 +486,13 @@ href="refD.html#*Dbg">*Dbg</a></code>. -> balance </code></pre> -<dt><a name="trail"><code>(trail) -> lst</code></a> +<dt><a name="trail"><code>(trail ['flg]) -> lst</code></a> <dd>(64-bit version only) Returns a stack backtrace for the current point of program execution, The list elements are either expressions (denoting function -or method calls), or symbols followed by their corresponding values. See also -<code><a href="refU.html#up">up</a></code> and <code><a +or method calls), or symbols followed by their corresponding values. If +<code>flg</code> is <code>NIL</code>, the symbol and their values are omitted, +and only the expressions are returned. See also <code><a +href="refU.html#up">up</a></code> and <code><a href="refE.html#env">env</a></code>. <pre><code> @@ -498,7 +500,7 @@ href="refE.html#env">env</a></code>. (g (inc A) (dec B)) ) -> f : (de g (X Y) - (trail) ) + (trail T) ) -> g : (f 3 4) -> ((f 3 4) A 3 B 4 (g (inc A) (dec B)) X 4 Y 3) diff --git a/lib/app.l b/lib/app.l @@ -1,8 +1,9 @@ -# 01apr12abu +# 16nov12abu # (c) Software Lab. Alexander Burger # Exit on error (de *Err + (and trail (println (trail T))) (prinl *Pid " ! " (stamp) " [" *Adr " " (host *Adr) "] " *Agent) (show This) (for "X" '(*Gate *Agent *Host *Port *PRG *Url *SesId *ConId *Tab *Gui *Btn *Get *ID) diff --git a/lib/map b/lib/map @@ -32,9 +32,9 @@ and (1624 . "@src64/flow.l") any (3974 . "@src64/io.l") append (1338 . "@src64/subr.l") apply (713 . "@src64/apply.l") -arg (2458 . "@src64/main.l") -args (2434 . "@src64/main.l") -argv (3081 . "@src64/main.l") +arg (2466 . "@src64/main.l") +args (2442 . "@src64/main.l") +argv (3089 . "@src64/main.l") as (139 . "@src64/flow.l") asoq (3008 . "@src64/subr.l") assoc (2973 . "@src64/subr.l") @@ -65,7 +65,7 @@ call (3096 . "@src64/flow.l") car (5 . "@src64/subr.l") case (1965 . "@src64/flow.l") catch (2467 . "@src64/flow.l") -cd (2833 . "@src64/main.l") +cd (2841 . "@src64/main.l") cdaaar (464 . "@src64/subr.l") cdaadr (487 . "@src64/subr.l") cdaar (179 . "@src64/subr.l") @@ -88,7 +88,7 @@ circ (816 . "@src64/subr.l") circ? (2402 . "@src64/subr.l") clip (1799 . "@src64/subr.l") close (4387 . "@src64/io.l") -cmd (3063 . "@src64/main.l") +cmd (3071 . "@src64/main.l") cnt (1413 . "@src64/apply.l") co (2548 . "@src64/flow.l") commit (1498 . "@src64/db.l") @@ -99,9 +99,9 @@ connect (224 . "@src64/net.l") cons (747 . "@src64/subr.l") copy (1225 . "@src64/subr.l") ctl (4260 . "@src64/io.l") -ctty (2858 . "@src64/main.l") +ctty (2866 . "@src64/main.l") cut (1922 . "@src64/sym.l") -date (2572 . "@src64/main.l") +date (2580 . "@src64/main.l") dbck (2113 . "@src64/db.l") de (532 . "@src64/flow.l") dec (2323 . "@src64/big.l") @@ -111,7 +111,7 @@ del (1977 . "@src64/sym.l") delete (1401 . "@src64/subr.l") delq (1452 . "@src64/subr.l") diff (2589 . "@src64/subr.l") -dir (2993 . "@src64/main.l") +dir (3001 . "@src64/main.l") dm (545 . "@src64/flow.l") do (2141 . "@src64/flow.l") e (2928 . "@src64/flow.l") @@ -120,7 +120,7 @@ env (599 . "@src64/main.l") eof (3533 . "@src64/io.l") eol (3524 . "@src64/io.l") err (4240 . "@src64/io.l") -errno (1460 . "@src64/main.l") +errno (1468 . "@src64/main.l") eval (175 . "@src64/flow.l") ext (5152 . "@src64/io.l") ext? (1157 . "@src64/sym.l") @@ -128,7 +128,7 @@ extern (1023 . "@src64/sym.l") extra (1269 . "@src64/flow.l") extract (1218 . "@src64/apply.l") fifo (2088 . "@src64/sym.l") -file (2940 . "@src64/main.l") +file (2948 . "@src64/main.l") fill (3243 . "@src64/subr.l") filter (1161 . "@src64/apply.l") fin (2033 . "@src64/subr.l") @@ -166,7 +166,7 @@ ifn (1865 . "@src64/flow.l") in (4200 . "@src64/io.l") inc (2256 . "@src64/big.l") index (2637 . "@src64/subr.l") -info (2895 . "@src64/main.l") +info (2903 . "@src64/main.l") intern (998 . "@src64/sym.l") ipid (3215 . "@src64/flow.l") isa (967 . "@src64/flow.l") @@ -183,7 +183,7 @@ lieu (1157 . "@src64/db.l") line (3708 . "@src64/io.l") lines (3861 . "@src64/io.l") link (1172 . "@src64/subr.l") -lisp (2129 . "@src64/main.l") +lisp (2137 . "@src64/main.l") list (887 . "@src64/subr.l") listen (157 . "@src64/net.l") lit (150 . "@src64/flow.l") @@ -222,10 +222,10 @@ n== (2087 . "@src64/subr.l") nT (2198 . "@src64/subr.l") name (502 . "@src64/sym.l") nand (1659 . "@src64/flow.l") -native (1468 . "@src64/main.l") +native (1476 . "@src64/main.l") need (919 . "@src64/subr.l") new (839 . "@src64/flow.l") -next (2441 . "@src64/main.l") +next (2449 . "@src64/main.l") nil (1742 . "@src64/flow.l") nond (1942 . "@src64/flow.l") nor (1680 . "@src64/flow.l") @@ -239,7 +239,7 @@ onOff (1738 . "@src64/sym.l") one (1771 . "@src64/sym.l") open (4344 . "@src64/io.l") opid (3231 . "@src64/flow.l") -opt (3184 . "@src64/main.l") +opt (3192 . "@src64/main.l") or (1640 . "@src64/flow.l") out (4220 . "@src64/io.l") pack (1270 . "@src64/sym.l") @@ -272,9 +272,9 @@ push (1813 . "@src64/sym.l") push1 (1849 . "@src64/sym.l") put (2835 . "@src64/sym.l") putl (3113 . "@src64/sym.l") -pwd (2822 . "@src64/main.l") +pwd (2830 . "@src64/main.l") queue (2045 . "@src64/sym.l") -quit (1170 . "@src64/main.l") +quit (1178 . "@src64/main.l") quote (134 . "@src64/flow.l") rand (3003 . "@src64/big.l") range (997 . "@src64/subr.l") @@ -283,7 +283,7 @@ raw (451 . "@src64/main.l") rd (5169 . "@src64/io.l") read (2665 . "@src64/io.l") replace (1499 . "@src64/subr.l") -rest (2487 . "@src64/main.l") +rest (2495 . "@src64/main.l") reverse (1678 . "@src64/subr.l") rewind (5135 . "@src64/io.l") rollback (1898 . "@src64/db.l") @@ -309,7 +309,7 @@ stem (1989 . "@src64/subr.l") str (4028 . "@src64/io.l") str? (1136 . "@src64/sym.l") strip (1576 . "@src64/subr.l") -struct (1920 . "@src64/main.l") +struct (1928 . "@src64/main.l") sub? (1569 . "@src64/sym.l") sum (1460 . "@src64/apply.l") super (1225 . "@src64/flow.l") @@ -325,7 +325,7 @@ text (1398 . "@src64/sym.l") throw (2493 . "@src64/flow.l") tick (3183 . "@src64/flow.l") till (3619 . "@src64/io.l") -time (2705 . "@src64/main.l") +time (2713 . "@src64/main.l") touch (1172 . "@src64/sym.l") trail (695 . "@src64/main.l") trim (1759 . "@src64/subr.l") @@ -335,13 +335,13 @@ udp (301 . "@src64/net.l") unify (3938 . "@src64/subr.l") unless (1901 . "@src64/flow.l") until (2085 . "@src64/flow.l") -up (752 . "@src64/main.l") +up (760 . "@src64/main.l") upp? (3393 . "@src64/sym.l") uppc (3460 . "@src64/sym.l") use (1573 . "@src64/flow.l") -usec (2810 . "@src64/main.l") +usec (2818 . "@src64/main.l") val (1588 . "@src64/sym.l") -version (3198 . "@src64/main.l") +version (3206 . "@src64/main.l") wait (3159 . "@src64/io.l") when (1884 . "@src64/flow.l") while (2061 . "@src64/flow.l") diff --git a/src64/main.l b/src64/main.l @@ -1,4 +1,4 @@ -# 15nov12abu +# 16nov12abu # (c) Software Lab. Alexander Burger (code 'Code) @@ -691,14 +691,18 @@ pop X ret -# (trail) -> lst +# (trail ['flg]) -> lst (code 'doTrail 2) - ld E Nil # Result push X push Y + push Z + ld E ((E CDR)) # Evaluate arg + eval + ld Z E # Keep 'flg' in Z ld X (EnvBind) # Bindings null (Break) # In breakpoint? ldnz X ((X)) # Yes: Skip frame + ld E Nil # Result do null X # Bindings? while nz # Yes @@ -720,13 +724,16 @@ break T end end - call cons_A # Cons value - ld (A) (Y) - ld (A CDR) E - call consA_E # Cons symbol - ld (E) Y - ld (E CDR) A - ld (Y) (X -I) # Set old value + cmp Z Nil # 'flg'? + if ne # Yes + call cons_A # Cons value + ld (A) (Y) + ld (A CDR) E + call consA_E # Cons symbol + ld (E) Y + ld (E CDR) A + ld (Y) (X -I) # Set old value + end cmp X C # More? until eq # No end @@ -744,6 +751,7 @@ ld X (X CDR) end loop + pop Z pop Y pop X ret diff --git a/src64/tags b/src64/tags @@ -427,12 +427,12 @@ badFdErrEX err.l 531 badInputErrB err.l 551 balanceCEY sym.l 910 balanceXY sym.l 892 -begString main.l 2396 +begString main.l 2404 binPrintEZ io.l 731 binReadZ_FE io.l 520 blkPeekCEZ db.l 392 blkPokeCEZ db.l 403 -boxE_E main.l 2364 +boxE_E main.l 2372 boxNumA_A gc.l 872 boxNumE_E gc.l 886 boxNum_A gc.l 824 @@ -448,37 +448,37 @@ byteNumBCX_CX io.l 464 byteSymBCX_CX io.l 1293 caseDataA_AC sym.l 3366 caught flow.l 2483 -cbl main.l 1998 -cbl1 main.l 2031 -cbl10 main.l 2067 -cbl11 main.l 2071 -cbl12 main.l 2075 -cbl13 main.l 2079 -cbl14 main.l 2083 -cbl15 main.l 2087 -cbl16 main.l 2091 -cbl17 main.l 2095 -cbl18 main.l 2099 -cbl19 main.l 2103 -cbl2 main.l 2035 -cbl20 main.l 2107 -cbl21 main.l 2111 -cbl22 main.l 2115 -cbl23 main.l 2119 -cbl24 main.l 2123 -cbl3 main.l 2039 -cbl4 main.l 2043 -cbl5 main.l 2047 -cbl6 main.l 2051 -cbl7 main.l 2055 -cbl8 main.l 2059 -cbl9 main.l 2063 +cbl main.l 2006 +cbl1 main.l 2039 +cbl10 main.l 2075 +cbl11 main.l 2079 +cbl12 main.l 2083 +cbl13 main.l 2087 +cbl14 main.l 2091 +cbl15 main.l 2095 +cbl16 main.l 2099 +cbl17 main.l 2103 +cbl18 main.l 2107 +cbl19 main.l 2111 +cbl2 main.l 2043 +cbl20 main.l 2115 +cbl21 main.l 2119 +cbl22 main.l 2123 +cbl23 main.l 2127 +cbl24 main.l 2131 +cbl3 main.l 2047 +cbl4 main.l 2051 +cbl5 main.l 2055 +cbl6 main.l 2059 +cbl7 main.l 2063 +cbl8 main.l 2067 +cbl9 main.l 2071 charSymACX_CX io.l 1258 checkVarAX err.l 371 checkVarEX err.l 387 checkVarYX err.l 379 chopExtNmX_E db.l 133 -circE_YF main.l 825 +circE_YF main.l 833 cleanUpY db.l 570 closeAX io.l 5 closeErrEX err.l 512 @@ -495,7 +495,7 @@ cmpuAE_F big.l 1587 cntErrAX err.l 424 cntErrCX err.l 426 cntErrEX err.l 428 -compareAE_F main.l 990 +compareAE_F main.l 998 consAC_E gc.l 786 consA_A gc.l 530 consA_C gc.l 594 @@ -534,7 +534,7 @@ ctOpenEXY io.l 1672 currFdX_C io.l 1335 currFd_C io.l 1339 cutLocalCX flow.l 2841 -dateXYZ_E main.l 2511 +dateXYZ_E main.l 2519 dbAEX db.l 1331 dbFetchEX db.l 1319 dbFileBlkY_AC db.l 246 @@ -564,9 +564,9 @@ doAnd flow.l 1624 doAny io.l 3974 doAppend subr.l 1338 doApply apply.l 713 -doArg main.l 2458 -doArgs main.l 2434 -doArgv main.l 3081 +doArg main.l 2466 +doArgs main.l 2442 +doArgv main.l 3089 doArrow subr.l 3916 doAs flow.l 139 doAsoq subr.l 3008 @@ -602,7 +602,7 @@ doCall flow.l 3096 doCar subr.l 5 doCase flow.l 1965 doCatch flow.l 2467 -doCd main.l 2833 +doCd main.l 2841 doCdaaar subr.l 464 doCdaadr subr.l 487 doCdaar subr.l 179 @@ -625,7 +625,7 @@ doCirc subr.l 816 doCircQ subr.l 2402 doClip subr.l 1799 doClose io.l 4387 -doCmd main.l 3063 +doCmd main.l 3071 doCnt apply.l 1413 doCo flow.l 2548 doCol sym.l 3051 @@ -637,9 +637,9 @@ doConnect net.l 224 doCons subr.l 747 doCopy subr.l 1225 doCtl io.l 4260 -doCtty main.l 2858 +doCtty main.l 2866 doCut sym.l 1922 -doDate main.l 2572 +doDate main.l 2580 doDbck db.l 2113 doDe flow.l 532 doDec big.l 2323 @@ -649,7 +649,7 @@ doDel sym.l 1977 doDelete subr.l 1401 doDelq subr.l 1452 doDiff subr.l 2589 -doDir main.l 2993 +doDir main.l 3001 doDiv big.l 2513 doDm flow.l 545 doDo flow.l 2141 @@ -663,7 +663,7 @@ doEq0 subr.l 2173 doEqT subr.l 2181 doEqual subr.l 2115 doErr io.l 4240 -doErrno main.l 1460 +doErrno main.l 1468 doEval flow.l 175 doExt io.l 5152 doExtQ sym.l 1157 @@ -671,7 +671,7 @@ doExtern sym.l 1023 doExtra flow.l 1269 doExtract apply.l 1218 doFifo sym.l 2088 -doFile main.l 2940 +doFile main.l 2948 doFill subr.l 3243 doFilter apply.l 1161 doFin subr.l 2033 @@ -712,7 +712,7 @@ doIfn flow.l 1865 doIn io.l 4200 doInc big.l 2256 doIndex subr.l 2637 -doInfo main.l 2895 +doInfo main.l 2903 doIntern sym.l 998 doIpid flow.l 3215 doIsa flow.l 967 @@ -730,7 +730,7 @@ doLieu db.l 1157 doLine io.l 3708 doLines io.l 3861 doLink subr.l 1172 -doLisp main.l 2129 +doLisp main.l 2137 doList subr.l 887 doListen net.l 157 doLit flow.l 150 @@ -773,10 +773,10 @@ doNEqT subr.l 2198 doNEqual subr.l 2144 doName sym.l 502 doNand flow.l 1659 -doNative main.l 1468 +doNative main.l 1476 doNeed subr.l 919 doNew flow.l 839 -doNext main.l 2441 +doNext main.l 2449 doNil flow.l 1742 doNond flow.l 1942 doNor flow.l 1680 @@ -790,7 +790,7 @@ doOnOff sym.l 1738 doOne sym.l 1771 doOpen io.l 4344 doOpid flow.l 3231 -doOpt main.l 3184 +doOpt main.l 3192 doOr flow.l 1640 doOut io.l 4220 doPack sym.l 1270 @@ -824,9 +824,9 @@ doPush sym.l 1813 doPush1 sym.l 1849 doPut sym.l 2835 doPutl sym.l 3113 -doPwd main.l 2822 +doPwd main.l 2830 doQueue sym.l 2045 -doQuit main.l 1170 +doQuit main.l 1178 doQuote flow.l 134 doRand big.l 3003 doRange subr.l 997 @@ -836,7 +836,7 @@ doRd io.l 5169 doRead io.l 2665 doRem big.l 2572 doReplace subr.l 1499 -doRest main.l 2487 +doRest main.l 2495 doReverse subr.l 1678 doRewind io.l 5135 doRollback db.l 1898 @@ -865,7 +865,7 @@ doStem subr.l 1989 doStr io.l 4028 doStrQ sym.l 1136 doStrip subr.l 1576 -doStruct main.l 1920 +doStruct main.l 1928 doSub big.l 2209 doSubQ sym.l 1569 doSum apply.l 1460 @@ -882,7 +882,7 @@ doText sym.l 1398 doThrow flow.l 2493 doTick flow.l 3183 doTill io.l 3619 -doTime main.l 2705 +doTime main.l 2713 doTouch sym.l 1172 doTrace flow.l 2967 doTrail main.l 695 @@ -893,13 +893,13 @@ doUdp net.l 301 doUnify subr.l 3938 doUnless flow.l 1901 doUntil flow.l 2085 -doUp main.l 752 +doUp main.l 760 doUppQ sym.l 3393 doUppc sym.l 3460 doUse flow.l 1573 -doUsec main.l 2810 +doUsec main.l 2818 doVal sym.l 1588 -doVersion main.l 3198 +doVersion main.l 3206 doWait io.l 3159 doWhen flow.l 1884 doWhile flow.l 2061 @@ -912,24 +912,24 @@ doYield flow.l 2720 doYoke subr.l 1196 doZap sym.l 1186 doZero sym.l 1756 -endString_E main.l 2407 +endString_E main.l 2415 eofErr err.l 540 eolA_F io.l 3693 -equalAE_F main.l 857 +equalAE_F main.l 865 erOpenEXY io.l 1630 errEXYZ err.l 33 errnoC sys/x86-64.linux.code.l 10 errnoEXY err.l 24 errno_A sys/x86-64.linux.code.l 5 -evCntEX_FE main.l 2335 -evCntXY_FE main.l 2333 -evExprCE_E main.l 1188 -evListE_E main.l 1336 +evCntEX_FE main.l 2343 +evCntXY_FE main.l 2341 +evExprCE_E main.l 1196 +evListE_E main.l 1344 evMethodACEXYZ_E flow.l 645 -evSymE_E main.l 2310 -evSymX_E main.l 2305 -evSymY_E main.l 2308 -execE main.l 2219 +evSymE_E main.l 2318 +evSymX_E main.l 2313 +evSymY_E main.l 2316 +execE main.l 2227 execErrS main.l 187 extErrEX err.l 440 extNmCE_X db.l 64 @@ -939,7 +939,7 @@ fdRdSetCZL io.l 2727 fdSetCL_X io.l 2715 fdSetC_Y io.l 3318 fdWrSetCZL io.l 2734 -fetchCharC_AC main.l 1963 +fetchCharC_AC main.l 1971 fileObjE_AC db.l 237 fileObjX_AC db.l 211 fillE_FE subr.l 3261 @@ -957,7 +957,7 @@ fmtWordACX_CX big.l 2046 forkErrX err.l 521 forkLispX_FE flow.l 3283 fsyncDB db.l 932 -funqE_FE main.l 2243 +funqE_FE main.l 2251 gc gc.l 65 getAdrZ_A db.l 6 getBinaryZ_FB io.l 448 @@ -999,7 +999,7 @@ isaCE_F flow.l 1018 jnlErrX err.l 624 jnlFileno_A db.l 344 joinLocalCX flow.l 2854 -lisp main.l 2173 +lisp main.l 2181 loadAllX_E main.l 162 loadBEX_E io.l 4081 lockErr err.l 613 @@ -1017,13 +1017,13 @@ main main.l 33 makeErrX err.l 477 markE gc.l 5 matchCE_F subr.l 3147 -memberXY_FY main.l 1152 +memberXY_FY main.l 1160 metaCX_E sym.l 3340 methodEY_FCYZ flow.l 795 mkCharA_A sym.l 573 mkStrEZ_A sym.l 650 mkStrE_E sym.l 623 -msec_A main.l 2421 +msec_A main.l 2429 msgErrAX err.l 494 msgErrEX err.l 496 msgErrYX err.l 492 @@ -1032,8 +1032,8 @@ nameA_A sym.l 469 nameE_E sym.l 477 nameX_X sym.l 485 nameY_Y sym.l 493 -natBufACZ_CZ main.l 1672 -natRetACE_CE main.l 1771 +natBufACZ_CZ main.l 1680 +natRetACE_CE main.l 1779 needC gc.l 54 needSymAX err.l 329 needSymEX err.l 341 @@ -1091,7 +1091,7 @@ putACE sym.l 2491 putBlockBZ db.l 612 putSrcEC_E flow.l 25 putStdoutB io.l 4631 -putStringB main.l 2384 +putStringB main.l 2392 putTellBZ io.l 997 putUdpBZ net.l 377 rdAtomBY_E io.l 2119 @@ -1128,7 +1128,7 @@ retnc err.l 716 retnz err.l 722 retz err.l 719 rewindLog db.l 928 -runE_E main.l 2231 +runE_E main.l 2239 rwUnlockDbA db.l 269 selectErrX err.l 564 serverCEY_FE net.l 273 @@ -1138,7 +1138,7 @@ setBlkAC_Z db.l 366 setBlockAC_Z db.l 364 setCooked main.l 443 setRaw main.l 417 -sharedLibC_FA main.l 1389 +sharedLibC_FA main.l 1397 shluA_A big.l 201 shruA_A big.l 247 sig main.l 344 @@ -1177,8 +1177,8 @@ tellErr err.l 652 tenfoldA_A big.l 157 testEscA_F io.l 2052 throwErrZX flow.l 2518 -tmDateC_E main.l 2501 -tmTimeY_E main.l 2688 +tmDateC_E main.l 2509 +tmTimeY_E main.l 2696 tokenCE_E io.l 2523 trSyncErrX err.l 608 traceCY flow.l 3039 @@ -1219,10 +1219,10 @@ wrOpenEXY io.l 1497 wrSetCL_F io.l 2746 wrSyncErrX err.l 581 wtermsigS_A sys/x86-64.linux.code.l 28 -xCntAX_FA main.l 2355 -xCntCX_FC main.l 2346 -xCntEX_FE main.l 2337 -xSymE_E main.l 2312 +xCntAX_FA main.l 2363 +xCntCX_FC main.l 2354 +xCntEX_FE main.l 2345 +xSymE_E main.l 2320 xoruAE_A big.l 465 yieldErrEX err.l 488 yieldErrX err.l 486