git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1506
4a8a32a2-be11-0410-ad9d-
d568d2c75423
/* true if there is a call */
if (IS_PARM (op) &&
(lic->op == CALL ||
/* true if there is a call */
if (IS_PARM (op) &&
(lic->op == CALL ||
- lic->op == PCALL))
- if (isParameterToCall (IC_ARGS (lic), op))
+ lic->op == PCALL)) {
+ value *args;
+ if (lic->op == CALL) {
+ args=FUNC_ARGS(OP_SYMBOL(IC_LEFT(lic))->type);
+ } else {
+ args=FUNC_ARGS(OP_SYMBOL(IC_LEFT(lic))->type->next);
+ }
+ if (isParameterToCall (args, op))
if (SKIP_IC2 (lic))
continue;
if (SKIP_IC2 (lic))
continue;
return true */
if (lic->op == CALL || lic->op == PCALL)
{
return true */
if (lic->op == CALL || lic->op == PCALL)
{
+ value *args;
+ if (lic->op == CALL) {
+ args=FUNC_ARGS(OP_SYMBOL(IC_LEFT(lic))->type);
+ } else {
+ args=FUNC_ARGS(OP_SYMBOL(IC_LEFT(lic))->type->next);
+ }
- isParameterToCall (IC_ARGS (lic), op)) ||
+ isParameterToCall (args, op)) ||
isOperandGlobal (op))
return lic;
}
isOperandGlobal (op))
return lic;
}
case PCALL:
IC_RESULT (nic) = operandFromOperand (IC_RESULT (ic));
IC_LEFT (nic) = operandFromOperand (IC_LEFT (ic));
case PCALL:
IC_RESULT (nic) = operandFromOperand (IC_RESULT (ic));
IC_LEFT (nic) = operandFromOperand (IC_LEFT (ic));
- IC_ARGS (nic) = IC_ARGS (ic);
else
ic = newiCode (CALL, left, NULL);
else
ic = newiCode (CALL, left, NULL);
- IC_ARGS (ic) = FUNC_ARGS(left->operand.symOperand->type);
type = copyLinkChain (operandType (left)->next);
etype = getSpec (type);
SPEC_EXTR (etype) = 0;
type = copyLinkChain (operandType (left)->next);
etype = getSpec (type);
SPEC_EXTR (etype) = 0;
/* create a proc icode */
ic = newiCode (FUNCTION, func, NULL);
/* create a proc icode */
ic = newiCode (FUNCTION, func, NULL);
- /* if the function has parmas then */
- /* save the parameters information */
- ic->argLabel.args = tree->values.args;
ic->lineno = OP_SYMBOL (func)->lineDef;
ADDTOCHAIN (ic);
ic->lineno = OP_SYMBOL (func)->lineDef;
ADDTOCHAIN (ic);
#define IC_TRUE(x) (x)->ulrrcnd.cnd.trueLabel
#define IC_FALSE(x) (x)->ulrrcnd.cnd.falseLabel
#define IC_LABEL(x) (x)->argLabel.label
#define IC_TRUE(x) (x)->ulrrcnd.cnd.trueLabel
#define IC_FALSE(x) (x)->ulrrcnd.cnd.falseLabel
#define IC_LABEL(x) (x)->argLabel.label
-#define IC_ARGS(x) (x)->argLabel.args
+// jwk #define IC_ARGS(x) (x)->argLabel.args
#define IC_JTCOND(x) (x)->ulrrcnd.jmpTab.condition
#define IC_JTLABELS(x) (x)->ulrrcnd.jmpTab.labels
#define IC_INLINE(x) (x)->inlineAsm
#define IC_JTCOND(x) (x)->ulrrcnd.jmpTab.condition
#define IC_JTLABELS(x) (x)->ulrrcnd.jmpTab.labels
#define IC_INLINE(x) (x)->inlineAsm
union
{
symbol *label; /* for a goto statement */
union
{
symbol *label; /* for a goto statement */
- value *args; /* for a function */
+ // jwk value *args; /* for a function */