fix eval (quick fix).
This commit is contained in:
parent
add296ba37
commit
4ab17198b7
16
H/arith2.h
16
H/arith2.h
@ -147,6 +147,8 @@ do_sll(Int i, Int j)
|
||||
|
||||
static inline Term
|
||||
p_plus(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -203,6 +205,8 @@ p_plus(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_minus(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -263,6 +267,8 @@ p_minus(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_times(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -321,6 +327,8 @@ p_times(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_div(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -402,6 +410,8 @@ p_div(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_and(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -450,6 +460,8 @@ p_and(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_or(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch(ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -498,6 +510,8 @@ p_or(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_sll(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
@ -565,6 +579,8 @@ p_sll(Term t1, Term t2) {
|
||||
|
||||
static Term
|
||||
p_slr(Term t1, Term t2) {
|
||||
t1 = Yap_Eval(t1);
|
||||
t2 = Yap_Eval(t2);
|
||||
switch (ETypeOfTerm(t1)) {
|
||||
case long_int_e:
|
||||
switch (ETypeOfTerm(t2)) {
|
||||
|
Reference in New Issue
Block a user