Commit ff4ff367 authored by Radford Neal's avatar Radford Neal

bug fixes. Now passes make check-all.

parent c06a0f61
......@@ -47,7 +47,7 @@
#include <helpers/helpers-app.h>
#define SCALAR_STACK_DEBUG 1
#define SCALAR_STACK_DEBUG 0
/* Inline version of findFun, meant to be fast when a special symbol is found
......@@ -2698,10 +2698,8 @@ SEXP attribute_hidden Rf_set_subassign (SEXP call, SEXP lhs, SEXP rhs, SEXP rho,
set_var_in_frame (var, newval, rho, TRUE, 3);
}
if (variant & VARIANT_NULL) {
if (ON_SCALAR_STACK(rhs)) POP_SCALAR_STACK(rhs);
if (variant & VARIANT_NULL)
return R_NilValue;
}
else {
DEC_NAMEDCNT(rhs);
return rhs;
......
......@@ -88,19 +88,21 @@
SCALAR_STACK_OFFSET(1))
#else
# define POP_SCALAR_STACK(x) \
(/* SCALAR_STACK_OFFSET(1) != (x) ? (void) abort() : */ \
/* REprintf("POP %llx\n",(long long)(x)), */ \
(/* REprintf("POP %llx %s %d\n", \
(long long)(x),__FILE__,__LINE__), */ \
SCALAR_STACK_OFFSET(1) != (x) ? (void) abort() : \
(void) (R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)-1)))
# define SLIDE_SCALAR_STACK(x,y) \
(/* SCALAR_STACK_OFFSET(2) != (x) || SCALAR_STACK_OFFSET(1) != (y) */ \
/* ? (abort(), 0) : */ \
(SCALAR_STACK_OFFSET(2) != (x) || SCALAR_STACK_OFFSET(1) != (y) \
? (abort(), 0) : \
(*(((VECTOR_SEXPREC_C*)R_scalar_stack)-1) = \
*((VECTOR_SEXPREC_C*)R_scalar_stack), \
R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)-1), \
SCALAR_STACK_OFFSET(1)))
# define PUSH_SCALAR_STACK(type) \
((TYPEOF(R_scalar_stack) = (type)), \
/* REprintf("PUSH %llx\n",(long long)R_scalar_stack), */ \
(/* REprintf("PUSH %llx %s %d\n", \
(long long)R_scalar_stack,__FILE__,__LINE__), */ \
(TYPEOF(R_scalar_stack) = (type)), \
(R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)+1)), \
SCALAR_STACK_OFFSET(1))
#endif
......
......@@ -1259,6 +1259,7 @@ static SEXP do_subassign_dflt_seq
UNPROTECT(3);
if (!isList(x)) SET_NAMEDCNT_0(x);
if(S4) SET_S4_OBJECT(x);
return x;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment