Skip to content

Commit

Permalink
dexp2.d in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Aug 13, 2017
1 parent 9b886b7 commit 0d06225
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dm/src/dmc/dexp2.d
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ extern __gshared list_t symlist; // for C
/*private*/ int paramlstcompat(param_t *,param_t *);
/*private*/ elem * strarg(elem *e);
/*private*/ elem * exp2_castx(elem *e,type *newt,elem **pethis,int flags);
/*private*/ int c1isbaseofc2x(elem **pethis,Symbol *c1,Symbol *c2,Classsym **psvirtual);
int type_exception_spec_match(type *t1, type *t2);
/*private*/ elem * defaultpromotions(elem *e);
/*private*/ elem * exp2_simpledtor(elem *e,type *t);
/*private*/ type * exp2_issimpletypename();


/* Array to give the 'relaxed' type for relaxed type checking */
extern __gshared ubyte[TYMAX] _tyrelax;
Expand All @@ -87,6 +93,7 @@ int REGSIZE() { return _tysize[TYnptr]; }

version (none)
{
}

/*******************************
* Read list of comma-separated arguments into *parglist.
Expand Down Expand Up @@ -2673,7 +2680,7 @@ void chkarithmetic(elem *e)
elem_debug(e);
t2 = null;
if (!tyarithmetic(e.EV.E1.ET.Tty) ||
!OTleaf(e.Eoper) && !tyarithmetic((t2 = e.EV.E2.ET).Tty))
OTbinary(e.Eoper) && !tyarithmetic((t2 = e.EV.E2.ET).Tty))
typerr(EM_illegal_op_types,e.EV.E1.ET,t2); // illegal operand types
}

Expand All @@ -2687,7 +2694,7 @@ void chkintegral(elem *e)
elem_debug(e);
t2 = null;
if (!tyintegral(e.EV.E1.ET.Tty) ||
!OTleaf(e.Eoper) && !tyintegral((t2 = e.EV.E2.ET).Tty))
OTbinary(e.Eoper) && !tyintegral((t2 = e.EV.E2.ET).Tty))
{
typerr(EM_illegal_op_types,e.EV.E1.ET,t2); // illegal operand types
}
Expand Down Expand Up @@ -3541,8 +3548,6 @@ int t1isbaseoft2(type *t1,type *t2)
* levels * 0x100 number of inheritance levels down c1 is from c2
*/

/*private*/ int c1isbaseofc2x(elem **pethis,Symbol *c1,Symbol *c2,Classsym **psvirtual);

int c1isbaseofc2(elem **pethis,Symbol *c1,Symbol *c2)
{ Classsym *svirtual;

Expand Down Expand Up @@ -5180,7 +5185,6 @@ void getinc(elem *e)
}
}

}

}

2 changes: 2 additions & 0 deletions dm/src/dmc/el.d
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ struct elem
{
version (SCPP)
Symbol* Emember; // if PEFmember, this is the member
version (HTOD)
Symbol* Emember; // if PEFmember, this is the member
pef_flags_t PEFflags;
}

Expand Down
6 changes: 6 additions & 0 deletions dm/src/dmc/exp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ static char __file__[] = __FILE__; /* for tassert.h */

extern list_t symlist; // for C

#undef STATIC
#define STATIC

STATIC elem * exp2_paramchk(elem *e,type *t,int param);
STATIC int typerelax(type *,type *);
STATIC int paramlstcompat(param_t *,param_t *);
Expand All @@ -46,6 +49,7 @@ STATIC elem * exp2_castx(elem *e,type *newt,elem **pethis,int flags);
* tok.TKval )
*/

#if 0
void getarglist(list_t *parglist)
{
//printf("+getarglist()\n");
Expand Down Expand Up @@ -5071,5 +5075,7 @@ void getinc(elem *e)
}
}

#endif

#endif /* !SPP */

0 comments on commit 0d06225

Please sign in to comment.