Avoid using repeated fiels names ( u -> ut ).
This commit is contained in:
parent
b815e64740
commit
c3d0504a54
12
C/absmi.c
12
C/absmi.c
@ -4447,7 +4447,7 @@ Yap_absmi(int inp)
|
|||||||
FAIL();
|
FAIL();
|
||||||
}
|
}
|
||||||
BEGP(pt1);
|
BEGP(pt1);
|
||||||
pt1 = RepAppl(PREG->u.xu.u);
|
pt1 = RepAppl(PREG->u.xu.ut);
|
||||||
PREG = NEXTOP(PREG, xu);
|
PREG = NEXTOP(PREG, xu);
|
||||||
if (
|
if (
|
||||||
pt1[1] != pt0[1] ||
|
pt1[1] != pt0[1] ||
|
||||||
@ -4465,7 +4465,7 @@ Yap_absmi(int inp)
|
|||||||
/* set d1 to be the new structure we are going to create */
|
/* set d1 to be the new structure we are going to create */
|
||||||
START_PREFETCH(xc);
|
START_PREFETCH(xc);
|
||||||
BEGD(d1);
|
BEGD(d1);
|
||||||
d1 = PREG->u.xu.u;
|
d1 = PREG->u.xu.ut;
|
||||||
PREG = NEXTOP(PREG, xu);
|
PREG = NEXTOP(PREG, xu);
|
||||||
Bind(pt0, d1);
|
Bind(pt0, d1);
|
||||||
GONext();
|
GONext();
|
||||||
@ -6159,7 +6159,7 @@ Yap_absmi(int inp)
|
|||||||
}
|
}
|
||||||
ENDD(d0);
|
ENDD(d0);
|
||||||
BEGP(pt1);
|
BEGP(pt1);
|
||||||
pt1 = RepAppl(PREG->u.ou.u);
|
pt1 = RepAppl(PREG->u.ou.ut);
|
||||||
PREG = NEXTOP(PREG, ou);
|
PREG = NEXTOP(PREG, ou);
|
||||||
if (
|
if (
|
||||||
pt1[1] != pt0[1]
|
pt1[1] != pt0[1]
|
||||||
@ -6171,7 +6171,7 @@ Yap_absmi(int inp)
|
|||||||
|
|
||||||
derefa_body(d0, pt0, ustring_unk, ustring_nonvar);
|
derefa_body(d0, pt0, ustring_unk, ustring_nonvar);
|
||||||
BEGD(d1);
|
BEGD(d1);
|
||||||
d1 = PREG->u.ou.u;
|
d1 = PREG->u.ou.ut;
|
||||||
PREG = NEXTOP(PREG, ou);
|
PREG = NEXTOP(PREG, ou);
|
||||||
Bind_Global(pt0, d1);
|
Bind_Global(pt0, d1);
|
||||||
GONext();
|
GONext();
|
||||||
@ -6199,7 +6199,7 @@ Yap_absmi(int inp)
|
|||||||
}
|
}
|
||||||
ENDD(d0);
|
ENDD(d0);
|
||||||
BEGP(pt1);
|
BEGP(pt1);
|
||||||
pt1 = RepAppl(PREG->u.ou.u);
|
pt1 = RepAppl(PREG->u.ou.ut);
|
||||||
PREG = NEXTOP(PREG, ou);
|
PREG = NEXTOP(PREG, ou);
|
||||||
if (
|
if (
|
||||||
pt1[1] != pt0[1]
|
pt1[1] != pt0[1]
|
||||||
@ -6211,7 +6211,7 @@ Yap_absmi(int inp)
|
|||||||
|
|
||||||
derefa_body(d0, S_SREG, ulstring_unk, ulstring_nonvar);
|
derefa_body(d0, S_SREG, ulstring_unk, ulstring_nonvar);
|
||||||
BEGD(d1);
|
BEGD(d1);
|
||||||
d1 = PREG->u.ou.u;
|
d1 = PREG->u.ou.ut;
|
||||||
PREG = NEXTOP(PREG, ou);
|
PREG = NEXTOP(PREG, ou);
|
||||||
Bind_Global(S_SREG, d1);
|
Bind_Global(S_SREG, d1);
|
||||||
GONext();
|
GONext();
|
||||||
|
@ -1149,7 +1149,7 @@ a_ustring(CELL rnd1, op_numbers opcode, op_numbers opcode_w, int *clause_has_blo
|
|||||||
if (pass_no) {
|
if (pass_no) {
|
||||||
code_p->opc = emit_op(opcode);
|
code_p->opc = emit_op(opcode);
|
||||||
code_p->u.ou.opcw = emit_op(opcode_w);
|
code_p->u.ou.opcw = emit_op(opcode_w);
|
||||||
code_p->u.ou.u =
|
code_p->u.ou.ut =
|
||||||
AbsAppl((CELL *)(Unsigned(cip->code_addr) + cip->label_offset[rnd1]));
|
AbsAppl((CELL *)(Unsigned(cip->code_addr) + cip->label_offset[rnd1]));
|
||||||
}
|
}
|
||||||
*clause_has_blobsp = TRUE;
|
*clause_has_blobsp = TRUE;
|
||||||
@ -1403,7 +1403,7 @@ a_rstring(op_numbers opcode, int *clause_has_blobsp, yamop *code_p, int pass_no,
|
|||||||
if (pass_no) {
|
if (pass_no) {
|
||||||
code_p->opc = emit_op(opcode);
|
code_p->opc = emit_op(opcode);
|
||||||
code_p->u.xu.x = emit_x(cip->cpc->rnd2);
|
code_p->u.xu.x = emit_x(cip->cpc->rnd2);
|
||||||
code_p->u.xu.u = AbsAppl((CELL *)(Unsigned(cip->code_addr) + cip->label_offset[cip->cpc->rnd1]));
|
code_p->u.xu.ut = AbsAppl((CELL *)(Unsigned(cip->code_addr) + cip->label_offset[cip->cpc->rnd1]));
|
||||||
}
|
}
|
||||||
*clause_has_blobsp = TRUE;
|
*clause_has_blobsp = TRUE;
|
||||||
GONEXT(xu);
|
GONEXT(xu);
|
||||||
|
8
C/eval.c
8
C/eval.c
@ -104,7 +104,13 @@ Eval(Term t USES_REGS)
|
|||||||
return Yap_eval_atom(p->FOfEE);
|
return Yap_eval_atom(p->FOfEE);
|
||||||
} else if (IsApplTerm(t)) {
|
} else if (IsApplTerm(t)) {
|
||||||
Functor fun = FunctorOfTerm(t);
|
Functor fun = FunctorOfTerm(t);
|
||||||
if ((Atom)fun == AtomFoundVar) {
|
if (fun == FunctorString) {
|
||||||
|
const char *s = StringOfTerm(t);
|
||||||
|
if (s[1] == '\0')
|
||||||
|
return MkIntegerTerm(s[0]);
|
||||||
|
return Yap_ArithError(TYPE_ERROR_EVALUABLE, t,
|
||||||
|
"string in arithmetic expression");
|
||||||
|
} else if ((Atom)fun == AtomFoundVar) {
|
||||||
return Yap_ArithError(TYPE_ERROR_EVALUABLE, TermNil,
|
return Yap_ArithError(TYPE_ERROR_EVALUABLE, TermNil,
|
||||||
"cyclic term in arithmetic expression");
|
"cyclic term in arithmetic expression");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1205,7 +1205,7 @@ add_arg_info(ClauseDef *clause, PredEntry *ap, UInt argno)
|
|||||||
case _unify_l_string:
|
case _unify_l_string:
|
||||||
if (argno == 1) {
|
if (argno == 1) {
|
||||||
clause->Tag = AbsAppl((CELL *)FunctorString);
|
clause->Tag = AbsAppl((CELL *)FunctorString);
|
||||||
clause->ucd.t_ptr = cl->u.ou.u;
|
clause->ucd.t_ptr = cl->u.ou.ut;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cl = NEXTOP(cl,ou);
|
cl = NEXTOP(cl,ou);
|
||||||
|
@ -561,7 +561,7 @@ typedef struct yami {
|
|||||||
} os;
|
} os;
|
||||||
struct {
|
struct {
|
||||||
OPCODE opcw;
|
OPCODE opcw;
|
||||||
Term u;
|
Term ut;
|
||||||
CELL next;
|
CELL next;
|
||||||
} ou;
|
} ou;
|
||||||
struct {
|
struct {
|
||||||
@ -791,7 +791,7 @@ typedef struct yami {
|
|||||||
} xx;
|
} xx;
|
||||||
struct {
|
struct {
|
||||||
wamreg x;
|
wamreg x;
|
||||||
Term u;
|
Term ut;
|
||||||
CELL next;
|
CELL next;
|
||||||
} xu;
|
} xu;
|
||||||
struct {
|
struct {
|
||||||
|
@ -389,7 +389,7 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
|||||||
case _unify_l_string:
|
case _unify_l_string:
|
||||||
case _unify_string:
|
case _unify_string:
|
||||||
pc->u.ou.opcw = OpcodeAdjust(pc->u.ou.opcw);
|
pc->u.ou.opcw = OpcodeAdjust(pc->u.ou.opcw);
|
||||||
pc->u.ou.u = BlobTermInCodeAdjust(pc->u.ou.u);
|
pc->u.ou.ut = BlobTermInCodeAdjust(pc->u.ou.ut);
|
||||||
pc = NEXTOP(pc,ou);
|
pc = NEXTOP(pc,ou);
|
||||||
break;
|
break;
|
||||||
/* instructions type ox */
|
/* instructions type ox */
|
||||||
@ -643,7 +643,7 @@ restore_opcodes(yamop *pc, yamop *max USES_REGS)
|
|||||||
/* instructions type xu */
|
/* instructions type xu */
|
||||||
case _get_string:
|
case _get_string:
|
||||||
pc->u.xu.x = XAdjust(pc->u.xu.x);
|
pc->u.xu.x = XAdjust(pc->u.xu.x);
|
||||||
pc->u.xu.u = BlobTermInCodeAdjust(pc->u.xu.u);
|
pc->u.xu.ut = BlobTermInCodeAdjust(pc->u.xu.ut);
|
||||||
pc = NEXTOP(pc,xu);
|
pc = NEXTOP(pc,xu);
|
||||||
break;
|
break;
|
||||||
/* instructions type xx */
|
/* instructions type xx */
|
||||||
|
@ -406,7 +406,7 @@
|
|||||||
case _unify_l_string:
|
case _unify_l_string:
|
||||||
case _unify_string:
|
case _unify_string:
|
||||||
CHECK(save_Opcode(stream, pc->u.ou.opcw));
|
CHECK(save_Opcode(stream, pc->u.ou.opcw));
|
||||||
CHECK(save_BlobTermInCode(stream, pc->u.ou.u));
|
CHECK(save_BlobTermInCode(stream, pc->u.ou.ut));
|
||||||
pc = NEXTOP(pc,ou);
|
pc = NEXTOP(pc,ou);
|
||||||
break;
|
break;
|
||||||
/* instructions type ox */
|
/* instructions type ox */
|
||||||
@ -659,7 +659,7 @@
|
|||||||
/* instructions type xu */
|
/* instructions type xu */
|
||||||
case _get_string:
|
case _get_string:
|
||||||
CHECK(save_X(stream, pc->u.xu.x));
|
CHECK(save_X(stream, pc->u.xu.x));
|
||||||
CHECK(save_BlobTermInCode(stream, pc->u.xu.u));
|
CHECK(save_BlobTermInCode(stream, pc->u.xu.ut));
|
||||||
pc = NEXTOP(pc,xu);
|
pc = NEXTOP(pc,xu);
|
||||||
break;
|
break;
|
||||||
/* instructions type xx */
|
/* instructions type xx */
|
||||||
|
Reference in New Issue
Block a user