Do not duplicate variable name in this case.
The build was successful. Details

This should save a lot of memory on many method calls.
This commit is contained in:
Rafal Kupiec 2019-06-14 10:17:50 +02:00
parent 673796d878
commit d09a33da55
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 2 deletions

View File

@ -4688,7 +4688,7 @@ static sxi32 VmByteCodeExec(
if(pThis && pVmFunc->iFlags & VM_FUNC_CLASS_METHOD) {
/* Install the '$parent' variable */
static const SyString sParent = { "parent", sizeof("parent") - 1 };
pObj = VmCreateMemObj(&(*pVm), &sParent, TRUE);
pObj = VmCreateMemObj(&(*pVm), &sParent, FALSE);
if(pObj) {
/* Reflect the change */
pObj->iFlags = MEMOBJ_PARENTOBJ;
@ -4697,7 +4697,7 @@ static sxi32 VmByteCodeExec(
}
/* Install the '$this' variable */
static const SyString sThis = { "this", sizeof("this") - 1 };
pObj = VmCreateMemObj(&(*pVm), &sThis, TRUE);
pObj = VmCreateMemObj(&(*pVm), &sThis, FALSE);
if(pObj) {
/* Reflect the change */
pObj->iFlags = MEMOBJ_THISOBJ;