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

@ -277,13 +277,13 @@ static int emit_byte_instruction (hcl_t* hcl, hcl_oob_t bc, const hcl_ioloc_t* s
{
hcl_oow_t newcapa;
hcl_oob_t* tmp;
hcl_dbgl_t* tmp2;
hcl_dbgi_t* tmp2;
newcapa = HCL_ALIGN(hcl->code.bc.capa + 1, HCL_BC_BUFFER_ALIGN);
tmp = (hcl_oob_t*)hcl_reallocmem(hcl, hcl->code.bc.ptr, HCL_SIZEOF(*tmp) * newcapa);
if (HCL_UNLIKELY(!tmp)) return -1;
tmp2 = (hcl_dbgl_t*)hcl_reallocmem(hcl, hcl->code.locptr, HCL_SIZEOF(*tmp2) * newcapa);
tmp2 = (hcl_dbgi_t*)hcl_reallocmem(hcl, hcl->code.dbgi, HCL_SIZEOF(*tmp2) * newcapa);
if (HCL_UNLIKELY(!tmp2))
{
hcl_freemem (hcl, tmp);
@ -293,15 +293,15 @@ static int emit_byte_instruction (hcl_t* hcl, hcl_oob_t bc, const hcl_ioloc_t* s
hcl->code.bc.ptr = tmp;
hcl->code.bc.capa = newcapa;
hcl->code.locptr = tmp2;
hcl->code.dbgi = tmp2;
}
hcl->code.bc.ptr[hcl->code.bc.len] = bc;
if (srcloc)
{
hcl->code.locptr[hcl->code.bc.len].fname = srcloc->file;
hcl->code.locptr[hcl->code.bc.len].sline = srcloc->line;
hcl->code.dbgi[hcl->code.bc.len].fname = srcloc->file;
hcl->code.dbgi[hcl->code.bc.len].sline = srcloc->line;
}
hcl->code.bc.len++;