Phix 1.0.5 uploaded
- Posted by petelomax in June
- 2097 views
Added a c_name() function to get the name of whatever c_proc/func() is calling. Made the legacy get() and value() cope with backtick strings and (eg) 100'd'. get_field_details(id,"") now returns a list of the field names in a C struct. demo/xpGUI/gButton.exw: aside: this code will hopefully be gone by 2024 (tee hee) changed to: aside: this code will hopefully be gone by 2025 Bugfix: couple of sprint() in pDiagN.e still passing maxlen to asChar. Added %r and %R to printf()/scanf() to print/parse roman numerals, why not. 64-bit Linux executable now built properly, so eg PI is much more accurate. Bugfix: psym.e/hideNested() was not setting [S_Nlink] to -2, which meant nested functions never got a proper name and diags were garbage. added builtins/closures.e, a new autoinclude that implements define_lambda(), set_lambda(), and call_lambda(), see docs. deep_copy() now throws an error if passed anything with an active delete_routine(), since cloning such is an almost sure-fire way to be left with a reference to reclaimed memory or a reclaimed slot in some table or other. Took the opportunity to remove the depth and bIfNeeded experimentals. Replaced several offending deep_copy() in bigatom.e wth better code. still_has_delete_routine() now ignores the dummy 1 planted by pEmit2.e Bugfix: delete_routine(<int>) had never worked, typically returning #40000000, ie %opDelRtn did raw ref from [res] rather than the contents of [arg]. Enhancement: [s]printf(%c) now outputs the integers #80..#10FFFF as UTF-8, previously it was and_bits(ch,#FF) which was less than helpful. No improvement to the Windows console, though docs now say why. Added %O as %o with leading "0o", to match Go, as I was there. Meh: Windows consoles now get the chcp 65001 for marginally better unicode display - but be warned it is far from being a staggering improvement. (unicode display still works 1,000,000* better on Linux & in a browser) Bugfix: reverted reverse() to a single-parameter function. from_to has gone and there are no equivalents for Euphoria's pFrom and (0-based) pTo: replace "s = reverse(s,{i,j})" with "s[i..j] = reverse(s[i..j])". (my attempts to avoid a pointless deep_copy had left 0s everywhere) Bugfix: adjust_timedate() now accepts and normalises nonsensical months such as the 13th or -3rd month, which vastly simplifies many (sane) uses. Bugfix: ppf() completely ignored/overrid a previous ppOpt({pp_Nest,10}). It still otherwise pretends, by default, there was a {pp_Nest,-1}. Bugfix: is_integer() and to_integer() treating ':' as '3'. Bugfix (partial) 29/4/24: nested routines were messing something up royally (ie not resetting something in the main parser) unless declared at the very start of their containing routine, so as a quick fix I simply made that mandatory (see nestedok in pmain.e). I may need to return to that, or I may just leave it like that forever. Note added to docs. It is also fairly likely to be trivial to remove that restriction in 2.0+. valid_index() now a standard builtin, as per Euphoria except that it permits negative indices and prohibits fractional indices. Also replaced the "type check failure, ???(symtab[1586][S_name]=0) is 1.3333333333" error with "type check failure, subscript is 1.3333333333", admittedly by assuming anything triggering that abomination must be an anonymous idx expression. Added a note re fractional idx becoming prohibited in 2.x. Bugfix: adjust_timedate() now copes properly with timedates with a length < 7. In particular, if you don't provide milliseconds(/day of week), you don't get an error and you don't get that field or owt later back. Made broadcast a system-wide WM_SETTINGCHANGE message a separate entry on the dropdown in pdemo.exw, to force a reload of the updated path, etc. Suppressed the "function does not return a value" error immediately after an abort(), and made crash() equivalent in that respect to abort(). [rather helpful when seting up the empty templates for exercism] Bugfix: (major) assert(fn(),a&b&c) failed while assert(fn(),a&b) worked ok. 4/5/24 opConcat was invoking saveFunctionResultVars(opsidx,INTSTOO) whereas opConcatN was calling saveFunctionResultVars(opsidx,NOTINTS), which meant that assert ended up with some garbage eax from opConcatN... They both now use INTSTOO. Trivial fix, once spotted, but that bug has been there since the year dot & could manifest itself *anywhere*. Enhancement: added an optional bRaw parameter to command_line(), in this specific case so that test_summary() could suppress any desire to pause when run under "-batch". Erm, make that "-nopause", which in fact itself does almost nothing, but can now be checked for. Enh: added an extra "nowait" bit setting (#10) to system_exec() to forego the 0.4s #08 gets. NB very limited testing, especially since in the end I went the other way, and decided to /wait/ for a result... Added optional "specifically" parameter to still_has_delete_routine() Relaxed plausibility tests for exercism: should a function (in particular) be just crash("please implement xxx") then the return type will be 0. Checking such a 0 for argtype plausibility now just lets it pass. (By "it" there, I mean the compiler's main front-end parser.) Enh: permit s.field[idx] = expr in structs/classes. Needed store_field_element() to be added to structs.e, like store_field() but with an index parameter. Note that having a setter method on a private field effectively prohibits this, ie it forces updates to be all-or-nothing. NB single idx only. Enhancement: added new_dicts(n) and allowed destroy_dict() to accept a sequence, specifically here to lessen the locking needed when working with threads. Enh: extract() can now be forced to return a dword-sequence by specifying (eg) 2 in the invert parameter (but must be even to avoid inversion). Bugfix: wrong era on e56rocow from pReps.e resulting in a line number of -1. TIP: set with debug/withjs=1 in pHeap.e to debug/OllyDbg a -c'd executable. Minor: vslice() now returns "" or {} for those empty sources, ie string vs sequence. Whole bunch of piecemeal changes also made to builtins\unit_tests.e for exercism. (there being absolutely no point creating an exercism track pre-1.0.5)
Usual place: http://phix.x10.mx/download.php (1.0.4 notes: https://openeuphoria.org/forum/138101.wc )