Commit 3361755c authored by John Spikowski's avatar John Spikowski

O2 Self Compile 20181205 Update

parent 8e3f0dd9
......@@ -21,16 +21,19 @@ itr 10:17 18/11/2018 Fix multiply unsigned by number (oper w1="mul ")
itr 16:07 16/11/2018 Rework rtl321 and rtl641 cats. expose char count. (catbufprp badcatl3 joinsi)
05:29 05/12/2018 Support redim string s(n) clear (lang.inc clear)
04:44 05/12/2018 Fix redim to include nullify for UDTs (lang.inc)
04:41 05/12/2018 Fix match and leftmatch (removing noquotes) (meta.inc)
11:09 04/12/2018 Consolidate hash coding (hashmac)
01:57 04/12/2018 Internal readint() 'fast integer reader (pars.bas)
03:31 02/12/2018 Fix comments in UTF8 / UTF16 reader (lexa.bas)
01:57 04/12/2018 Internal readint() 'fast integer reader (pars.inc)
03:31 02/12/2018 Fix comments in UTF8 / UTF16 reader (lexa.inc)
19:08 01/12/2018 Internal integrate ccomment() with endcatline
19:07 01/12/2018 Internal midspace() and midnuls() functions
16:45 28/11/2018 Fix metacoding in types and classes (decl.bas md=macio(mp,5))
16:45 28/11/2018 Fix metacoding in types and classes (decl.inc md=macio(mp,5))
03:26 26/11/2018 Support multiple Multiassign params in one expression (dataset hiex)
12:06 24/11/2018 Precode index expression procedures (procedcall xmode)
12:03 24/11/2018 Precode integer procedure calls in expressions (procedcall epfx)
16:25 22/11/2018 Fix Assignment for direct/indirect structures (tran.bas htypes)
16:25 22/11/2018 Fix Assignment for direct/indirect structures (tran.inc htypes)
10:04 21/11/2018 Fix overshoot with default assignment a={} (subsas ascw=12)
21:39 20/11/2018 Remove appendm, using appe instead (proclist etc)
18:37 20/11/2018 Restore UTF-16 appending string literals (enco.bas utfs)
......
......@@ -193,13 +193,13 @@
"
string kernel_funs="
string kernel_funs=`
'======================
'>>O2H LOW LEVEL MACROS
'======================
version 18 "+o2version+"
version 18 `+o2version+`
#view 18 ###
#endv 18 ###
#snip 18
......@@ -215,17 +215,40 @@ hibyte 18 (((%1)>>8) and 0xff)
hiword 18 (((%1)>>16) and 0xffff)
redim 18
#ifndef %2_buffer
dim static string %2_buffer = ``
dim static string %2_buffer = ""
dim static %1 byref %2
#endif
scope
dim sys %2_qb = %3
dim sys %2_le = len %2_buffer
dim sys %2_qn = %2_le / sizeof(%1)
if %2_qb > %2_qn
%2_buffer += nuls( sizeof(%1) * (%2_qb - %2_qn))
elseif %2_qb < %2_qn
%2_buffer = left( %2_buffer, sizeof(%1) * %2_qb )
int _qb_ = %3
int _le_ = len %2_buffer
int _qn_ = _le_ / sizeof(%1)
#if match "%4","clear"
int _i_
for _i_=1 to _qn_
#if typecodeof(%2)>=0x200
#ifdef %1.destructor
%2[_i_].destructor
#endif
sys _p_=@%2[_i_]
mov rcx,_p_
mov edx,sizeof %2
nullify
#elseif typecodeof(%2)>=0xa0
%2[_i_]=""
#else
%2[_i_]=0
#endif
next
#endif
#if typecodeof(%2)>=0xa0
if _qb_<_qn_
_qb_=_qn_ 'disallow reduction
endif
#endif
if _qb_ > _qn_
%2_buffer += nuls( sizeof(%1) * (_qb_ - _qn_))
elseif _qb_ < _qn_
%2_buffer = left( %2_buffer, sizeof(%1) * _qb_ )
endif
@%2=strptr(%2_buffer)
end scope
......@@ -234,7 +257,8 @@ del 18
#ifdef %1.destructor
%1.destructor
#endif
freememory @%1 : @%1=0
freememory @%1
@%1=0
#elseif typecodeof(%1)>0xe0
freememory strptr(%1)
if ?%1 { *%1=0 : ?%1=0 }
......@@ -304,7 +328,7 @@ copyn 4 72
copy 4 72
mbox 4 2048 'mboxa
comparestr 4 2192 ' comps ' COMPARING BSTRS
nullify 4 _nullify
'=============================
'>>COMMON RESERVED WORDS
......@@ -408,7 +432,7 @@ declare 14 8
function 14 9
sub 14 10
method 14 11
loop 14 12 'LOOP'` KEYWORD DISTINGUISHED FROM ASM LOOP
loop 14 12 'LOOP' KEYWORD DISTINGUISHED FROM ASM LOOP
if 14 13
then 14 14
else 14 15
......@@ -603,8 +627,8 @@ log10 17 fldlg2 : fxch : fyl2x
logn 17 fld1 : fxch st1 : fyl2x : fld1 : fdivrp st1 : fxch st1 : fyl2x
mod 17 fxch st1 : fprem : fstp st1
pi 17 fldpi
exp 17 "+exponents+"
pow 17 "+powers+"
exp 17 `+exponents+`
pow 17 `+powers+`
rad 17 fldpi : fmulp st1 : |sp -8 : mov [esp],180 : fidiv dword [esp] : |sp 8
recip 17 fld1 : fdivrp
round 17 frndint
......@@ -626,7 +650,7 @@ trunc 17 |sp -8 : fstcw [esp] : fstcw [esp+4] : or word [esp],0xc00 : fldcw [esp
'===========================
,0,0 'mark end of data
"
`
'===========================
......
......@@ -699,8 +699,8 @@ function metaval(string*s, int*i, string*wa, int tp) as double
'EXAMPLES:
'---------
'
' IF NOT (...)
' IF NOT ISDEF ( X )
' #IF NOT (...)
' #IF NOT ISDEF ( X )
' OR ISNDEF ( X )
' AND NOT (...)
'
......@@ -745,11 +745,11 @@ function metaval(string*s, int*i, string*wa, int tp) as double
endif
if nisxn
if b>2 'MATCH STRING
w1=noquotes(mword(s,i))
w1=tword(s,i)
if ascn=44
i++
endif
w2=noquotes(mword(s,i))
w2=tword(s,i)
if b=4
w2=left(w2,len(w1)) 'LEFTMATCH
endif
......@@ -1524,8 +1524,9 @@ sub intrinsic(string*wt)
w1=mid(w1,c)
c=1
d=w1 'val(w1)
if a=4
w1="## int "+memreg(qebx,d)+" 0 EA 0. "+cr
if a=4
if d then w1=memreg(qebx,d)
w1="## int "+w1+" 0 EA 0. "+cr
elseif a=10
d=asc(w1,1)-48
if d>9
......
/*
'07:01 05/12/2018
'TEST REDIM DESTRUCTORS
int d
class cc
void destructor() {d++}
float x,y,z
end class
redim cc c[100]
c[13].y=39
redim cc c[13]
print c[13].y
redim cc c[20] clear
print c[13].y
print "destructor calls " d
*/
/*
'17:54 04/12/2018
'SAFER REDIM RESET FOR STRINGS ETC
'
redim string s(100)
s(13)="ok"
redim string s(100)
print s(13)
redim string s(20) clear
print s(13)
print len s_buffer
*/
/*
'02:08 04/12/2018
def redimreset
redim %1 %2 (0)
......@@ -10,7 +42,7 @@ redim single s(100)
s(13)=39.5
redimreset single s(100)
print s(13) " ok"
*/
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment