Reimplement 'parent' construct as variable $parent.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit also adds new controls to variables, which prevents from re-assigning a value when set. Thanks to that, both $this and $parent cannot be overwritten by using OP_STORE instruction. Other instructions still need some work.
This commit is contained in:
@@ -401,7 +401,7 @@ PH7_PRIVATE sxi32 PH7_CheckVarCompat(ph7_value *pObj, int nType) {
|
||||
* destination are of the compatible data types.
|
||||
*/
|
||||
PH7_PRIVATE sxi32 PH7_MemObjSafeStore(ph7_value *pSrc, ph7_value *pDest) {
|
||||
if(pDest->iFlags == 0 || pDest->iFlags == pSrc->iFlags) {
|
||||
if(pDest->iFlags == 0 || ((pDest->iFlags | MEMOBJ_FIXEDVAL | MEMOBJ_PARENTOBJ) == (pSrc->iFlags | MEMOBJ_FIXEDVAL | MEMOBJ_PARENTOBJ))) {
|
||||
PH7_MemObjStore(pSrc, pDest);
|
||||
} else if(pDest->iFlags & MEMOBJ_MIXED) {
|
||||
if(pDest->iFlags & MEMOBJ_HASHMAP) {
|
||||
|
Reference in New Issue
Block a user