Commit ff4ff367 authored by Radford Neal's avatar Radford Neal

bug fixes. Now passes make check-all.

parent c06a0f61
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#include <helpers/helpers-app.h> #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 /* 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, ...@@ -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); set_var_in_frame (var, newval, rho, TRUE, 3);
} }
if (variant & VARIANT_NULL) { if (variant & VARIANT_NULL)
if (ON_SCALAR_STACK(rhs)) POP_SCALAR_STACK(rhs);
return R_NilValue; return R_NilValue;
}
else { else {
DEC_NAMEDCNT(rhs); DEC_NAMEDCNT(rhs);
return rhs; return rhs;
......
...@@ -88,19 +88,21 @@ ...@@ -88,19 +88,21 @@
SCALAR_STACK_OFFSET(1)) SCALAR_STACK_OFFSET(1))
#else #else
# define POP_SCALAR_STACK(x) \ # define POP_SCALAR_STACK(x) \
(/* SCALAR_STACK_OFFSET(1) != (x) ? (void) abort() : */ \ (/* REprintf("POP %llx %s %d\n", \
/* REprintf("POP %llx\n",(long long)(x)), */ \ (long long)(x),__FILE__,__LINE__), */ \
SCALAR_STACK_OFFSET(1) != (x) ? (void) abort() : \
(void) (R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)-1))) (void) (R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)-1)))
# define SLIDE_SCALAR_STACK(x,y) \ # define SLIDE_SCALAR_STACK(x,y) \
(/* SCALAR_STACK_OFFSET(2) != (x) || SCALAR_STACK_OFFSET(1) != (y) */ \ (SCALAR_STACK_OFFSET(2) != (x) || SCALAR_STACK_OFFSET(1) != (y) \
/* ? (abort(), 0) : */ \ ? (abort(), 0) : \
(*(((VECTOR_SEXPREC_C*)R_scalar_stack)-1) = \ (*(((VECTOR_SEXPREC_C*)R_scalar_stack)-1) = \
*((VECTOR_SEXPREC_C*)R_scalar_stack), \ *((VECTOR_SEXPREC_C*)R_scalar_stack), \
R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)-1), \ R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)-1), \
SCALAR_STACK_OFFSET(1))) SCALAR_STACK_OFFSET(1)))
# define PUSH_SCALAR_STACK(type) \ # define PUSH_SCALAR_STACK(type) \
((TYPEOF(R_scalar_stack) = (type)), \ (/* REprintf("PUSH %llx %s %d\n", \
/* REprintf("PUSH %llx\n",(long long)R_scalar_stack), */ \ (long long)R_scalar_stack,__FILE__,__LINE__), */ \
(TYPEOF(R_scalar_stack) = (type)), \
(R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)+1)), \ (R_scalar_stack = (SEXP)(((VECTOR_SEXPREC_C*)R_scalar_stack)+1)), \
SCALAR_STACK_OFFSET(1)) SCALAR_STACK_OFFSET(1))
#endif #endif
......
...@@ -1259,6 +1259,7 @@ static SEXP do_subassign_dflt_seq ...@@ -1259,6 +1259,7 @@ static SEXP do_subassign_dflt_seq
UNPROTECT(3); UNPROTECT(3);
if (!isList(x)) SET_NAMEDCNT_0(x); if (!isList(x)) SET_NAMEDCNT_0(x);
if(S4) SET_S4_OBJECT(x); if(S4) SET_S4_OBJECT(x);
return 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