1 #ifndef VCTRS_UTILS_H
2 #define VCTRS_UTILS_H
3
4 #include "arg-counter.h"
5 #include "utils-rlang.h"
6
7
8 #define SWAP(T, x, y) do { \
9 T tmp = x; \
10 x = y; \
11 y = tmp; \
12 } while (0)
13
14 #define PROTECT_N(x, n) (++*n, PROTECT(x))
15 #define PROTECT2(x, y) (PROTECT(x), PROTECT(y))
16
17 enum vctrs_class_type {
18 vctrs_class_list,
19 vctrs_class_data_frame,
20 vctrs_class_bare_data_frame,
21 vctrs_class_bare_tibble,
22 vctrs_class_bare_factor,
23 vctrs_class_bare_ordered,
24 vctrs_class_bare_date,
25 vctrs_class_bare_posixct,
26 vctrs_class_bare_posixlt,
27 vctrs_class_unknown,
28 vctrs_class_none
29 };
30
31 bool r_is_bool(SEXP x);
32 int r_bool_as_int(SEXP x);
33
34 SEXP vctrs_eval_mask_n(SEXP fn,
35 SEXP* syms, SEXP* args);
36 SEXP vctrs_eval_mask1(SEXP fn,
37 SEXP x_sym, SEXP x);
38 SEXP vctrs_eval_mask2(SEXP fn,
39 SEXP x_sym, SEXP x,
40 SEXP y_sym, SEXP y);
41 SEXP vctrs_eval_mask3(SEXP fn,
42 SEXP x_sym, SEXP x,
43 SEXP y_sym, SEXP y,
44 SEXP z_sym, SEXP z);
45 SEXP vctrs_eval_mask4(SEXP fn,
46 SEXP x1_sym, SEXP x1,
47 SEXP x2_sym, SEXP x2,
48 SEXP x3_sym, SEXP x3,
49 SEXP x4_sym, SEXP x4);
50 SEXP vctrs_eval_mask5(SEXP fn,
51 SEXP x1_sym, SEXP x1,
52 SEXP x2_sym, SEXP x2,
53 SEXP x3_sym, SEXP x3,
54 SEXP x4_sym, SEXP x4,
55 SEXP x5_sym, SEXP x5);
56 SEXP vctrs_eval_mask6(SEXP fn,
57 SEXP x1_sym, SEXP x1,
58 SEXP x2_sym, SEXP x2,
59 SEXP x3_sym, SEXP x3,
60 SEXP x4_sym, SEXP x4,
61 SEXP x5_sym, SEXP x5,
62 SEXP x6_sym, SEXP x6);
63 SEXP vctrs_eval_mask7(SEXP fn,
64 SEXP x1_sym, SEXP x1,
65 SEXP x2_sym, SEXP x2,
66 SEXP x3_sym, SEXP x3,
67 SEXP x4_sym, SEXP x4,
68 SEXP x5_sym, SEXP x5,
69 SEXP x6_sym, SEXP x6,
70 SEXP x7_sym, SEXP x7);
71
72 SEXP vctrs_dispatch_n(SEXP fn_sym, SEXP fn,
73 SEXP* syms, SEXP* args);
74 SEXP vctrs_dispatch1(SEXP fn_sym, SEXP fn,
75 SEXP x_sym, SEXP x);
76 SEXP vctrs_dispatch2(SEXP fn_sym, SEXP fn,
77 SEXP x_sym, SEXP x,
78 SEXP y_sym, SEXP y);
79 SEXP vctrs_dispatch3(SEXP fn_sym, SEXP fn,
80 SEXP x_sym, SEXP x,
81 SEXP y_sym, SEXP y,
82 SEXP z_sym, SEXP z);
83 SEXP vctrs_dispatch4(SEXP fn_sym, SEXP fn,
84 SEXP w_sym, SEXP w,
85 SEXP x_sym, SEXP x,
86 SEXP y_sym, SEXP y,
87 SEXP z_sym, SEXP z);
88 SEXP vctrs_dispatch6(SEXP fn_sym, SEXP fn,
89 SEXP x1_sym, SEXP x1,
90 SEXP x2_sym, SEXP x2,
91 SEXP x3_sym, SEXP x3,
92 SEXP x4_sym, SEXP x4,
93 SEXP x5_sym, SEXP x5,
94 SEXP x6_sym, SEXP x6);
95
96 __attribute__((noreturn)) void r_abort(const char* fmt, ...);
97 __attribute__((noreturn)) void stop_internal(const char* fn, const char* fmt, ...);
98 __attribute__((noreturn)) void stop_unimplemented_vctrs_type(const char* fn, enum vctrs_type);
99
100 static inline
101 __attribute__((noreturn))
stop_unimplemented_type(const char * fn,SEXPTYPE type)102 void stop_unimplemented_type(const char* fn, SEXPTYPE type) {
103 stop_internal(fn, "Unimplemented type `%s`.", Rf_type2char(type));
104 }
105
106
107 SEXP map(SEXP x, SEXP (*fn)(SEXP));
108 SEXP map_with_data(SEXP x, SEXP (*fn)(SEXP, void*), void* data);
109 SEXP df_map(SEXP df, SEXP (*fn)(SEXP));
110 SEXP bare_df_map(SEXP df, SEXP (*fn)(SEXP));
111
112 enum vctrs_class_type class_type(SEXP x);
113 bool is_data_frame(SEXP x);
114 bool is_bare_data_frame(SEXP x);
115 bool is_bare_tibble(SEXP x);
116
117 SEXP int_resize(SEXP x, r_ssize x_size, r_ssize size);
118 SEXP raw_resize(SEXP x, r_ssize x_size, r_ssize size);
119 SEXP chr_resize(SEXP x, r_ssize x_size, r_ssize size);
120
121 SEXP vec_unique_names(SEXP x, bool quiet);
122 SEXP vec_unique_colnames(SEXP x, bool quiet);
123
124 // Returns S3 / S4 method for `generic` suitable for the class of `x`. The
125 // inheritance hierarchy is explored except for the default method.
126 SEXP s3_get_method(const char* generic, const char* cls, SEXP table);
127 SEXP s3_sym_get_method(SEXP sym, SEXP table);
128 SEXP s3_find_method(const char* generic, SEXP x, SEXP table);
129 SEXP s3_class_find_method(const char* generic, SEXP class, SEXP table);
130 SEXP s3_get_class(SEXP x);
131 SEXP s3_find_method_xy(const char* generic,
132 SEXP x,
133 SEXP y,
134 SEXP table,
135 SEXP* method_sym_out);
136 SEXP s3_find_method2(const char* generic,
137 SEXP x,
138 SEXP table,
139 SEXP* method_sym_out);
140 SEXP s3_paste_method_sym(const char* generic, const char* cls);
141 SEXP s3_bare_class(SEXP x);
142 SEXP s4_find_method(SEXP x, SEXP table);
143 SEXP s4_class_find_method(SEXP class, SEXP table);
144 bool vec_implements_ptype2(SEXP x);
145
146 SEXP r_env_get(SEXP env, SEXP sym);
147
148 static inline
r_env_poke(SEXP env,SEXP sym,SEXP value)149 void r_env_poke(SEXP env, SEXP sym, SEXP value) {
150 Rf_defineVar(sym, value, env);
151 }
152
153 extern SEXP syms_s3_methods_table;
s3_get_table(SEXP env)154 static inline SEXP s3_get_table(SEXP env) {
155 return r_env_get(env, syms_s3_methods_table);
156 }
157
158
159 SEXP list_first_non_null(SEXP xs, R_len_t* non_null_i);
160 bool list_is_homogeneously_classed(SEXP xs);
161
162 // Destructive compacting
163 SEXP node_compact_d(SEXP xs);
164
165 extern struct vctrs_arg args_empty_;
166 static struct vctrs_arg* const args_empty = &args_empty_;
167
168 extern struct vctrs_arg args_dot_ptype_;
169 static struct vctrs_arg* const args_dot_ptype = &args_dot_ptype_;
170
171 extern struct vctrs_arg args_max_fill_;
172 static struct vctrs_arg* const args_max_fill = &args_max_fill_;
173
174 void never_reached(const char* fn) __attribute__((noreturn));
175
176 enum vctrs_type2 vec_typeof2_impl(enum vctrs_type type_x, enum vctrs_type type_y, int* left);
177 enum vctrs_type2_s3 vec_typeof2_s3_impl(SEXP x, SEXP y, enum vctrs_type type_x, enum vctrs_type type_y, int* left);
178
179 enum vctrs_class_type class_type(SEXP x);
180
181 SEXP new_empty_factor(SEXP levels);
182 SEXP new_empty_ordered(SEXP levels);
183
184 bool list_has_inner_vec_names(SEXP x, R_len_t size);
185 SEXP list_pluck(SEXP xs, R_len_t i);
186
187 void init_compact_seq(int* p, R_len_t start, R_len_t size, bool increasing);
188 SEXP compact_seq(R_len_t start, R_len_t size, bool increasing);
189 bool is_compact_seq(SEXP x);
190
191 void init_compact_rep(int* p, R_len_t i, R_len_t n);
192 SEXP compact_rep(R_len_t i, R_len_t n);
193 bool is_compact_rep(SEXP x);
194
195 bool is_compact(SEXP x);
196 SEXP compact_materialize(SEXP x);
197 R_len_t vec_subscript_size(SEXP x);
198
199 bool is_integer64(SEXP x);
200
201 bool lgl_any_na(SEXP x);
202
203 SEXP apply_name_spec(SEXP name_spec, SEXP outer, SEXP inner, R_len_t n);
204 SEXP outer_names(SEXP names, SEXP outer, R_len_t n);
205 SEXP vec_set_names(SEXP x, SEXP names);
206 SEXP colnames(SEXP x);
207
208 R_len_t size_validate(SEXP size, const char* arg);
209
210 extern bool (*rlang_is_splice_box)(SEXP);
211 extern SEXP (*rlang_unbox)(SEXP);
212 extern SEXP (*rlang_env_dots_values)(SEXP);
213 extern SEXP (*rlang_env_dots_list)(SEXP);
214
215 void* r_vec_deref(SEXP x);
216 const void* r_vec_deref_const(SEXP x);
217 void* r_vec_deref_barrier(SEXP x);
218 const void* r_vec_deref_barrier_const(SEXP x);
219
220 void r_vec_fill(SEXPTYPE type,
221 void* p_dest,
222 r_ssize dest_i,
223 const void* p_src,
224 r_ssize src_i,
225 r_ssize n);
226
227 r_ssize r_lgl_sum(SEXP lgl, bool na_true);
228 SEXP r_lgl_which(SEXP x, bool na_true);
229
230 void r_lgl_fill(SEXP x, int value, R_len_t n);
231 void r_int_fill(SEXP x, int value, R_len_t n);
232 void r_chr_fill(SEXP x, SEXP value, R_len_t n);
233
234 void r_p_lgl_fill(int* p_x, int value, R_len_t n);
235 void r_p_int_fill(int* p_x, int value, R_len_t n);
236 void r_p_chr_fill(SEXP* p_x, SEXP value, R_len_t n);
237
238 void r_int_fill_seq(SEXP x, int start, R_len_t n);
239 SEXP r_seq(R_len_t from, R_len_t to);
240 bool r_int_any_na(SEXP x);
241
242 R_len_t r_chr_find(SEXP x, SEXP value);
243
244 #define r_resize Rf_xlengthgets
245
246 int r_chr_max_len(SEXP x);
247 SEXP r_chr_iota(R_len_t n, char* buf, int len, const char* prefix);
248
249 #define R_LAZY_ALLOC(SYM, PI, R_TYPE, SIZE) do { \
250 if (SYM == R_NilValue) { \
251 SYM = Rf_allocVector(R_TYPE, SIZE); \
252 REPROTECT(SYM, PI); \
253 } \
254 } while (0);
255
256 static inline
r_new_logical(R_len_t n)257 SEXP r_new_logical(R_len_t n) {
258 return Rf_allocVector(LGLSXP, n);
259 }
260 static inline
r_new_integer(R_len_t n)261 SEXP r_new_integer(R_len_t n) {
262 return Rf_allocVector(INTSXP, n);
263 }
264 static inline
r_new_character(R_len_t n)265 SEXP r_new_character(R_len_t n) {
266 return Rf_allocVector(STRSXP, n);
267 }
268 static inline
r_new_raw(R_len_t n)269 SEXP r_new_raw(R_len_t n) {
270 return Rf_allocVector(RAWSXP, n);
271 }
272 static inline
r_new_list(R_len_t n)273 SEXP r_new_list(R_len_t n) {
274 return Rf_allocVector(VECSXP, n);
275 }
276
277 static inline
r_new_environment(SEXP parent)278 SEXP r_new_environment(SEXP parent) {
279 SEXP env = Rf_allocSExp(ENVSXP);
280 SET_ENCLOS(env, parent);
281 return env;
282 }
283
284 static inline
r_new_function(SEXP formals,SEXP body,SEXP env)285 SEXP r_new_function(SEXP formals, SEXP body, SEXP env) {
286 SEXP fn = Rf_allocSExp(CLOSXP);
287 SET_FORMALS(fn, formals);
288 SET_BODY(fn, body);
289 SET_CLOENV(fn, env);
290 return fn;
291 }
292
293 SEXP r_as_function(SEXP x, const char* arg);
294
295 SEXP r_protect(SEXP x);
296 bool r_is_true(SEXP x);
297 bool r_is_string(SEXP x);
298 bool r_is_number(SEXP x);
299 bool r_is_positive_number(SEXP x);
300 SEXP r_peek_option(const char* option);
301 SEXP r_peek_frame();
302 SEXP r_clone_referenced(SEXP x);
303 SEXP r_clone_shared(SEXP x);
304
305 SEXP r_parse(const char* str);
306 SEXP r_parse_eval(const char* str, SEXP env);
307
308 static inline
r_copy(SEXP x)309 SEXP r_copy(SEXP x) {
310 return Rf_duplicate(x);
311 }
312 static inline
r_clone(SEXP x)313 SEXP r_clone(SEXP x) {
314 return Rf_shallow_duplicate(x);
315 }
316
317 SEXP r_pairlist(SEXP* tags, SEXP* cars);
318 SEXP r_call(SEXP fn, SEXP* tags, SEXP* cars);
319
r_poke_names(SEXP x,SEXP names)320 static inline SEXP r_poke_names(SEXP x, SEXP names) {
321 return Rf_setAttrib(x, R_NamesSymbol, names);
322 }
r_poke_class(SEXP x,SEXP names)323 static inline SEXP r_poke_class(SEXP x, SEXP names) {
324 return Rf_setAttrib(x, R_ClassSymbol, names);
325 }
r_dim(SEXP x)326 static inline SEXP r_dim(SEXP x) {
327 return Rf_getAttrib(x, R_DimSymbol);
328 }
r_poke_dim(SEXP x,SEXP dim)329 static inline SEXP r_poke_dim(SEXP x, SEXP dim) {
330 return Rf_setAttrib(x, R_DimSymbol, dim);
331 }
r_mark_s4(SEXP x)332 static inline SEXP r_mark_s4(SEXP x) {
333 SET_S4_OBJECT(x);
334 return(x);
335 }
r_unmark_s4(SEXP x)336 static inline SEXP r_unmark_s4(SEXP x) {
337 UNSET_S4_OBJECT(x);
338 return(x);
339 }
340
341 bool r_has_name_at(SEXP names, R_len_t i);
342 bool r_is_names(SEXP names);
343 bool r_is_minimal_names(SEXP x);
344 bool r_is_empty_names(SEXP x);
345 bool r_is_function(SEXP x);
346 bool r_chr_has_string(SEXP x, SEXP str);
347
r_chr_get_c_string(SEXP chr,R_len_t i)348 static inline const char* r_chr_get_c_string(SEXP chr, R_len_t i) {
349 return CHAR(STRING_ELT(chr, i));
350 }
351
r__vec_get_check(SEXP x,R_len_t i,const char * fn)352 static inline void r__vec_get_check(SEXP x, R_len_t i, const char* fn) {
353 if ((Rf_length(x) - 1) < i) {
354 stop_internal(fn, "Vector is too small.");
355 }
356 }
r_lgl_get(SEXP x,R_len_t i)357 static inline int r_lgl_get(SEXP x, R_len_t i) {
358 r__vec_get_check(x, i, "r_lgl_get");
359 return LOGICAL(x)[i];
360 }
r_int_get(SEXP x,R_len_t i)361 static inline int r_int_get(SEXP x, R_len_t i) {
362 r__vec_get_check(x, i, "r_int_get");
363 return INTEGER(x)[i];
364 }
r_dbl_get(SEXP x,R_len_t i)365 static inline double r_dbl_get(SEXP x, R_len_t i) {
366 r__vec_get_check(x, i, "r_dbl_get");
367 return REAL(x)[i];
368 }
369 #define r_chr_get STRING_ELT
370 #define r_list_get VECTOR_ELT
371 #define r_chr_poke SET_STRING_ELT
372 #define r_list_poke SET_VECTOR_ELT
373
374 static inline
r_int_poke(SEXP x,R_len_t i,int value)375 void r_int_poke(SEXP x, R_len_t i, int value) {
376 r__vec_get_check(x, i, "r_int_poke");
377 INTEGER(x)[i] = value;
378 }
379
r_vec_unwrap(SEXPTYPE type,SEXP x)380 static inline void* r_vec_unwrap(SEXPTYPE type, SEXP x) {
381 switch (type) {
382 case INTSXP: return (void*) INTEGER(x);
383 default: stop_unimplemented_type("r_vec_unwrap", type);
384 }
385 }
386
387 #define r_lgl Rf_ScalarLogical
388 #define r_int Rf_ScalarInteger
389 #define r_str Rf_mkChar
390 #define r_chr Rf_mkString
391 #define r_sym Rf_install
392
r_list(SEXP x)393 static inline SEXP r_list(SEXP x) {
394 SEXP out = Rf_allocVector(VECSXP, 1);
395 SET_VECTOR_ELT(out, 0, x);
396 return out;
397 }
398
399 #define r_str_as_character Rf_ScalarString
400
r_sym_as_character(SEXP x)401 static inline SEXP r_sym_as_character(SEXP x) {
402 return r_str_as_character(PRINTNAME(x));
403 }
404 // This unserialises ASCII Unicode tags of the form `<U+xxxx>`
405 extern SEXP (*rlang_sym_as_character)(SEXP x);
406
407 SEXP r_as_data_frame(SEXP x);
408
r_dbg_save(SEXP x,const char * name)409 static inline void r_dbg_save(SEXP x, const char* name) {
410 Rf_defineVar(Rf_install(name), x, R_GlobalEnv);
411 }
412
413 ERR r_try_catch(void (*fn)(void*),
414 void* fn_data,
415 SEXP cnd_sym,
416 void (*hnd)(void*),
417 void* hnd_data);
418
419 extern SEXP vctrs_ns_env;
420 extern SEXP syms_cnd_signal;
r_cnd_signal(SEXP cnd)421 static inline void r_cnd_signal(SEXP cnd) {
422 SEXP call = PROTECT(Rf_lang2(syms_cnd_signal, cnd));
423 Rf_eval(call, vctrs_ns_env);
424 UNPROTECT(1);
425 }
426
427 extern SEXP result_attrib;
428
r_result(SEXP x,ERR err)429 static inline SEXP r_result(SEXP x, ERR err) {
430 if (!err) {
431 err = R_NilValue;
432 }
433
434 SEXP result = PROTECT(Rf_allocVector(VECSXP, 2));
435 SET_VECTOR_ELT(result, 0, x);
436 SET_VECTOR_ELT(result, 1, err);
437
438 SET_ATTRIB(result, result_attrib);
439 SET_OBJECT(result, 1);
440
441 UNPROTECT(1);
442 return result;
443 }
444
r_result_get(SEXP x,ERR err)445 static inline SEXP r_result_get(SEXP x, ERR err) {
446 if (err) {
447 r_cnd_signal(err);
448 }
449
450 return x;
451 }
452
vec_as_arg(SEXP x)453 static inline struct vctrs_arg vec_as_arg(SEXP x) {
454 if (x == R_NilValue) {
455 return *args_empty;
456 }
457
458 if (!r_is_string(x)) {
459 Rf_errorcall(R_NilValue, "Argument tag must be a string.");
460 }
461 return new_wrapper_arg(NULL, r_chr_get_c_string(x, 0));
462 }
463
464 extern SEXP fns_quote;
expr_protect(SEXP x)465 static inline SEXP expr_protect(SEXP x) {
466 switch (TYPEOF(x)) {
467 case SYMSXP:
468 case LANGSXP:
469 return Rf_lang2(fns_quote, x);
470 default:
471 return x;
472 }
473 }
474
vec_type_missing_value(enum vctrs_type type)475 static inline const void* vec_type_missing_value(enum vctrs_type type) {
476 switch (type) {
477 case vctrs_type_logical: return &NA_LOGICAL;
478 case vctrs_type_integer: return &NA_INTEGER;
479 case vctrs_type_double: return &NA_REAL;
480 case vctrs_type_complex: return &vctrs_shared_na_cpl;
481 case vctrs_type_character: return &NA_STRING;
482 case vctrs_type_list: return &R_NilValue;
483 default: stop_unimplemented_vctrs_type("vec_type_missing_value", type);
484 }
485 }
486
487 void c_print_backtrace();
488 void r_browse(SEXP x);
489
490
491 // Adapted from CERT C coding standards
492 static inline
intmax_add(intmax_t x,intmax_t y)493 intmax_t intmax_add(intmax_t x, intmax_t y) {
494 if ((y > 0 && x > (INTMAX_MAX - y)) ||
495 (y < 0 && x < (INTMAX_MIN - y))) {
496 stop_internal("intmax_add", "Values too large to be added.");
497 }
498
499 return x + y;
500 }
501 static inline
intmax_subtract(intmax_t x,intmax_t y)502 intmax_t intmax_subtract(intmax_t x, intmax_t y) {
503 if ((y > 0 && x < (INTMAX_MIN + y)) ||
504 (y < 0 && x < (INTMAX_MAX + y))) {
505 stop_internal("intmax_subtract", "Subtraction resulted in overflow or underflow.");
506 }
507
508 return x - y;
509 }
510
511 static inline
r_ssize_add(r_ssize x,r_ssize y)512 r_ssize r_ssize_add(r_ssize x, r_ssize y) {
513 intmax_t out = intmax_add(x, y);
514
515 if (out > R_SSIZE_MAX) {
516 stop_internal("r_ssize_safe_add", "Result too large for an `r_ssize`.");
517 }
518
519 return (r_ssize) out;
520 }
521
522 SEXP chr_c(SEXP x, SEXP y);
523
524
525 extern SEXP vctrs_ns_env;
526 extern SEXP vctrs_shared_empty_str;
527 extern SEXP vctrs_shared_zero_int;
528
529 extern SEXP classes_data_frame;
530 extern SEXP classes_factor;
531 extern SEXP classes_ordered;
532 extern SEXP classes_date;
533 extern SEXP classes_posixct;
534 extern SEXP classes_tibble;
535 extern SEXP classes_vctrs_group_rle;
536
537 extern SEXP strings_dots;
538 extern SEXP strings_empty;
539 extern SEXP strings_tbl;
540 extern SEXP strings_tbl_df;
541 extern SEXP strings_data_frame;
542 extern SEXP strings_date;
543 extern SEXP strings_posixct;
544 extern SEXP strings_posixlt;
545 extern SEXP strings_posixt;
546 extern SEXP strings_factor;
547 extern SEXP strings_ordered;
548 extern SEXP strings_list;
549 extern SEXP strings_none;
550 extern SEXP strings_minimal;
551 extern SEXP strings_unique;
552 extern SEXP strings_universal;
553 extern SEXP strings_check_unique;
554 extern SEXP strings_key;
555 extern SEXP strings_loc;
556 extern SEXP strings_val;
557 extern SEXP strings_group;
558 extern SEXP strings_length;
559 extern SEXP strings_vctrs_vctr;
560 extern SEXP strings_times;
561
562 extern SEXP chrs_subset;
563 extern SEXP chrs_extract;
564 extern SEXP chrs_assign;
565 extern SEXP chrs_rename;
566 extern SEXP chrs_remove;
567 extern SEXP chrs_negate;
568 extern SEXP chrs_null;
569 extern SEXP chrs_logical;
570 extern SEXP chrs_integer;
571 extern SEXP chrs_double;
572 extern SEXP chrs_complex;
573 extern SEXP chrs_character;
574 extern SEXP chrs_raw;
575 extern SEXP chrs_list;
576 extern SEXP chrs_expression;
577 extern SEXP chrs_numeric;
578 extern SEXP chrs_function;
579 extern SEXP chrs_empty;
580 extern SEXP chrs_cast;
581 extern SEXP chrs_error;
582 extern SEXP chrs_combine;
583 extern SEXP chrs_convert;
584
585 extern SEXP syms_i;
586 extern SEXP syms_n;
587 extern SEXP syms_x;
588 extern SEXP syms_y;
589 extern SEXP syms_x_size;
590 extern SEXP syms_y_size;
591 extern SEXP syms_to;
592 extern SEXP syms_dots;
593 extern SEXP syms_bracket;
594 extern SEXP syms_arg;
595 extern SEXP syms_x_arg;
596 extern SEXP syms_y_arg;
597 extern SEXP syms_to_arg;
598 extern SEXP syms_times_arg;
599 extern SEXP syms_subscript_arg;
600 extern SEXP syms_out;
601 extern SEXP syms_value;
602 extern SEXP syms_quiet;
603 extern SEXP syms_dot_name_spec;
604 extern SEXP syms_outer;
605 extern SEXP syms_inner;
606 extern SEXP syms_tilde;
607 extern SEXP syms_dot_environment;
608 extern SEXP syms_ptype;
609 extern SEXP syms_missing;
610 extern SEXP syms_size;
611 extern SEXP syms_subscript_action;
612 extern SEXP syms_subscript_type;
613 extern SEXP syms_repair;
614 extern SEXP syms_tzone;
615 extern SEXP syms_data;
616 extern SEXP syms_vctrs_error_incompatible_type;
617 extern SEXP syms_vctrs_error_cast_lossy;
618 extern SEXP syms_cnd_signal;
619 extern SEXP syms_logical;
620 extern SEXP syms_numeric;
621 extern SEXP syms_character;
622 extern SEXP syms_body;
623 extern SEXP syms_parent;
624 extern SEXP syms_from_dispatch;
625 extern SEXP syms_df_fallback;
626 extern SEXP syms_s3_fallback;
627 extern SEXP syms_stop_incompatible_type;
628 extern SEXP syms_stop_incompatible_size;
629 extern SEXP syms_action;
630 extern SEXP syms_vctrs_common_class_fallback;
631 extern SEXP syms_fallback_class;
632 extern SEXP syms_abort;
633 extern SEXP syms_message;
634 extern SEXP syms_chr_transform;
635
636 static const char * const c_strs_vctrs_common_class_fallback = "vctrs:::common_class_fallback";
637
638 #define syms_names R_NamesSymbol
639
640 extern SEXP fns_bracket;
641 extern SEXP fns_quote;
642 extern SEXP fns_names;
643
644
645 extern SEXP vctrs_method_table;
646 extern SEXP base_method_table;
647 extern SEXP s4_c_method_table;
648
649
650 #if defined(RLIB_DEBUG)
651 SEXP R_inspect(SEXP x);
652 SEXP R_inspect3(SEXP x, int deep, int pvec);
653 #endif
654
655
656 #endif
657