diff --git a/inst/include/Rcpp/Function.h b/inst/include/Rcpp/Function.h index d038a2176..298ba5fc7 100644 --- a/inst/include/Rcpp/Function.h +++ b/inst/include/Rcpp/Function.h @@ -111,6 +111,14 @@ namespace Rcpp{ Shield x( Rf_findFun( nameSym, env ) ) ; Storage::set__(x) ; } + + SEXP invoke(SEXP args_, SEXP env) const { + Shield args(args_); + Shield call(Rcpp_lcons(Storage::get__(), args)); + SEXP out = Rcpp_fast_eval(call, env); + return out; + } + }; typedef Function_Impl Function ; diff --git a/inst/include/Rcpp/generated/Function__operator.h b/inst/include/Rcpp/generated/Function__operator.h index d907cebdf..e17f34457 100644 --- a/inst/include/Rcpp/generated/Function__operator.h +++ b/inst/include/Rcpp/generated/Function__operator.h @@ -26,108 +26,108 @@ template SEXP operator()(ARGUMENTS){ - return Rcpp_fast_eval(Rf_lang2(Storage::get__(), pairlist(PARAMETERS)), R_GlobalEnv); + return invoke(pairlist(PARAMETERS), R_GlobalEnv); } */ template SEXP operator()(const T1& t1) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1)), R_GlobalEnv); + return invoke(pairlist(t1), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2)), R_GlobalEnv); + return invoke(pairlist(t1, t2), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19), R_GlobalEnv); } template SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20) const { - return Rcpp_fast_eval(Rcpp_lcons(Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20)), R_GlobalEnv); + return invoke(pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20), R_GlobalEnv); } /* */ diff --git a/inst/include/Rcpp/lang.h b/inst/include/Rcpp/lang.h index 025aafb70..26a86f3df 100644 --- a/inst/include/Rcpp/lang.h +++ b/inst/include/Rcpp/lang.h @@ -24,110 +24,35 @@ #define Rcpp_list1 Rf_list1 #define Rcpp_lang1 Rf_lang1 +#define Rcpp_list2 Rf_list2 +#define Rcpp_lang2 Rf_lang2 +#define Rcpp_list3 Rf_list3 +#define Rcpp_lang3 Rf_lang3 +#define Rcpp_list4 Rf_list4 +#define Rcpp_lang4 Rf_lang4 +#define Rcpp_list5 Rf_list5 +#define Rcpp_lang5 Rf_lang5 +#define Rcpp_list6 Rf_list6 +#define Rcpp_lang6 Rf_lang6 + +#define Rcpp_lcons Rf_lcons namespace Rcpp { -inline SEXP Rcpp_lcons(SEXP car, SEXP cdr){ - Shield out( Rf_lcons( car, cdr ) ); - return out ; -} - -inline SEXP Rcpp_list2( SEXP x0, SEXP x1 ){ - Shield out( Rf_cons(x0, Rcpp_list1(x1)) ); - return out; -} - -inline SEXP Rcpp_lang2( SEXP x0, SEXP x1 ){ - Shield out( Rf_lcons(x0, Rcpp_list1(x1)) ); - return out; -} - - - - - -inline SEXP Rcpp_list3( SEXP x0, SEXP x1, SEXP x2 ) -{ - Shield out( Rf_cons(x0, Rcpp_list2(x1, x2)) ); - return out; -} - -inline SEXP Rcpp_lang3( SEXP x0, SEXP x1, SEXP x2 ) -{ - Shield out(Rf_lcons(x0, Rcpp_list2(x1, x2)) ); - return out; -} - - - - - -inline SEXP Rcpp_list4( SEXP x0, SEXP x1, SEXP x2, SEXP x3 ) -{ - Shield out( Rf_cons(x0, Rcpp_list3(x1, x2, x3)) ); - - return out; -} - -inline SEXP Rcpp_lang4( SEXP x0, SEXP x1, SEXP x2, SEXP x3 ) -{ - Shield out( Rf_lcons(x0, Rcpp_list3(x1, x2, x3)) ); - - return out; -} - - - - - -inline SEXP Rcpp_list5( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4 ) -{ - Shield out( Rf_cons(x0, Rcpp_list4(x1, x2, x3, x4)) ); - - return out; -} - -inline SEXP Rcpp_lang5( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4 ) -{ - Shield out( Rf_lcons(x0, Rcpp_list4(x1, x2, x3, x4)) ); - - return out; -} - - - - - -inline SEXP Rcpp_list6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 ) -{ - Shield out( Rf_cons(x0, Rcpp_list5(x1, x2, x3, x4, x5)) ); - - return out; -} - -inline SEXP Rcpp_lang6( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5 ) -{ - Shield out( Rf_lcons(x0, Rcpp_list5(x1, x2, x3, x4, x5)) ); - - return out; -} - - - - - inline SEXP Rcpp_list7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6 ) { - Shield out( Rf_cons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6 ) { - Shield out( Rf_lcons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6)); + UNPROTECT(1); + return x0; } @@ -136,16 +61,18 @@ inline SEXP Rcpp_lang7( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SE inline SEXP Rcpp_list8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7 ) { - Shield out( Rf_cons(x0, Rcpp_list7(x1, x2, x3, x4, x5, x6, x7)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list7(x1, x2, x3, x4, x5, x6, x7)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7 ) { - Shield out( Rf_lcons(x0, Rcpp_list7(x1, x2, x3, x4, x5, x6, x7)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list7(x1, x2, x3, x4, x5, x6, x7)); + UNPROTECT(1); + return x0; } @@ -154,16 +81,18 @@ inline SEXP Rcpp_lang8( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SE inline SEXP Rcpp_list9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8 ) { - Shield out( Rf_cons(x0, Rcpp_list8(x1, x2, x3, x4, x5, x6, x7, x8)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list8(x1, x2, x3, x4, x5, x6, x7, x8)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8 ) { - Shield out( Rf_lcons(x0, Rcpp_list8(x1, x2, x3, x4, x5, x6, x7, x8)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list8(x1, x2, x3, x4, x5, x6, x7, x8)); + UNPROTECT(1); + return x0; } @@ -172,16 +101,18 @@ inline SEXP Rcpp_lang9( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SE inline SEXP Rcpp_list10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9 ) { - Shield out( Rf_cons(x0, Rcpp_list9(x1, x2, x3, x4, x5, x6, x7, x8, x9)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list9(x1, x2, x3, x4, x5, x6, x7, x8, x9)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9 ) { - Shield out( Rf_lcons(x0, Rcpp_list9(x1, x2, x3, x4, x5, x6, x7, x8, x9)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list9(x1, x2, x3, x4, x5, x6, x7, x8, x9)); + UNPROTECT(1); + return x0; } @@ -190,16 +121,18 @@ inline SEXP Rcpp_lang10( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10 ) { - Shield out( Rf_cons(x0, Rcpp_list10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10 ) { - Shield out( Rf_lcons(x0, Rcpp_list10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)); + UNPROTECT(1); + return x0; } @@ -208,16 +141,18 @@ inline SEXP Rcpp_lang11( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11 ) { - Shield out( Rf_cons(x0, Rcpp_list11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11 ) { - Shield out( Rf_lcons(x0, Rcpp_list11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list11(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)); + UNPROTECT(1); + return x0; } @@ -226,16 +161,18 @@ inline SEXP Rcpp_lang12( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12 ) { - Shield out( Rf_cons(x0, Rcpp_list12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12 ) { - Shield out( Rf_lcons(x0, Rcpp_list12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list12(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12)); + UNPROTECT(1); + return x0; } @@ -244,16 +181,18 @@ inline SEXP Rcpp_lang13( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13 ) { - Shield out( Rf_cons(x0, Rcpp_list13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13 ) { - Shield out( Rf_lcons(x0, Rcpp_list13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list13(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13)); + UNPROTECT(1); + return x0; } @@ -262,16 +201,18 @@ inline SEXP Rcpp_lang14( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14 ) { - Shield out( Rf_cons(x0, Rcpp_list14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14 ) { - Shield out( Rf_lcons(x0, Rcpp_list14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list14(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14)); + UNPROTECT(1); + return x0; } @@ -280,16 +221,18 @@ inline SEXP Rcpp_lang15( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15 ) { - Shield out( Rf_cons(x0, Rcpp_list15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15 ) { - Shield out( Rf_lcons(x0, Rcpp_list15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list15(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15)); + UNPROTECT(1); + return x0; } @@ -298,16 +241,18 @@ inline SEXP Rcpp_lang16( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16 ) { - Shield out( Rf_cons(x0, Rcpp_list16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16 ) { - Shield out( Rf_lcons(x0, Rcpp_list16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list16(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16)); + UNPROTECT(1); + return x0; } @@ -316,16 +261,18 @@ inline SEXP Rcpp_lang17( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17 ) { - Shield out( Rf_cons(x0, Rcpp_list17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17 ) { - Shield out( Rf_lcons(x0, Rcpp_list17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list17(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17)); + UNPROTECT(1); + return x0; } @@ -334,16 +281,18 @@ inline SEXP Rcpp_lang18( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18 ) { - Shield out( Rf_cons(x0, Rcpp_list18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18 ) { - Shield out( Rf_lcons(x0, Rcpp_list18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list18(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18)); + UNPROTECT(1); + return x0; } @@ -352,16 +301,18 @@ inline SEXP Rcpp_lang19( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, S inline SEXP Rcpp_list20( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19 ) { - Shield out( Rf_cons(x0, Rcpp_list19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19)) ); - - return out; + PROTECT(x0); + x0 = Rf_cons(x0, Rcpp_list19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19)); + UNPROTECT(1); + return x0; } inline SEXP Rcpp_lang20( SEXP x0, SEXP x1, SEXP x2, SEXP x3, SEXP x4, SEXP x5, SEXP x6, SEXP x7, SEXP x8, SEXP x9, SEXP x10, SEXP x11, SEXP x12, SEXP x13, SEXP x14, SEXP x15, SEXP x16, SEXP x17, SEXP x18, SEXP x19 ) { - Shield out( Rf_lcons(x0, Rcpp_list19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19)) ); - - return out; + PROTECT(x0); + x0 = Rf_lcons(x0, Rcpp_list19(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19)); + UNPROTECT(1); + return x0; } }