- implemented pass-by-reference arguments - so far only for memory based variables.
- changed Dehacked weapon function lookup to check the symbol table instead of directly referencing the VM functions. Once scriptified these pointers will no longer be available. - removed all special ATAGs from the VM. While well intentioned any pointer tagged with them is basically unusable because it'd trigger asserts all over the place. - scriptified A_Punch for testing pass-by-reference parameters and stack variables.
This commit is contained in:
parent
7ff5069617
commit
3ce699bf9b
20 changed files with 205 additions and 126 deletions
|
|
@ -87,7 +87,7 @@ begin:
|
|||
OP(LFP):
|
||||
ASSERTA(a); assert(sfunc != NULL); assert(sfunc->ExtraSpace > 0);
|
||||
reg.a[a] = f->GetExtra();
|
||||
reg.atag[a] = ATAG_FRAMEPOINTER;
|
||||
reg.atag[a] = ATAG_GENERIC; // using ATAG_FRAMEPOINTER will cause endless asserts.
|
||||
NEXTOP;
|
||||
|
||||
OP(LB):
|
||||
|
|
@ -461,7 +461,7 @@ begin:
|
|||
break;
|
||||
case REGT_INT | REGT_ADDROF:
|
||||
assert(C < f->NumRegD);
|
||||
::new(param) VMValue(®.d[C], ATAG_DREGISTER);
|
||||
::new(param) VMValue(®.d[C], ATAG_GENERIC);
|
||||
break;
|
||||
case REGT_INT | REGT_KONST:
|
||||
assert(C < sfunc->NumKonstD);
|
||||
|
|
@ -473,7 +473,7 @@ begin:
|
|||
break;
|
||||
case REGT_STRING | REGT_ADDROF:
|
||||
assert(C < f->NumRegS);
|
||||
::new(param) VMValue(®.s[C], ATAG_SREGISTER);
|
||||
::new(param) VMValue(®.s[C], ATAG_GENERIC);
|
||||
break;
|
||||
case REGT_STRING | REGT_KONST:
|
||||
assert(C < sfunc->NumKonstS);
|
||||
|
|
@ -485,7 +485,7 @@ begin:
|
|||
break;
|
||||
case REGT_POINTER | REGT_ADDROF:
|
||||
assert(C < f->NumRegA);
|
||||
::new(param) VMValue(®.a[C], ATAG_AREGISTER);
|
||||
::new(param) VMValue(®.a[C], ATAG_GENERIC);
|
||||
break;
|
||||
case REGT_POINTER | REGT_KONST:
|
||||
assert(C < sfunc->NumKonstA);
|
||||
|
|
@ -512,7 +512,7 @@ begin:
|
|||
break;
|
||||
case REGT_FLOAT | REGT_ADDROF:
|
||||
assert(C < f->NumRegF);
|
||||
::new(param) VMValue(®.f[C], ATAG_FREGISTER);
|
||||
::new(param) VMValue(®.f[C], ATAG_GENERIC);
|
||||
break;
|
||||
case REGT_FLOAT | REGT_KONST:
|
||||
assert(C < sfunc->NumKonstF);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue