removed unneeded code

uniformize the naming of locptr, dbgl to dbgi
This commit is contained in:
2021-02-01 03:32:09 +00:00
parent 7d6436a4de
commit 65c23a3ff5
8 changed files with 29 additions and 315 deletions

View File

@ -813,19 +813,19 @@ int hcl_ignite (hcl_t* hcl)
hcl->code.bc.capa = HCL_BC_BUFFER_INIT;
}
if (!hcl->code.locptr)
if (!hcl->code.dbgi)
{
hcl->code.locptr = (hcl_oow_t*)hcl_allocmem(hcl, HCL_SIZEOF(*hcl->code.locptr) * HCL_BC_BUFFER_INIT);
if (HCL_UNLIKELY(!hcl->code.locptr))
hcl->code.dbgi = (hcl_oow_t*)hcl_allocmem(hcl, HCL_SIZEOF(*hcl->code.dbgi) * HCL_BC_BUFFER_INIT);
if (HCL_UNLIKELY(!hcl->code.dbgi))
{
/* bc.ptr and locptr go together. so free bc.ptr if locptr allocation fails */
/* bc.ptr and dbgi go together. so free bc.ptr if dbgi allocation fails */
hcl_freemem (hcl, hcl->code.bc.ptr);
hcl->code.bc.ptr = HCL_NULL;
hcl->code.bc.capa = 0;
return -1;
}
HCL_MEMSET (hcl->code.locptr, 0, HCL_SIZEOF(*hcl->code.locptr) * HCL_BC_BUFFER_INIT);
HCL_MEMSET (hcl->code.dbgi, 0, HCL_SIZEOF(*hcl->code.dbgi) * HCL_BC_BUFFER_INIT);
}
/* TODO: move code.lit.arr creation to hcl_init() after swithching to hcl_allocmem? */