History

Revert "Add predictability in CType initialization."

This reverts commit 93785149ed61b7165510ff30149f297cf0821c88.

Thomas Preud'homme committed 13 years ago

Commit 6f4983a1 parent ae33c301 file · +0 −6Browse files

Unified · Split

tccgen.c+0−6
@@ -361,7 +361,6 @@ void vpush64(int ty, unsigned long long v) · 360 unmodified lines
361 CValue cval;361 CValue cval;
362 CType ctype;362 CType ctype;
363 ctype.t = ty;363 ctype.t = ty;
364 ctype.ref = 0;
365 cval.ull = v;364 cval.ull = v;
366 vsetc(&ctype, VT_CONST, &cval);365 vsetc(&ctype, VT_CONST, &cval);
367}366}
@@ -1735,7 +1734,6 @@ ST_FUNC void gen_op(int op) · 1367 unmodified lines
1735 }1734 }
1736 vswap();1735 vswap();
1737 type1.t = t;1736 type1.t = t;
1738 type1.ref = 0;
1739 gen_cast(&type1);1737 gen_cast(&type1);
1740 vswap();1738 vswap();
1741 /* special case for shifts and long long: we keep the shift as1739 /* special case for shifts and long long: we keep the shift as
@@ -2719,7 +2717,6 @@ static void struct_decl(CType *type, int u) · 977 unmodified lines
2719 v = anon_sym++;2717 v = anon_sym++;
2720 }2718 }
2721 type1.t = a;2719 type1.t = a;
2722 type1.ref = 0;
2723 /* we put an undefined size for struct/union */2720 /* we put an undefined size for struct/union */
2724 s = sym_push(v | SYM_STRUCT, &type1, 0, -1);2721 s = sym_push(v | SYM_STRUCT, &type1, 0, -1);
2725 s->r = 0; /* default alignment is zero as gcc */2722 s->r = 0; /* default alignment is zero as gcc */
@@ -3399,7 +3396,6 @@ static void gfunc_param_typed(Sym *func, Sym *arg) · 673 unmodified lines
3399 /* default casting : only need to convert float to double */3396 /* default casting : only need to convert float to double */
3400 if ((vtop->type.t & VT_BTYPE) == VT_FLOAT) {3397 if ((vtop->type.t & VT_BTYPE) == VT_FLOAT) {
3401 type.t = VT_DOUBLE;3398 type.t = VT_DOUBLE;
3402 type.ref = 0;
3403 gen_cast(&type);3399 gen_cast(&type);
3404 }3400 }
3405 } else if (arg == NULL) {3401 } else if (arg == NULL) {
@@ -3596,7 +3592,6 @@ ST_FUNC void unary(void) · 190 unmodified lines
3596 if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST) {3592 if ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST) {
3597 CType boolean;3593 CType boolean;
3598 boolean.t = VT_BOOL;3594 boolean.t = VT_BOOL;
3599 boolean.ref = 0;
3600 gen_cast(&boolean);3595 gen_cast(&boolean);
3601 vtop->c.i = !vtop->c.i;3596 vtop->c.i = !vtop->c.i;
3602 } else if ((vtop->r & VT_VALMASK) == VT_CMP)3597 } else if ((vtop->r & VT_VALMASK) == VT_CMP)
@@ -4106,7 +4101,6 @@ static void expr_cond(void) · 503 unmodified lines
4106 CType boolean;4101 CType boolean;
4107 int c;4102 int c;
4108 boolean.t = VT_BOOL;4103 boolean.t = VT_BOOL;
4109 boolean.ref = 0;
4110 vdup();4104 vdup();
4111 gen_cast(&boolean);4105 gen_cast(&boolean);
4112 c = vtop->c.i;4106 c = vtop->c.i;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t