Skip to content

Commit

Permalink
some more dt simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jan 29, 2013
1 parent 4815664 commit 067ee46
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 65 deletions.
10 changes: 10 additions & 0 deletions src/backend/dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ dt_t ** dtnbytes(dt_t **pdtend,unsigned size,const char *ptr)
* Construct a DTabytes record, and return it.
*/

dt_t **dtabytes(dt_t **pdtend, unsigned offset, unsigned size, const char *ptr)
{
return dtabytes(pdtend, TYnptr, offset, size, ptr);
}

dt_t **dtabytes(dt_t **pdtend,tym_t ty, unsigned offset, unsigned size, const char *ptr)
{ dt_t *dt;

Expand Down Expand Up @@ -257,6 +262,11 @@ dt_t ** dtcoff(dt_t **pdtend,unsigned offset)
* Construct a DTxoff record, and return it.
*/

dt_t ** dtxoff(dt_t **pdtend,symbol *s,unsigned offset)
{
return dtxoff(pdtend, s, offset, TYnptr);
}

dt_t ** dtxoff(dt_t **pdtend,symbol *s,unsigned offset,tym_t ty)
{ dt_t *dt;

Expand Down
2 changes: 2 additions & 0 deletions src/backend/dt.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ void dt_term();

dt_t **dtnbytes(dt_t **,unsigned,const char *);
dt_t **dtabytes(dt_t **pdtend,tym_t ty, unsigned offset, unsigned size, const char *ptr);
dt_t **dtabytes(dt_t **pdtend, unsigned offset, unsigned size, const char *ptr);
dt_t **dtdword(dt_t **, int value);
dt_t **dtsize_t(dt_t **, unsigned long long value);
dt_t **dtnzeros(dt_t **pdtend,unsigned size);
dt_t **dtxoff(dt_t **pdtend,Symbol *s,unsigned offset,tym_t ty);
dt_t **dtxoff(dt_t **pdtend,Symbol *s,unsigned offset);
dt_t **dtcoff(dt_t **pdtend,unsigned offset);
dt_t ** dtcat(dt_t **pdtend,dt_t *dt);
void dt_optimize(dt_t *dt);
Expand Down

0 comments on commit 067ee46

Please sign in to comment.