mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-27 15:56:30 +00:00
849 lines
91 KiB
HTML
Executable file
849 lines
91 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V1.00">
|
|
<style type="text/css">
|
|
body {background-color:#fef1f0;}
|
|
.cF0{color:#000000;background-color:#fef1f0;}
|
|
.cF1{color:#0148a4;background-color:#fef1f0;}
|
|
.cF2{color:#3b7901;background-color:#fef1f0;}
|
|
.cF3{color:#057c7e;background-color:#fef1f0;}
|
|
.cF4{color:#bb2020;background-color:#fef1f0;}
|
|
.cF5{color:#9e42ae;background-color:#fef1f0;}
|
|
.cF6{color:#b57901;background-color:#fef1f0;}
|
|
.cF7{color:#b2b6af;background-color:#fef1f0;}
|
|
.cF8{color:#555753;background-color:#fef1f0;}
|
|
.cF9{color:#678fbb;background-color:#fef1f0;}
|
|
.cFA{color:#82bc49;background-color:#fef1f0;}
|
|
.cFB{color:#0097a2;background-color:#fef1f0;}
|
|
.cFC{color:#e26a6a;background-color:#fef1f0;}
|
|
.cFD{color:#c671bc;background-color:#fef1f0;}
|
|
.cFE{color:#c7ab00;background-color:#fef1f0;}
|
|
.cFF{color:#fef1f0;background-color:#fef1f0;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseVarInit</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF1>U8</span><span class=cF0> **_dst, </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc, </span><span class=cF9>CArrayDim</span><span class=cF0> *tmpad,
|
|
<a name="l2"></a> </span><span class=cF1>U8</span><span class=cF0> *data_addr_rip, </span><span class=cF1>U8</span><span class=cF0> **_base, </span><span class=cF1>Bool</span><span class=cF0> data_heap, </span><span class=cF9>I64</span><span class=cF0> pass)
|
|
<a name="l3"></a>{
|
|
<a name="l4"></a> </span><span class=cF1>U8</span><span class=cF0> *dst = *_dst, *machine_code;
|
|
<a name="l5"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, r, old_flags, type, size;
|
|
<a name="l6"></a> </span><span class=cF9>CMemberList</span><span class=cF0> *tmpm;
|
|
<a name="l7"></a> </span><span class=cF9>CIntermediateCode</span><span class=cF0> *tmpi;
|
|
<a name="l8"></a> </span><span class=cF9>CAOTCtrl</span><span class=cF0> *aotc = cc->aotc;
|
|
<a name="l9"></a> </span><span class=cF9>CAOTAbsAddr</span><span class=cF0> *tmpa;
|
|
<a name="l10"></a> </span><span class=cF9>CAOTImportExport</span><span class=cF0> *tmpie;
|
|
<a name="l11"></a> </span><span class=cF1>Bool</span><span class=cF0> is_str;
|
|
<a name="l12"></a>
|
|
<a name="l13"></a> tmpc = </span><span class=cF5>OptClassFwd</span><span class=cF0>(tmpc);
|
|
<a name="l14"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm = tmpc->member_list_and_root)
|
|
<a name="l15"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l16"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token != </span><span class=cF6>'{'</span><span class=cF0>)
|
|
<a name="l17"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting '{' at "</span><span class=cF0>);
|
|
<a name="l18"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l19"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l20"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l21"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm)
|
|
<a name="l22"></a> {
|
|
<a name="l23"></a> </span><span class=cFD>ParseVarInit2</span><span class=cF0>(cc, &dst, tmpm->member_class, &tmpm->dim, data_addr_rip, _base, data_heap, pass);
|
|
<a name="l24"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>','</span><span class=cF0>)
|
|
<a name="l25"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l26"></a> tmpm = tmpm->next;
|
|
<a name="l27"></a> }
|
|
<a name="l28"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l29"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token != </span><span class=cF6>'}'</span><span class=cF0>)
|
|
<a name="l30"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Missing '}' at "</span><span class=cF0>);
|
|
<a name="l31"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l32"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l33"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l34"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l35"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc->ptr_stars_count == </span><span class=cFE>1</span><span class=cF0> && </span><span class=cF7>(</span><span class=cF0>(tmpc - </span><span class=cFE>1</span><span class=cF0>)->raw_type == </span><span class=cF3>RT_I8</span><span class=cF0> || (tmpc - </span><span class=cFE>1</span><span class=cF0>)->raw_type == </span><span class=cF3>RT_U8</span><span class=cF7>)</span><span class=cF0> && !tmpad &&
|
|
<a name="l36"></a> cc->token == </span><span class=cF3>TK_STR</span><span class=cF0>)
|
|
<a name="l37"></a> is_str = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l38"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l39"></a> is_str = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0> && is_str)
|
|
<a name="l41"></a> {
|
|
<a name="l42"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l43"></a> machine_code = </span><span class=cF5>LexExtStr</span><span class=cF0>(cc, &i);
|
|
<a name="l44"></a> </span><span class=cF1>if</span><span class=cF0> (pass == </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l45"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l46"></a> tmpa = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CAOTAbsAddr</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l47"></a> tmpa->next = aotc->abss;
|
|
<a name="l48"></a> tmpa->type = </span><span class=cF3>AAT_ADD_U64</span><span class=cF0>;
|
|
<a name="l49"></a> aotc->abss = tmpa;
|
|
<a name="l50"></a> tmpa->rip = data_addr_rip + dst - *_base;
|
|
<a name="l51"></a> *dst(</span><span class=cF9>I64</span><span class=cF0> *) = aotc->rip;
|
|
<a name="l52"></a> </span><span class=cF1>for</span><span class=cF0> (j = </span><span class=cFE>0</span><span class=cF0>; j < i; j++)
|
|
<a name="l53"></a> </span><span class=cFD>AOTStoreCodeU8</span><span class=cF0>(cc, machine_code[j]);
|
|
<a name="l54"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l55"></a> </span><span class=cF5>Free</span><span class=cF0>(machine_code);
|
|
<a name="l56"></a> }
|
|
<a name="l57"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l58"></a> {
|
|
<a name="l59"></a> old_flags = cc->flags;
|
|
<a name="l60"></a> cc->flags = </span><span class=cF3>CCF_NO_ABSS</span><span class=cF0> | cc->flags & ~(</span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0> | </span><span class=cF3>CCF_HAS_MISC_DATA</span><span class=cF0> | </span><span class=cF3>CCF_NOT_CONST</span><span class=cF0>);
|
|
<a name="l61"></a> machine_code = </span><span class=cF5>LexExpression2Bin</span><span class=cF0>(cc, &type);
|
|
<a name="l62"></a> </span><span class=cF1>if</span><span class=cF0> (old_flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0> && cc->flags & </span><span class=cF3>CCF_NOT_CONST</span><span class=cF0> && !</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&cc->opts, </span><span class=cF3>OPTf_GLOBALS_ON_DATA_HEAP</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l63"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l64"></a> cc->flags = cc->flags & ~</span><span class=cF3>CCF_NO_ABSS</span><span class=cF0> | </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>;
|
|
<a name="l65"></a> </span><span class=cF5>Free</span><span class=cF0>(machine_code);
|
|
<a name="l66"></a> </span><span class=cF1>if</span><span class=cF0> (pass == </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l67"></a> {
|
|
<a name="l68"></a> </span><span class=cF5>MemSet</span><span class=cF0>(dst, </span><span class=cFE>0</span><span class=cF0>, tmpc->size);
|
|
<a name="l69"></a> </span><span class=cF5>LexPopRestore</span><span class=cF0>(cc);
|
|
<a name="l70"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l71"></a> </span><span class=cFD>COCPush</span><span class=cF0>(cc);
|
|
<a name="l72"></a> </span><span class=cFD>COCInit</span><span class=cF0>(cc);
|
|
<a name="l73"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_ABS_ADDR</span><span class=cF0>, data_addr_rip, tmpc + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l74"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_IMM_I64</span><span class=cF0>, dst - *_base, tmpc + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l75"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_ADD</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpc + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l76"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cFD>ParseExpression</span><span class=cF7>(</span><span class=cF0>cc, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l77"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l78"></a> tmpi = cc->coc.coc_head.last;
|
|
<a name="l79"></a> </span><span class=cF1>if</span><span class=cF0> (tmpi->ic_code == </span><span class=cF3>IC_END_EXP</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l80"></a> tmpi->ic_code = </span><span class=cF3>IC_NOP1</span><span class=cF0>;
|
|
<a name="l81"></a> tmpi->ic_flags = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l82"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l83"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_ASSIGN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpc);
|
|
<a name="l84"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_END_EXP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, tmpc, </span><span class=cF3>ICF_RES_NOT_USED</span><span class=cF0>);
|
|
<a name="l85"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_RET</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l86"></a> </span><span class=cF1>if</span><span class=cF0> (machine_code = </span><span class=cFD>COCCompile</span><span class=cF7>(</span><span class=cF0>cc, &size, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF3>NULL</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l87"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l88"></a> tmpie = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CAOTImportExport</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l89"></a> tmpie->type = </span><span class=cF3>IET_MAIN</span><span class=cF0>;
|
|
<a name="l90"></a> tmpie->rip = cc->aotc->rip;
|
|
<a name="l91"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpie, cc->aot->last_ie);
|
|
<a name="l92"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < size; i++)
|
|
<a name="l93"></a> </span><span class=cFD>AOTStoreCodeU8</span><span class=cF0>(cc, machine_code[i]);
|
|
<a name="l94"></a> </span><span class=cF5>Free</span><span class=cF0>(machine_code);
|
|
<a name="l95"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l96"></a> </span><span class=cFD>COCPop</span><span class=cF0>(cc);
|
|
<a name="l97"></a> }
|
|
<a name="l98"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l99"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l100"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l101"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l102"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l103"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (!machine_code)
|
|
<a name="l105"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l106"></a> r = </span><span class=cF5>Call</span><span class=cF0>(machine_code);
|
|
<a name="l107"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>cc->flags & </span><span class=cF3>CCF_HAS_MISC_DATA</span><span class=cF7>)</span><span class=cF0> || pass == </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l108"></a> </span><span class=cF5>Free</span><span class=cF0>(machine_code);
|
|
<a name="l109"></a>
|
|
<a name="l110"></a> </span><span class=cF1>if</span><span class=cF0> (type == </span><span class=cF3>RT_F64</span><span class=cF0> && tmpc->raw_type != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l111"></a> r = r(</span><span class=cF1>F64</span><span class=cF0>);
|
|
<a name="l112"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (type != </span><span class=cF3>RT_F64</span><span class=cF0> && tmpc->raw_type == </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l113"></a> r(</span><span class=cF1>F64</span><span class=cF0>) = r;
|
|
<a name="l114"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(dst, &r, tmpc->size);
|
|
<a name="l115"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l116"></a> }
|
|
<a name="l117"></a> dst += tmpc->size;
|
|
<a name="l118"></a> cc->flags = cc->flags & ~</span><span class=cF3>CCF_NO_ABSS</span><span class=cF0> | old_flags & (</span><span class=cF3>CCF_HAS_MISC_DATA</span><span class=cF0> | </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>);
|
|
<a name="l119"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l120"></a> *_dst = dst;
|
|
<a name="l121"></a>}
|
|
<a name="l122"></a>
|
|
<a name="l123"></a></span><span class=cF1>class</span><span class=cF0> CVI2
|
|
<a name="l124"></a>{
|
|
<a name="l125"></a> CVI2 *next, *last;
|
|
<a name="l126"></a> </span><span class=cF1>U0</span><span class=cF0> base;
|
|
<a name="l127"></a>};
|
|
<a name="l128"></a>
|
|
<a name="l129"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseVarInit2</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF1>U8</span><span class=cF0> **_dst, </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc, </span><span class=cF9>CArrayDim</span><span class=cF0> *tmpad,
|
|
<a name="l130"></a> </span><span class=cF1>U8</span><span class=cF0> *data_addr_rip, </span><span class=cF1>U8</span><span class=cF0> **_base, </span><span class=cF1>Bool</span><span class=cF0> data_heap, </span><span class=cF9>I64</span><span class=cF0> pass)
|
|
<a name="l131"></a>{
|
|
<a name="l132"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, count;
|
|
<a name="l133"></a> </span><span class=cF1>U8</span><span class=cF0> *st, *_b;
|
|
<a name="l134"></a> CVI2 head, *tmpvi, *tmpvi1;
|
|
<a name="l135"></a> </span><span class=cF9>CArrayDim</span><span class=cF0> *tmpad1;
|
|
<a name="l136"></a>
|
|
<a name="l137"></a> tmpc = </span><span class=cF5>OptClassFwd</span><span class=cF0>(tmpc);
|
|
<a name="l138"></a> </span><span class=cF1>if</span><span class=cF0> (tmpad1 = tmpad->next)
|
|
<a name="l139"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l140"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpc->ptr_stars_count && </span><span class=cF7>(</span><span class=cF0>tmpc->raw_type == </span><span class=cF3>RT_I8</span><span class=cF0> || tmpc->raw_type == </span><span class=cF3>RT_U8</span><span class=cF7>)</span><span class=cF0> && cc->token == </span><span class=cF3>TK_STR</span><span class=cF0>)
|
|
<a name="l141"></a> {
|
|
<a name="l142"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l143"></a> st = </span><span class=cF5>LexExtStr</span><span class=cF0>(cc,&i);
|
|
<a name="l144"></a> </span><span class=cF1>if</span><span class=cF0> (tmpad1->count < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l145"></a> </span><span class=cF7>{</span><span class=cF2>//[]</span><span class=cF0>
|
|
<a name="l146"></a> tmpad1->count = i;
|
|
<a name="l147"></a> tmpad->total_count = i * tmpad1->total_count;
|
|
<a name="l148"></a> </span><span class=cF5>Free</span><span class=cF0>(*_base);
|
|
<a name="l149"></a> </span><span class=cF1>if</span><span class=cF0> (data_heap)
|
|
<a name="l150"></a> *_base = </span><span class=cF5>MAlloc</span><span class=cF0>(i);
|
|
<a name="l151"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l152"></a> *_base = </span><span class=cF5>MAlloc</span><span class=cF0>(i, </span><span class=cF5>Fs</span><span class=cF0>->code_heap);
|
|
<a name="l153"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(*_base, st, i);
|
|
<a name="l154"></a> *_dst = *_base + i;
|
|
<a name="l155"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l156"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l157"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l158"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(*_dst, st, tmpad1->count);
|
|
<a name="l159"></a> *_dst += tmpad1->count;
|
|
<a name="l160"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l161"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l162"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l163"></a> }
|
|
<a name="l164"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l165"></a> {
|
|
<a name="l166"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'{'</span><span class=cF0>)
|
|
<a name="l167"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l168"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l169"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l170"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l171"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l172"></a> </span><span class=cF1>if</span><span class=cF0> (tmpad1->count < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l173"></a> </span><span class=cF7>{</span><span class=cF2>//[]</span><span class=cF0>
|
|
<a name="l174"></a> </span><span class=cF5>QueueInit</span><span class=cF0>(&head);
|
|
<a name="l175"></a> count = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l176"></a> </span><span class=cF1>while</span><span class=cF0> (cc->token != </span><span class=cF6>'}'</span><span class=cF0>)
|
|
<a name="l177"></a> {
|
|
<a name="l178"></a> tmpvi = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>offset</span><span class=cF7>(</span><span class=cF0>CVI2.base</span><span class=cF7>)</span><span class=cF0> + tmpad1->total_count * tmpc->size);
|
|
<a name="l179"></a> _b = &tmpvi->base;
|
|
<a name="l180"></a> </span><span class=cFD>ParseVarInit2</span><span class=cF0>(cc, &_b, tmpc, tmpad1, data_addr_rip, _base, data_heap, pass);
|
|
<a name="l181"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpvi, head.last);
|
|
<a name="l182"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>','</span><span class=cF0>)
|
|
<a name="l183"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l184"></a> count++;
|
|
<a name="l185"></a> }
|
|
<a name="l186"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc); </span><span class=cF2>//skip '}'</span><span class=cF0>
|
|
<a name="l187"></a> tmpad1->count = count;
|
|
<a name="l188"></a> tmpad->total_count = count * tmpad1->total_count;
|
|
<a name="l189"></a> j = tmpad1->total_count * tmpc->size;
|
|
<a name="l190"></a> i = count * j;
|
|
<a name="l191"></a> </span><span class=cF5>Free</span><span class=cF0>(*_base);
|
|
<a name="l192"></a> </span><span class=cF1>if</span><span class=cF0> (data_heap)
|
|
<a name="l193"></a> *_base = _b = </span><span class=cF5>MAlloc</span><span class=cF0>(i);
|
|
<a name="l194"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l195"></a> *_base = _b = </span><span class=cF5>MAlloc</span><span class=cF0>(i, </span><span class=cF5>Fs</span><span class=cF0>->code_heap);
|
|
<a name="l196"></a> tmpvi = head.next;
|
|
<a name="l197"></a> </span><span class=cF1>while</span><span class=cF0> (tmpvi != &head)
|
|
<a name="l198"></a> {
|
|
<a name="l199"></a> tmpvi1 = tmpvi->next;
|
|
<a name="l200"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(_b, &tmpvi->base, j);
|
|
<a name="l201"></a> _b += j;
|
|
<a name="l202"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpvi);
|
|
<a name="l203"></a> tmpvi = tmpvi1;
|
|
<a name="l204"></a> }
|
|
<a name="l205"></a> *_dst = _b;
|
|
<a name="l206"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l207"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l208"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l209"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < tmpad1->count; i++)
|
|
<a name="l210"></a> {
|
|
<a name="l211"></a> </span><span class=cFD>ParseVarInit2</span><span class=cF0>(cc, _dst, tmpc, tmpad1, data_addr_rip, _base, data_heap, pass);
|
|
<a name="l212"></a> </span><span class=cF1>if</span><span class=cF0> (tmpad1->count > </span><span class=cFE>1</span><span class=cF0> && cc->token == </span><span class=cF6>','</span><span class=cF0>)
|
|
<a name="l213"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l214"></a> }
|
|
<a name="l215"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'}'</span><span class=cF0>)
|
|
<a name="l216"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l217"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l218"></a> }
|
|
<a name="l219"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l220"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l221"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l222"></a> </span><span class=cFD>ParseVarInit</span><span class=cF0>(cc, _dst, tmpc, tmpad1, data_addr_rip, _base, data_heap, pass);
|
|
<a name="l223"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l224"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l225"></a>}
|
|
<a name="l226"></a>
|
|
<a name="l227"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseGlobalInit</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CHashGlobalVar</span><span class=cF0> *tmpg, </span><span class=cF9>I64</span><span class=cF0> pass)
|
|
<a name="l228"></a>{
|
|
<a name="l229"></a> </span><span class=cF1>U8</span><span class=cF0> *dst = tmpg->data_addr;
|
|
<a name="l230"></a>
|
|
<a name="l231"></a> </span><span class=cFD>ParseVarInit2</span><span class=cF0>(cc, &dst, tmpg->var_class, &tmpg->dim, tmpg->data_addr_rip, &tmpg->data_addr,
|
|
<a name="l232"></a> </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&cc->opts, </span><span class=cF3>OPTf_GLOBALS_ON_DATA_HEAP</span><span class=cF7>)</span><span class=cF0> || </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&cc->flags, </span><span class=cF3>CCf_AOT_COMPILE</span><span class=cF7>)</span><span class=cF0>, pass);
|
|
<a name="l233"></a>}
|
|
<a name="l234"></a>
|
|
<a name="l235"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseStaticInit</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CMemberList</span><span class=cF0> *tmpm, </span><span class=cF9>I64</span><span class=cF0> pass)
|
|
<a name="l236"></a>{
|
|
<a name="l237"></a> </span><span class=cF1>U8</span><span class=cF0> *machine_code, *dst = tmpm->static_data;
|
|
<a name="l238"></a> </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc = tmpm->member_class;
|
|
<a name="l239"></a> </span><span class=cF9>I64</span><span class=cF0> i, size;
|
|
<a name="l240"></a> </span><span class=cF9>CAOTImportExport</span><span class=cF0> *tmpie;
|
|
<a name="l241"></a>
|
|
<a name="l242"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0> && pass == </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l243"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l244"></a> </span><span class=cFD>COCPush</span><span class=cF0>(cc);
|
|
<a name="l245"></a> </span><span class=cFD>COCInit</span><span class=cF0>(cc);
|
|
<a name="l246"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l247"></a> </span><span class=cFD>ParseVarInit2</span><span class=cF0>(cc, &dst, tmpc, &tmpm->dim, tmpm->static_data_rip, &tmpm->static_data,
|
|
<a name="l248"></a> </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&cc->flags, </span><span class=cF3>CCf_AOT_COMPILE</span><span class=cF7>)</span><span class=cF0>, pass);
|
|
<a name="l249"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0> && pass == </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l250"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l251"></a> </span><span class=cF1>if</span><span class=cF0> (cc->coc.coc_head.next != &cc->coc.coc_head)
|
|
<a name="l252"></a> {
|
|
<a name="l253"></a> </span><span class=cFD>ICAdd</span><span class=cF0>(cc, </span><span class=cF3>IC_RET</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l254"></a> </span><span class=cF1>if</span><span class=cF0> (machine_code = </span><span class=cFD>COCCompile</span><span class=cF7>(</span><span class=cF0>cc, &size, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF3>NULL</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l255"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l256"></a> </span><span class=cF1>if</span><span class=cF0> (pass == </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l257"></a> {
|
|
<a name="l258"></a> tmpie = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CAOTImportExport</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l259"></a> tmpie->type = </span><span class=cF3>IET_MAIN</span><span class=cF0>;
|
|
<a name="l260"></a> tmpie->rip = cc->aotc->rip;
|
|
<a name="l261"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpie, cc->aot->last_ie);
|
|
<a name="l262"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < size; i++)
|
|
<a name="l263"></a> </span><span class=cFD>AOTStoreCodeU8</span><span class=cF0>(cc, machine_code[i]);
|
|
<a name="l264"></a> }
|
|
<a name="l265"></a> </span><span class=cF5>Free</span><span class=cF0>(machine_code);
|
|
<a name="l266"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l267"></a> } </span><span class=cF2>//TODO: else del misc?</span><span class=cF0>
|
|
<a name="l268"></a> </span><span class=cFD>COCPop</span><span class=cF0>(cc);
|
|
<a name="l269"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l270"></a>}
|
|
<a name="l271"></a>
|
|
<a name="l272"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseArrayDims</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>I64</span><span class=cF0> mode, </span><span class=cF9>CArrayDim</span><span class=cF0> *dim)
|
|
<a name="l273"></a>{</span><span class=cF2>//dim->next!=0 for array</span><span class=cF0>
|
|
<a name="l274"></a> </span><span class=cF9>CArrayDim</span><span class=cF0> *tmpad, *tmpad1;
|
|
<a name="l275"></a> </span><span class=cF9>I64</span><span class=cF0> j;
|
|
<a name="l276"></a>
|
|
<a name="l277"></a> dim->next = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l278"></a> dim->count = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l279"></a> dim->total_count = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l280"></a> tmpad1 = &dim->next;
|
|
<a name="l281"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'['</span><span class=cF0>)
|
|
<a name="l282"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l283"></a> </span><span class=cF1>if</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0>)
|
|
<a name="l284"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"No arrays in fun args at "</span><span class=cF0>);
|
|
<a name="l285"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l286"></a> {
|
|
<a name="l287"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF6>']'</span><span class=cF0> && !dim->next)
|
|
<a name="l288"></a> j = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l289"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l290"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l291"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>j = </span><span class=cF5>LexExpressionI64</span><span class=cF0>(cc)</span><span class=cF7>)</span><span class=cF0> < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l292"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Invalid array size at "</span><span class=cF0>);
|
|
<a name="l293"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l294"></a> tmpad = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CArrayDim</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l295"></a> tmpad->next = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l296"></a> tmpad1 = &dim;
|
|
<a name="l297"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l298"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l299"></a> tmpad1->total_count *= j;
|
|
<a name="l300"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpad1->next)
|
|
<a name="l301"></a> {
|
|
<a name="l302"></a> tmpad1->next = tmpad;
|
|
<a name="l303"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l304"></a> }
|
|
<a name="l305"></a> tmpad1 = tmpad1->next;
|
|
<a name="l306"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l307"></a> </span><span class=cF1>while</span><span class=cF0> (tmpad1);
|
|
<a name="l308"></a>
|
|
<a name="l309"></a> tmpad1 = tmpad;
|
|
<a name="l310"></a> tmpad->count = j;
|
|
<a name="l311"></a> tmpad->total_count = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l312"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token != </span><span class=cF6>']'</span><span class=cF0>)
|
|
<a name="l313"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Missing ']' at "</span><span class=cF0>);
|
|
<a name="l314"></a> }
|
|
<a name="l315"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF6>'['</span><span class=cF0>);
|
|
<a name="l316"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l317"></a>}
|
|
<a name="l318"></a>
|
|
<a name="l319"></a></span><span class=cF9>CHashClass</span><span class=cF0> *</span><span class=cFD>ParseType</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CHashClass</span><span class=cF0> **_tmpc1, </span><span class=cF9>I64</span><span class=cF0> *_mode, </span><span class=cF9>CMemberList</span><span class=cF0> *tmpm, </span><span class=cF1>U8</span><span class=cF0> **_ident, </span><span class=cF9>CHashFun</span><span class=cF0> **_fun_ptr,
|
|
<a name="l320"></a> </span><span class=cF9>CHashExport</span><span class=cF0> **_tmpex, </span><span class=cF9>CArrayDim</span><span class=cF0> *tmpad, </span><span class=cF9>I64</span><span class=cF0> fsp_flags)
|
|
<a name="l321"></a>{
|
|
<a name="l322"></a> </span><span class=cF9>I64</span><span class=cF0> k, ptr_stars_count, mode = *_mode;
|
|
<a name="l323"></a> </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc1 = *_tmpc1, *tmpc2;
|
|
<a name="l324"></a> </span><span class=cF9>CHashFun</span><span class=cF0> *fun_ptr = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l325"></a> </span><span class=cF9>CHashExport</span><span class=cF0> *tmpex = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l326"></a>
|
|
<a name="l327"></a> pt_start:
|
|
<a name="l328"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpc1 || !</span><span class=cF7>(</span><span class=cF0>tmpc1->type & (</span><span class=cF3>HTT_CLASS</span><span class=cF0> | </span><span class=cF3>HTT_INTERNAL_TYPE</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l329"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Invalid class at "</span><span class=cF0>);
|
|
<a name="l330"></a>
|
|
<a name="l331"></a> ptr_stars_count = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l332"></a> </span><span class=cF1>while</span><span class=cF0> (cc->token == </span><span class=cF6>'*'</span><span class=cF0>)
|
|
<a name="l333"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l334"></a> </span><span class=cF1>if</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>])
|
|
<a name="l335"></a> {
|
|
<a name="l336"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l337"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l338"></a> }
|
|
<a name="l339"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l340"></a> tmpc1++;
|
|
<a name="l341"></a> </span><span class=cF1>if</span><span class=cF0> (++ptr_stars_count > </span><span class=cF3>PTR_STARS_NUM</span><span class=cF0>)
|
|
<a name="l342"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Too many *'s at "</span><span class=cF0>);
|
|
<a name="l343"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l344"></a>
|
|
<a name="l345"></a> k = </span><span class=cF5>ParseKeyWord</span><span class=cF0>(cc);
|
|
<a name="l346"></a> </span><span class=cF1>if</span><span class=cF0> (k == </span><span class=cF3>KW_UNION</span><span class=cF0> || k == </span><span class=cF3>KW_CLASS</span><span class=cF0>)
|
|
<a name="l347"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l348"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l349"></a> tmpc2 = </span><span class=cFD>ParseClass</span><span class=cF0>(cc, k, fsp_flags, mode & </span><span class=cFE>255</span><span class=cF0> == </span><span class=cF3>PRS0_EXTERN</span><span class=cF0>);
|
|
<a name="l350"></a> tmpc2->fwd_class = tmpc1;
|
|
<a name="l351"></a> tmpc1 = tmpc2;
|
|
<a name="l352"></a> </span><span class=cF1>if</span><span class=cF0> (_tmpc1)
|
|
<a name="l353"></a> *_tmpc1 = tmpc1;
|
|
<a name="l354"></a> mode = </span><span class=cF3>PRS0_NULL</span><span class=cF0>|</span><span class=cF3>PRS1_NULL</span><span class=cF0>;
|
|
<a name="l355"></a> </span><span class=cF1>goto</span><span class=cF0> pt_start;
|
|
<a name="l356"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l357"></a>
|
|
<a name="l358"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'('</span><span class=cF0>)
|
|
<a name="l359"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l360"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> != </span><span class=cF6>'*'</span><span class=cF0>)
|
|
<a name="l361"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting '*' at "</span><span class=cF0>);
|
|
<a name="l362"></a> ptr_stars_count = </span><span class=cFE>1</span><span class=cF0>; </span><span class=cF2>//fun_ptr</span><span class=cF0>
|
|
<a name="l363"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF6>'*'</span><span class=cF0>)
|
|
<a name="l364"></a> ptr_stars_count++; </span><span class=cF2>//fun_ptr</span><span class=cF0>
|
|
<a name="l365"></a> </span><span class=cF1>if</span><span class=cF0> (ptr_stars_count > </span><span class=cF3>PTR_STARS_NUM</span><span class=cF0>)
|
|
<a name="l366"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Too many *'s at "</span><span class=cF0>);
|
|
<a name="l367"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l368"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l369"></a> ptr_stars_count = -</span><span class=cFE>1</span><span class=cF0>; </span><span class=cF2>//fun_ptr</span><span class=cF0>
|
|
<a name="l370"></a>
|
|
<a name="l371"></a> </span><span class=cF1>if</span><span class=cF0> (_ident)
|
|
<a name="l372"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l373"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF3>TK_IDENT</span><span class=cF0>)
|
|
<a name="l374"></a> {
|
|
<a name="l375"></a> tmpex = cc->hash_entry;
|
|
<a name="l376"></a> *_ident = cc->cur_str;
|
|
<a name="l377"></a> cc->cur_str = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l378"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l379"></a> }
|
|
<a name="l380"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l381"></a> {
|
|
<a name="l382"></a> </span><span class=cF1>if</span><span class=cF0> (!mode.u8[</span><span class=cFE>1</span><span class=cF0>])
|
|
<a name="l383"></a> *_ident = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l384"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>','</span><span class=cF0> || cc->token == </span><span class=cF6>';'</span><span class=cF0> || cc->token == </span><span class=cF6>')'</span><span class=cF0>)
|
|
<a name="l385"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l386"></a> tmpex = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l387"></a> *_ident = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>"_anon_"</span><span class=cF0>);
|
|
<a name="l388"></a> tmpm->flags |= </span><span class=cF3>MLF_NO_UNUSED_WARN</span><span class=cF0>;
|
|
<a name="l389"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l390"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l391"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting identifier at "</span><span class=cF0>);
|
|
<a name="l392"></a> }
|
|
<a name="l393"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l394"></a>
|
|
<a name="l395"></a> </span><span class=cF1>if</span><span class=cF0> (ptr_stars_count >= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l396"></a> </span><span class=cF7>{</span><span class=cF0> </span><span class=cF2>//fun_ptr</span><span class=cF0>
|
|
<a name="l397"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token != </span><span class=cF6>')'</span><span class=cF0>)
|
|
<a name="l398"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Missing ')' at "</span><span class=cF0>);
|
|
<a name="l399"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> != </span><span class=cF6>'('</span><span class=cF0>)
|
|
<a name="l400"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting '(' at "</span><span class=cF0>);
|
|
<a name="l401"></a> fun_ptr = </span><span class=cFD>ParseFunJoin</span><span class=cF0>(cc, tmpc1, </span><span class=cF3>NULL</span><span class=cF0>, fsp_flags) + ptr_stars_count;
|
|
<a name="l402"></a> tmpc1 = </span><span class=cFB>cmp</span><span class=cF0>.internal_types[</span><span class=cF3>RT_PTR</span><span class=cF0>] + ptr_stars_count;
|
|
<a name="l403"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l404"></a> </span><span class=cFD>ParseArrayDims</span><span class=cF0>(cc, mode, tmpad);
|
|
<a name="l405"></a>
|
|
<a name="l406"></a> tmpc2 = </span><span class=cF5>OptClassFwd</span><span class=cF0>(tmpc1);
|
|
<a name="l407"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc2->ptr_stars_count)
|
|
<a name="l408"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l409"></a> tmpc2 -= tmpc2->ptr_stars_count;
|
|
<a name="l410"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc2->type & </span><span class=cF3>HTT_INTERNAL_TYPE</span><span class=cF0> && !tmpc2->size)
|
|
<a name="l411"></a> </span><span class=cF5>LexWarn</span><span class=cF0>(cc, </span><span class=cF6>"use \"U8 *\" instead of \"U0 *\" at "</span><span class=cF0>);
|
|
<a name="l412"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l413"></a>
|
|
<a name="l414"></a> </span><span class=cF1>if</span><span class=cF0> (_mode)
|
|
<a name="l415"></a> *_mode = mode;
|
|
<a name="l416"></a> </span><span class=cF1>if</span><span class=cF0> (_fun_ptr)
|
|
<a name="l417"></a> *_fun_ptr = fun_ptr;
|
|
<a name="l418"></a> </span><span class=cF1>if</span><span class=cF0> (_tmpex)
|
|
<a name="l419"></a> *_tmpex = tmpex;
|
|
<a name="l420"></a>
|
|
<a name="l421"></a> </span><span class=cF1>return</span><span class=cF0> tmpc1;
|
|
<a name="l422"></a>}
|
|
<a name="l423"></a>
|
|
<a name="l424"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseDotDotDot</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CHashFun</span><span class=cF0> *tmpf, </span><span class=cF9>I64</span><span class=cF0> _reg)
|
|
<a name="l425"></a>{
|
|
<a name="l426"></a> </span><span class=cF9>CMemberList</span><span class=cF0> *tmpm;
|
|
<a name="l427"></a> </span><span class=cF9>CArrayDim</span><span class=cF0> *tmpad;
|
|
<a name="l428"></a>
|
|
<a name="l429"></a> </span><span class=cF5>Bts</span><span class=cF0>(&tmpf->flags, </span><span class=cF3>Ff_DOT_DOT_DOT</span><span class=cF0>);
|
|
<a name="l430"></a>
|
|
<a name="l431"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l432"></a> tmpm = </span><span class=cFD>MemberListNew</span><span class=cF0>(_reg);
|
|
<a name="l433"></a> tmpm->flags = </span><span class=cF3>MLF_DOT_DOT_DOT</span><span class=cF0>;
|
|
<a name="l434"></a> tmpm->member_class = </span><span class=cFB>cmp</span><span class=cF0>.internal_types[</span><span class=cF3>RT_I64</span><span class=cF0>];
|
|
<a name="l435"></a> tmpm->str = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>"argc"</span><span class=cF0>);
|
|
<a name="l436"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = tmpf->size;
|
|
<a name="l437"></a> tmpm->size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l438"></a> tmpf->size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l439"></a> </span><span class=cFD>MemberAdd</span><span class=cF0>(cc, tmpm, tmpf, </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0>);
|
|
<a name="l440"></a>
|
|
<a name="l441"></a> tmpm = </span><span class=cFD>MemberListNew</span><span class=cF0>(_reg);
|
|
<a name="l442"></a> tmpm->flags = </span><span class=cF3>MLF_DOT_DOT_DOT</span><span class=cF0>;
|
|
<a name="l443"></a> tmpm->member_class = </span><span class=cFB>cmp</span><span class=cF0>.internal_types[</span><span class=cF3>RT_I64</span><span class=cF0>];
|
|
<a name="l444"></a> tmpm->str = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>"argv"</span><span class=cF0>);
|
|
<a name="l445"></a> tmpm->dim.total_count = </span><span class=cFE>127</span><span class=cF0>; </span><span class=cF2>//arbitrary</span><span class=cF0>
|
|
<a name="l446"></a> tmpm->dim.next = tmpad = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CArrayDim</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l447"></a> tmpad->next = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l448"></a> tmpad->count = </span><span class=cFE>127</span><span class=cF0>; </span><span class=cF2>//arbitrary</span><span class=cF0>
|
|
<a name="l449"></a> tmpad->total_count = </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l450"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = tmpf->size;
|
|
<a name="l451"></a> tmpm->size = </span><span class=cFE>8</span><span class=cF0>; </span><span class=cF2>//Close enough</span><span class=cF0>
|
|
<a name="l452"></a> tmpf->size += </span><span class=cFE>8</span><span class=cF0>;</span><span class=cF2>//Close enough</span><span class=cF0>
|
|
<a name="l453"></a> </span><span class=cFD>MemberAdd</span><span class=cF0>(cc, tmpm, tmpf, </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0>);
|
|
<a name="l454"></a>
|
|
<a name="l455"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>')'</span><span class=cF0>)
|
|
<a name="l456"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l457"></a>}
|
|
<a name="l458"></a>
|
|
<a name="l459"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>ParseVarList</span><span class=cF0>(</span><span class=cF9>CCompCtrl</span><span class=cF0> *cc, </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc, </span><span class=cF9>I64</span><span class=cF0> mode, </span><span class=cF9>I64</span><span class=cF0> union_base=</span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l460"></a>{
|
|
<a name="l461"></a> </span><span class=cF9>I64</span><span class=cF0> i, k, old_flags = cc->flags, old_flags2, type, _reg;
|
|
<a name="l462"></a> </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc1, *tmpc2;
|
|
<a name="l463"></a> </span><span class=cF9>CHash</span><span class=cF0> *tmph;
|
|
<a name="l464"></a> </span><span class=cF9>CMemberList</span><span class=cF0> *tmpm;
|
|
<a name="l465"></a> </span><span class=cF9>CMemberListMeta</span><span class=cF0> *tmp_meta;
|
|
<a name="l466"></a> </span><span class=cF1>U8</span><span class=cF0> *machine_code;
|
|
<a name="l467"></a> </span><span class=cF1>Bool</span><span class=cF0> undef_array_size, first;
|
|
<a name="l468"></a>
|
|
<a name="l469"></a> cc->flags |= </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l470"></a> </span><span class=cF1>if</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_CLASS</span><span class=cF0>)
|
|
<a name="l471"></a> cc->flags |= </span><span class=cF3>CCF_CLASS_DOL_OFFSET</span><span class=cF0>;
|
|
<a name="l472"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>mode.u8[</span><span class=cFE>1</span><span class=cF0>] != </span><span class=cF3>PRS1B_LOCAL_VAR</span><span class=cF0> && mode.u8[</span><span class=cFE>1</span><span class=cF0>] != </span><span class=cF3>PRS1B_STATIC_LOCAL_VAR</span><span class=cF0> || mode & </span><span class=cF3>PRSF_UNION</span><span class=cF7>)</span><span class=cF0> &&
|
|
<a name="l473"></a> </span><span class=cF7>(</span><span class=cF0>cc->token == </span><span class=cF6>'('</span><span class=cF0> || cc->token == </span><span class=cF6>'{'</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l474"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l475"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l476"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l477"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l478"></a> cc->class_dol_offset = union_base;
|
|
<a name="l479"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l480"></a> cc->class_dol_offset = tmpc->size;
|
|
<a name="l481"></a> </span><span class=cF1>while</span><span class=cF0> (cc->token == </span><span class=cF6>';'</span><span class=cF0>)
|
|
<a name="l482"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l483"></a> </span><span class=cF1>while</span><span class=cF0> (cc->token == </span><span class=cF6>'$'</span><span class=cF0>) {
|
|
<a name="l484"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> != </span><span class=cF6>'='</span><span class=cF0>) </span><span class=cF2>//skip $</span><span class=cF0>
|
|
<a name="l485"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting '=' at "</span><span class=cF0>);
|
|
<a name="l486"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc); </span><span class=cF2>//skip =</span><span class=cF0>
|
|
<a name="l487"></a> cc->class_dol_offset = </span><span class=cF5>LexExpression</span><span class=cF0>(cc);
|
|
<a name="l488"></a> </span><span class=cF1>if</span><span class=cF0> (-cc->class_dol_offset > tmpc->neg_offset)
|
|
<a name="l489"></a> tmpc->neg_offset = -cc->class_dol_offset;
|
|
<a name="l490"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l491"></a> union_base = cc->class_dol_offset;
|
|
<a name="l492"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l493"></a> tmpc->size = cc->class_dol_offset;
|
|
<a name="l494"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token != </span><span class=cF6>';'</span><span class=cF0>)
|
|
<a name="l495"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Missing ';' at"</span><span class=cF0>);
|
|
<a name="l496"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc); </span><span class=cF2>//skip ;</span><span class=cF0>
|
|
<a name="l497"></a> }
|
|
<a name="l498"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>')'</span><span class=cF0> || cc->token == </span><span class=cF6>'}'</span><span class=cF0>)
|
|
<a name="l499"></a> {
|
|
<a name="l500"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l501"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_done;
|
|
<a name="l502"></a> }
|
|
<a name="l503"></a> _reg = </span><span class=cF3>REG_UNDEF</span><span class=cF0>;
|
|
<a name="l504"></a>pvl_restart1:
|
|
<a name="l505"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>ParseKeyWord</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l506"></a> {
|
|
<a name="l507"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>KW_REG</span><span class=cF0>:
|
|
<a name="l508"></a> _reg = </span><span class=cF3>REG_ALLOC</span><span class=cF0>;
|
|
<a name="l509"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>TK_IDENT</span><span class=cF0>)
|
|
<a name="l510"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l511"></a> k = </span><span class=cF5>DefineMatch</span><span class=cF0>(cc->cur_str, </span><span class=cF6>"ST_U64_REGS"</span><span class=cF0>);
|
|
<a name="l512"></a> </span><span class=cF1>if</span><span class=cF0> (k >= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l513"></a> {
|
|
<a name="l514"></a> _reg = k;
|
|
<a name="l515"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l516"></a> }
|
|
<a name="l517"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l518"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_restart1;
|
|
<a name="l519"></a>
|
|
<a name="l520"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>KW_NOREG</span><span class=cF0>:
|
|
<a name="l521"></a> _reg = </span><span class=cF3>REG_NONE</span><span class=cF0>;
|
|
<a name="l522"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l523"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_restart1;
|
|
<a name="l524"></a> }
|
|
<a name="l525"></a>
|
|
<a name="l526"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF3>TK_ELLIPSIS</span><span class=cF0> && mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0>)
|
|
<a name="l527"></a> {
|
|
<a name="l528"></a> </span><span class=cFD>ParseDotDotDot</span><span class=cF0>(cc, tmpc, _reg);
|
|
<a name="l529"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_done;
|
|
<a name="l530"></a> }
|
|
<a name="l531"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF3>TK_IDENT</span><span class=cF0>)
|
|
<a name="l532"></a> tmph = cc->hash_entry;
|
|
<a name="l533"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l534"></a> tmph = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l535"></a> </span><span class=cF1>if</span><span class=cF0> (!tmph)
|
|
<a name="l536"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting type at "</span><span class=cF0>);
|
|
<a name="l537"></a> k = </span><span class=cF5>ParseKeyWord</span><span class=cF0>(cc);
|
|
<a name="l538"></a> </span><span class=cF1>if</span><span class=cF0> (k == </span><span class=cF3>KW_UNION</span><span class=cF0>)
|
|
<a name="l539"></a> {
|
|
<a name="l540"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l541"></a> </span><span class=cFD>ParseVarList</span><span class=cF0>(cc, tmpc, mode | </span><span class=cF3>PRSF_UNION</span><span class=cF0>, tmpc->size);
|
|
<a name="l542"></a> }
|
|
<a name="l543"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l544"></a> {
|
|
<a name="l545"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>tmph->type & (</span><span class=cF3>HTT_CLASS</span><span class=cF0> | </span><span class=cF3>HTT_INTERNAL_TYPE</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l546"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Expecting type at "</span><span class=cF0>);
|
|
<a name="l547"></a> first = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l548"></a>pvl_restart2:
|
|
<a name="l549"></a> tmpc1 = tmph;
|
|
<a name="l550"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l551"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc); </span><span class=cF2>//skip type or ','</span><span class=cF0>
|
|
<a name="l552"></a> tmpm = </span><span class=cFD>MemberListNew</span><span class=cF0>(_reg);
|
|
<a name="l553"></a> _reg = </span><span class=cF3>REG_UNDEF</span><span class=cF0>;
|
|
<a name="l554"></a> </span><span class=cF1>if</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_STATIC_LOCAL_VAR</span><span class=cF0>)
|
|
<a name="l555"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l556"></a> tmpm->flags |= </span><span class=cF3>MLF_STATIC</span><span class=cF0>;
|
|
<a name="l557"></a> tmpm-></span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_NONE</span><span class=cF0>;
|
|
<a name="l558"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l559"></a> </span><span class=cF1>if</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0> || mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_LOCAL_VAR</span><span class=cF0>)
|
|
<a name="l560"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l561"></a>pvl_restart3:
|
|
<a name="l562"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>ParseKeyWord</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l563"></a> {
|
|
<a name="l564"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>KW_REG</span><span class=cF0>:
|
|
<a name="l565"></a> tmpm-></span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_ALLOC</span><span class=cF0>;
|
|
<a name="l566"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l567"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l568"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>TK_IDENT</span><span class=cF0>)
|
|
<a name="l569"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l570"></a> k = </span><span class=cF5>DefineMatch</span><span class=cF0>(cc->cur_str, </span><span class=cF6>"ST_U64_REGS"</span><span class=cF0>);
|
|
<a name="l571"></a> </span><span class=cF1>if</span><span class=cF0> (k >= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l572"></a> {
|
|
<a name="l573"></a> tmpm-></span><span class=cF1>reg</span><span class=cF0> = k;
|
|
<a name="l574"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l575"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l576"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l577"></a> }
|
|
<a name="l578"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l579"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_restart3;
|
|
<a name="l580"></a>
|
|
<a name="l581"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>KW_NOREG</span><span class=cF0>:
|
|
<a name="l582"></a> tmpm-></span><span class=cF1>reg</span><span class=cF0> = </span><span class=cF3>REG_NONE</span><span class=cF0>;
|
|
<a name="l583"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l584"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l585"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l586"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_restart3;
|
|
<a name="l587"></a> }
|
|
<a name="l588"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l589"></a> tmpm->member_class = </span><span class=cFD>ParseType</span><span class=cF0>(cc, &tmpc1, &mode, tmpm, &tmpm->str, &tmpm->fun_ptr, </span><span class=cF3>NULL</span><span class=cF0>, &tmpm->dim, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l590"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm->fun_ptr)
|
|
<a name="l591"></a> tmpm->flags |= </span><span class=cF3>MLF_FUN</span><span class=cF0>;
|
|
<a name="l592"></a> </span><span class=cF1>if</span><span class=cF0> (first)
|
|
<a name="l593"></a> </span><span class=cFD>MemberAdd</span><span class=cF0>(cc, tmpm, tmpc, mode.u8[</span><span class=cFE>1</span><span class=cF0>]);
|
|
<a name="l594"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l595"></a> </span><span class=cFD>MemberAdd</span><span class=cF0>(cc, tmpm, tmpc, </span><span class=cF3>PRS1B_NULL</span><span class=cF0>);
|
|
<a name="l596"></a> tmpc->member_count++;
|
|
<a name="l597"></a>
|
|
<a name="l598"></a> tmpc2 = tmpm->member_class;
|
|
<a name="l599"></a> i = tmpc2->size * tmpm->dim.total_count;
|
|
<a name="l600"></a> </span><span class=cF1>switch</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>])
|
|
<a name="l601"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l602"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>PRS1B_STATIC_LOCAL_VAR</span><span class=cF0>:
|
|
<a name="l603"></a> </span><span class=cF1>if</span><span class=cF0> (i < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l604"></a> {
|
|
<a name="l605"></a> i = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l606"></a> undef_array_size = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l607"></a> }
|
|
<a name="l608"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l609"></a> undef_array_size = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l610"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l611"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Static unions are not implemented "</span><span class=cF0>);
|
|
<a name="l612"></a> k = (i + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF0>;
|
|
<a name="l613"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l614"></a> tmpm->static_data = </span><span class=cF5>MAlloc</span><span class=cF0>(k);
|
|
<a name="l615"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l616"></a> tmpm->static_data = </span><span class=cF5>MAlloc</span><span class=cF0>(k, </span><span class=cF5>Fs</span><span class=cF0>->code_heap);
|
|
<a name="l617"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l618"></a> {
|
|
<a name="l619"></a> tmpm->static_data_rip = cc->aotc->rip;
|
|
<a name="l620"></a> k >>= </span><span class=cFE>3</span><span class=cF0>;
|
|
<a name="l621"></a> </span><span class=cF1>while</span><span class=cF0> (k--)
|
|
<a name="l622"></a> </span><span class=cFD>AOTStoreCodeU64</span><span class=cF0>(cc, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l623"></a> }
|
|
<a name="l624"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l625"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_var_init_flag</span><span class=cF0>)
|
|
<a name="l626"></a> </span><span class=cF5>MemSet</span><span class=cF0>(tmpm->static_data, </span><span class=cFB>sys_var_init_val</span><span class=cF0>, k);
|
|
<a name="l627"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l628"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'='</span><span class=cF0>)
|
|
<a name="l629"></a> {
|
|
<a name="l630"></a> cc->flags = cc->flags & ~</span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0> | old_flags & </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l631"></a> </span><span class=cF1>if</span><span class=cF0> (undef_array_size)
|
|
<a name="l632"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l633"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l634"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l635"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc); </span><span class=cF2>//skip =</span><span class=cF0>
|
|
<a name="l636"></a> </span><span class=cFD>ParseStaticInit</span><span class=cF0>(cc, tmpm, </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l637"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l638"></a> i = tmpc2->size * tmpm->dim.total_count;
|
|
<a name="l639"></a> k = (i + </span><span class=cFE>7</span><span class=cF0>) & ~</span><span class=cFE>7</span><span class=cF0>;
|
|
<a name="l640"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l641"></a> {
|
|
<a name="l642"></a> k >>= </span><span class=cFE>3</span><span class=cF0>;
|
|
<a name="l643"></a> </span><span class=cF1>while</span><span class=cF0> (k--)
|
|
<a name="l644"></a> </span><span class=cFD>AOTStoreCodeU64</span><span class=cF0>(cc, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l645"></a> }
|
|
<a name="l646"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l647"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_var_init_flag</span><span class=cF0>)
|
|
<a name="l648"></a> </span><span class=cF5>MemSet</span><span class=cF0>(tmpm->static_data, </span><span class=cFB>sys_var_init_val</span><span class=cF0>, k);
|
|
<a name="l649"></a> </span><span class=cF5>LexPopRestore</span><span class=cF0>(cc);
|
|
<a name="l650"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l651"></a> </span><span class=cF5>LexPush</span><span class=cF0>(cc);
|
|
<a name="l652"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc); </span><span class=cF2>//skip =</span><span class=cF0>
|
|
<a name="l653"></a> </span><span class=cFD>ParseStaticInit</span><span class=cF0>(cc, tmpm, </span><span class=cFE>2</span><span class=cF0>);
|
|
<a name="l654"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l655"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l656"></a> </span><span class=cF1>for</span><span class=cF0> (k = </span><span class=cFE>0</span><span class=cF0>; k < i; k++)
|
|
<a name="l657"></a> </span><span class=cFD>AOTStoreCodeU8At</span><span class=cF0>(cc, tmpm->static_data_rip + k, tmpm->static_data[k]);
|
|
<a name="l658"></a> tmpm->use_count = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l659"></a> cc->flags |= </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l660"></a> }
|
|
<a name="l661"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_AOT_COMPILE</span><span class=cF0>)
|
|
<a name="l662"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpm->static_data);
|
|
<a name="l663"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l664"></a>
|
|
<a name="l665"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>PRS1B_LOCAL_VAR</span><span class=cF0>:
|
|
<a name="l666"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l667"></a> {
|
|
<a name="l668"></a> </span><span class=cF1>if</span><span class=cF0> (union_base - tmpc->size<i)
|
|
<a name="l669"></a> i = union_base - i - tmpc->size;
|
|
<a name="l670"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l671"></a> i = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l672"></a> }
|
|
<a name="l673"></a> </span><span class=cF1>if</span><span class=cF0> (i >= </span><span class=cFE>8</span><span class=cF0>)
|
|
<a name="l674"></a> tmpc->size = (tmpc->size - i) & ~</span><span class=cFE>7</span><span class=cF0>;
|
|
<a name="l675"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (i >= </span><span class=cFE>4</span><span class=cF0>)
|
|
<a name="l676"></a> tmpc->size = (tmpc->size - i) & ~</span><span class=cFE>3</span><span class=cF0>;
|
|
<a name="l677"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (i >= </span><span class=cFE>2</span><span class=cF0>)
|
|
<a name="l678"></a> tmpc->size = (tmpc->size - i) & ~</span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l679"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l680"></a> tmpc->size -= i;
|
|
<a name="l681"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = tmpc->size;
|
|
<a name="l682"></a> tmpm->size = i;
|
|
<a name="l683"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'='</span><span class=cF0>)
|
|
<a name="l684"></a> {
|
|
<a name="l685"></a> cc->flags = cc->flags & ~</span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0> | old_flags & </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l686"></a> </span><span class=cF5>LexPopRestore</span><span class=cF0>(cc);
|
|
<a name="l687"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l688"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cFD>ParseExpression</span><span class=cF7>(</span><span class=cF0>cc, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l689"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l690"></a> tmpm->use_count = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l691"></a> cc->flags |= </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l692"></a> }
|
|
<a name="l693"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l694"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l695"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l696"></a>
|
|
<a name="l697"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0>:
|
|
<a name="l698"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l699"></a> {
|
|
<a name="l700"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = union_base;
|
|
<a name="l701"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc->size - union_base < </span><span class=cFE>8</span><span class=cF0>)
|
|
<a name="l702"></a> tmpc->size = </span><span class=cFE>8</span><span class=cF0> + union_base;
|
|
<a name="l703"></a> }
|
|
<a name="l704"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l705"></a> {
|
|
<a name="l706"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = tmpc->size;
|
|
<a name="l707"></a> tmpc->size += </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l708"></a> }
|
|
<a name="l709"></a> tmpm->size = </span><span class=cFE>8</span><span class=cF0>;
|
|
<a name="l710"></a> </span><span class=cF1>if</span><span class=cF0> (cc->token == </span><span class=cF6>'='</span><span class=cF0>)
|
|
<a name="l711"></a> {
|
|
<a name="l712"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l713"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>ParseKeyWord</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>KW_LASTCLASS</span><span class=cF0>)
|
|
<a name="l714"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l715"></a> tmpm->flags |= </span><span class=cF3>MLF_LASTCLASS</span><span class=cF0>;
|
|
<a name="l716"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l717"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l718"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l719"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l720"></a> old_flags2 = cc->flags;
|
|
<a name="l721"></a> cc->flags &= ~</span><span class=cF3>CCF_HAS_MISC_DATA</span><span class=cF0>;
|
|
<a name="l722"></a> machine_code = </span><span class=cF5>LexExpression2Bin</span><span class=cF0>(cc, &type);
|
|
<a name="l723"></a> </span><span class=cF1>if</span><span class=cF0> (!machine_code)
|
|
<a name="l724"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'Compiler'</span><span class=cF0>);
|
|
<a name="l725"></a> tmpm->default_val = </span><span class=cF5>Call</span><span class=cF0>(machine_code);
|
|
<a name="l726"></a> tmpc2 = </span><span class=cF5>OptClassFwd</span><span class=cF0>(tmpc2);
|
|
<a name="l727"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc2->raw_type == </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l728"></a> {
|
|
<a name="l729"></a> </span><span class=cF1>if</span><span class=cF0> (type != </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l730"></a> tmpm->default_val(</span><span class=cF1>F64</span><span class=cF0>) = tmpm->default_val;
|
|
<a name="l731"></a> }
|
|
<a name="l732"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l733"></a> {
|
|
<a name="l734"></a> </span><span class=cF1>if</span><span class=cF0> (type == </span><span class=cF3>RT_F64</span><span class=cF0>)
|
|
<a name="l735"></a> tmpm->default_val = tmpm->default_val(</span><span class=cF1>F64</span><span class=cF0>);
|
|
<a name="l736"></a> }
|
|
<a name="l737"></a> </span><span class=cF1>if</span><span class=cF0> (cc->flags & </span><span class=cF3>CCF_HAS_MISC_DATA</span><span class=cF0>)
|
|
<a name="l738"></a> {
|
|
<a name="l739"></a> tmpm->default_val = </span><span class=cF5>StrNew</span><span class=cF0>(tmpm->default_val);
|
|
<a name="l740"></a> tmpm->flags |= </span><span class=cF3>MLF_STR_DEFAULT_AVAILABLE</span><span class=cF0>;
|
|
<a name="l741"></a> }
|
|
<a name="l742"></a> </span><span class=cF5>Free</span><span class=cF0>(machine_code);
|
|
<a name="l743"></a> cc->flags |= old_flags2 & </span><span class=cF3>CCF_HAS_MISC_DATA</span><span class=cF0>;
|
|
<a name="l744"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l745"></a> tmpm->flags |= </span><span class=cF3>MLF_DEFAULT_AVAILABLE</span><span class=cF0>;
|
|
<a name="l746"></a> }
|
|
<a name="l747"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l748"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l749"></a>
|
|
<a name="l750"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>PRS1B_CLASS</span><span class=cF0>:
|
|
<a name="l751"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l752"></a> {
|
|
<a name="l753"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = union_base;
|
|
<a name="l754"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc->size - union_base < i)
|
|
<a name="l755"></a> tmpc->size = i + union_base;
|
|
<a name="l756"></a> }
|
|
<a name="l757"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l758"></a> {
|
|
<a name="l759"></a> tmpm-></span><span class=cF1>offset</span><span class=cF0> = tmpc->size;
|
|
<a name="l760"></a> tmpc->size += i;
|
|
<a name="l761"></a> }
|
|
<a name="l762"></a> tmpm->size = i;
|
|
<a name="l763"></a> </span><span class=cF1>if</span><span class=cF0> (mode & </span><span class=cF3>PRSF_UNION</span><span class=cF0>)
|
|
<a name="l764"></a> cc->class_dol_offset = union_base;
|
|
<a name="l765"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l766"></a> cc->class_dol_offset = tmpc->size;
|
|
<a name="l767"></a>
|
|
<a name="l768"></a> </span><span class=cF1>while</span><span class=cF0> (cc->token == </span><span class=cF3>TK_IDENT</span><span class=cF0>)
|
|
<a name="l769"></a> {
|
|
<a name="l770"></a> tmp_meta = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CMemberListMeta</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l771"></a> tmp_meta->next = tmpm->meta;
|
|
<a name="l772"></a> tmpm->meta = tmp_meta;
|
|
<a name="l773"></a> tmp_meta->str = cc->cur_str;
|
|
<a name="l774"></a> tmp_meta->flags = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l775"></a> cc->cur_str = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l776"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>TK_STR</span><span class=cF0>)
|
|
<a name="l777"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l778"></a> tmp_meta->user_data = </span><span class=cF5>LexExtStr</span><span class=cF0>(cc);
|
|
<a name="l779"></a> tmp_meta->flags |= </span><span class=cF3>MLMF_IS_STR</span><span class=cF0>;
|
|
<a name="l780"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l781"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l782"></a> tmp_meta->user_data = </span><span class=cF5>LexExpression</span><span class=cF0>(cc);
|
|
<a name="l783"></a> }
|
|
<a name="l784"></a> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(cc);
|
|
<a name="l785"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l786"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l787"></a> </span><span class=cF1>switch</span><span class=cF0> (cc->token)
|
|
<a name="l788"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l789"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>','</span><span class=cF0>:
|
|
<a name="l790"></a> </span><span class=cF1>if</span><span class=cF0> (mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_FUN_ARG</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>mode & </span><span class=cF3>PRSF_UNION</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l791"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l792"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l793"></a> {
|
|
<a name="l794"></a> first = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l795"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_restart2;
|
|
<a name="l796"></a> }
|
|
<a name="l797"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l798"></a>
|
|
<a name="l799"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>')'</span><span class=cF0>:
|
|
<a name="l800"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'}'</span><span class=cF0>:
|
|
<a name="l801"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l802"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_done;
|
|
<a name="l803"></a>
|
|
<a name="l804"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>';'</span><span class=cF0>:
|
|
<a name="l805"></a> cc->flags = cc->flags & ~</span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0> | old_flags & </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l806"></a> </span><span class=cF5>Lex</span><span class=cF0>(cc);
|
|
<a name="l807"></a> cc->flags |= </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>;
|
|
<a name="l808"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_LOCAL_VAR</span><span class=cF0> || mode.u8[</span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF3>PRS1B_STATIC_LOCAL_VAR</span><span class=cF7>)</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>mode & </span><span class=cF3>PRSF_UNION</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l809"></a> </span><span class=cF1>goto</span><span class=cF0> pvl_done;
|
|
<a name="l810"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l811"></a>
|
|
<a name="l812"></a> </span><span class=cF1>default</span><span class=cF0>:
|
|
<a name="l813"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc, </span><span class=cF6>"Missing ';' at"</span><span class=cF0>);
|
|
<a name="l814"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l815"></a> }
|
|
<a name="l816"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l817"></a>pvl_done:
|
|
<a name="l818"></a> cc->flags = cc->flags &
|
|
<a name="l819"></a> ~(</span><span class=cF3>CCF_CLASS_DOL_OFFSET</span><span class=cF0> | </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>) | old_flags & (</span><span class=cF3>CCF_CLASS_DOL_OFFSET</span><span class=cF0> | </span><span class=cF3>CCF_DONT_MAKE_RES</span><span class=cF0>);
|
|
<a name="l820"></a>}
|
|
</span></pre></body>
|
|
</html>
|