Skip to content

Commit bb77fb9

Browse files
committed
dexp2.d in progress
1 parent 9b886b7 commit bb77fb9

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

dm/src/dmc/dexp2.d

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ extern __gshared list_t symlist; // for C
7373
/*private*/ int paramlstcompat(param_t *,param_t *);
7474
/*private*/ elem * strarg(elem *e);
7575
/*private*/ elem * exp2_castx(elem *e,type *newt,elem **pethis,int flags);
76+
/*private*/ int c1isbaseofc2x(elem **pethis,Symbol *c1,Symbol *c2,Classsym **psvirtual);
77+
int type_exception_spec_match(type *t1, type *t2);
78+
/*private*/ elem * defaultpromotions(elem *e);
79+
/*private*/ elem * exp2_simpledtor(elem *e,type *t);
80+
/*private*/ type * exp2_issimpletypename();
81+
7682

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

8894
version (none)
8995
{
96+
}
9097

9198
/*******************************
9299
* Read list of comma-separated arguments into *parglist.
@@ -2673,7 +2680,7 @@ void chkarithmetic(elem *e)
26732680
elem_debug(e);
26742681
t2 = null;
26752682
if (!tyarithmetic(e.EV.E1.ET.Tty) ||
2676-
!OTleaf(e.Eoper) && !tyarithmetic((t2 = e.EV.E2.ET).Tty))
2683+
OTbinary(e.Eoper) && !tyarithmetic((t2 = e.EV.E2.ET).Tty))
26772684
typerr(EM_illegal_op_types,e.EV.E1.ET,t2); // illegal operand types
26782685
}
26792686

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

3544-
/*private*/ int c1isbaseofc2x(elem **pethis,Symbol *c1,Symbol *c2,Classsym **psvirtual);
3545-
35463551
int c1isbaseofc2(elem **pethis,Symbol *c1,Symbol *c2)
35473552
{ Classsym *svirtual;
35483553

@@ -5180,7 +5185,6 @@ void getinc(elem *e)
51805185
}
51815186
}
51825187

5183-
}
51845188

51855189
}
51865190

dm/src/dmc/el.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ struct elem
8484
{
8585
version (SCPP)
8686
Symbol* Emember; // if PEFmember, this is the member
87+
version (HTOD)
88+
Symbol* Emember; // if PEFmember, this is the member
8789
pef_flags_t PEFflags;
8890
}
8991

dm/src/dmc/exp2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ static char __file__[] = __FILE__; /* for tassert.h */
3232

3333
extern list_t symlist; // for C
3434

35+
#undef STATIC
36+
#define STATIC
37+
3538
STATIC elem * exp2_paramchk(elem *e,type *t,int param);
3639
STATIC int typerelax(type *,type *);
3740
STATIC int paramlstcompat(param_t *,param_t *);
@@ -46,6 +49,7 @@ STATIC elem * exp2_castx(elem *e,type *newt,elem **pethis,int flags);
4649
* tok.TKval )
4750
*/
4851

52+
#if 0
4953
void getarglist(list_t *parglist)
5054
{
5155
//printf("+getarglist()\n");
@@ -5071,5 +5075,7 @@ void getinc(elem *e)
50715075
}
50725076
}
50735077

5078+
#endif
5079+
50745080
#endif /* !SPP */
50755081

dm/src/dmc/obj.d

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ class Obj
3434
void term(const(char)* objfilename);
3535

3636
size_t mangle(Symbol *s,char *dest);
37-
void _import(elem *e);
37+
version (SCPP)
38+
static void _import(elem *e);
39+
else version (HTOD)
40+
static void _import(elem *e);
41+
else
42+
void _import(elem *e);
3843
void linnum(Srcpos srcpos, int seg, targ_size_t offset);
3944
int codeseg(char *name,int suffix);
4045
void dosseg();

0 commit comments

Comments
 (0)