Skip to content

Instantly share code, notes, and snippets.

@ZYROz
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZYROz/2b709dc74bd354143f81 to your computer and use it in GitHub Desktop.
Save ZYROz/2b709dc74bd354143f81 to your computer and use it in GitHub Desktop.
master6_6-Vs-inline the CallContext ATTR accessors
diff --git a/include/pmc/pmc_callcontext.h b/home/zyro/Desktop/pmc_callcontext.h
index e03455a..e8960b6 100644
--- a/include/pmc/pmc_callcontext.h
+++ b/home/zyro/Desktop/pmc_callcontext.h
@@ -62,729 +62,242 @@ typedef struct Parrot_CallContext_attributes {
/* Generated macro accessors for 'caller_ctx' attribute of CallContext PMC. */
#define GETATTR_CallContext_caller_ctx(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->caller_ctx; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "caller_ctx")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->caller_ctx;
#define SETATTR_CallContext_caller_ctx(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "caller_ctx"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->caller_ctx = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->caller_ctx = (value);
/* Generated macro accessors for 'registers' attribute of CallContext PMC. */
#define GETATTR_CallContext_registers(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->registers; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'void *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->registers;
#define SETATTR_CallContext_registers(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'void *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->registers = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->registers = (value);
/* Generated macro accessors for 'bp' attribute of CallContext PMC. */
#define GETATTR_CallContext_bp(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->bp; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'Regs_ni' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->bp;
#define SETATTR_CallContext_bp(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'Regs_ni' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->bp = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->bp = (value);
/* Generated macro accessors for 'bp_ps' attribute of CallContext PMC. */
#define GETATTR_CallContext_bp_ps(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->bp_ps; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'Regs_ps' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->bp_ps;
#define SETATTR_CallContext_bp_ps(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'Regs_ps' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->bp_ps = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->bp_ps = (value);
/* Generated macro accessors for 'n_regs_used' attribute of CallContext PMC. */
#define GETATTR_CallContext_n_regs_used(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->n_regs_used; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->n_regs_used;
#define SETATTR_CallContext_n_regs_used(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->n_regs_used = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->n_regs_used = (value);
/* Generated macro accessors for 'lex_pad' attribute of CallContext PMC. */
#define GETATTR_CallContext_lex_pad(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->lex_pad; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "lex_pad")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->lex_pad;
#define SETATTR_CallContext_lex_pad(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "lex_pad"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->lex_pad = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->lex_pad = (value);
/* Generated macro accessors for 'outer_ctx' attribute of CallContext PMC. */
#define GETATTR_CallContext_outer_ctx(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->outer_ctx; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "outer_ctx")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->outer_ctx;
#define SETATTR_CallContext_outer_ctx(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "outer_ctx"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->outer_ctx = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->outer_ctx = (value);
/* Generated macro accessors for 'current_sub' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_sub(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_sub; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "current_sub")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->current_sub;
#define SETATTR_CallContext_current_sub(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "current_sub"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_sub = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->current_sub = (value);
/* Generated macro accessors for 'handlers' attribute of CallContext PMC. */
#define GETATTR_CallContext_handlers(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->handlers; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "handlers")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->handlers;
#define SETATTR_CallContext_handlers(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "handlers"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->handlers = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->handlers = (value);
/* Generated macro accessors for 'current_cont' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_cont(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_cont; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "current_cont")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->current_cont;
#define SETATTR_CallContext_current_cont(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "current_cont"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_cont = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->current_cont = (value);
/* Generated macro accessors for 'current_namespace' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_namespace(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_namespace; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "current_namespace")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->current_namespace;
#define SETATTR_CallContext_current_namespace(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "current_namespace"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_namespace = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->current_namespace = (value);
/* Generated macro accessors for 'current_pc' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_pc(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_pc; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'opcode_t *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->current_pc;
#define SETATTR_CallContext_current_pc(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'opcode_t *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_pc = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->current_pc = (value);
/* Generated macro accessors for 'current_sig' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_sig(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_sig; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "current_sig")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->current_sig;
#define SETATTR_CallContext_current_sig(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "current_sig"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_sig = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->current_sig = (value);
/* Generated macro accessors for 'num_constants' attribute of CallContext PMC. */
#define GETATTR_CallContext_num_constants(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->num_constants; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'FLOATVAL *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->num_constants;
#define SETATTR_CallContext_num_constants(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'FLOATVAL *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->num_constants = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->num_constants = (value);
/* Generated macro accessors for 'str_constants' attribute of CallContext PMC. */
#define GETATTR_CallContext_str_constants(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->str_constants; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'STRING **' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->str_constants;
#define SETATTR_CallContext_str_constants(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'STRING **' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->str_constants = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->str_constants = (value);
/* Generated macro accessors for 'pmc_constants' attribute of CallContext PMC. */
#define GETATTR_CallContext_pmc_constants(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->pmc_constants; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'PMC **' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->pmc_constants;
#define SETATTR_CallContext_pmc_constants(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'PMC **' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->pmc_constants = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->pmc_constants = (value);
/* Generated macro accessors for 'current_HLL' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_HLL(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_HLL; \
- } \
- else { \
- PMC * const attr_value = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "current_HLL")); \
- (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->current_HLL;
#define SETATTR_CallContext_current_HLL(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "current_HLL"), attr_value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->current_HLL = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->current_HLL = (value);
/* Generated macro accessors for 'warns' attribute of CallContext PMC. */
#define GETATTR_CallContext_warns(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->warns; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->warns;
#define SETATTR_CallContext_warns(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->warns = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->warns = (value);
/* Generated macro accessors for 'errors' attribute of CallContext PMC. */
#define GETATTR_CallContext_errors(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->errors; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->errors;
#define SETATTR_CallContext_errors(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->errors = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->errors = (value);
/* Generated macro accessors for 'trace_flags' attribute of CallContext PMC. */
#define GETATTR_CallContext_trace_flags(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->trace_flags; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->trace_flags;
#define SETATTR_CallContext_trace_flags(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->trace_flags = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->trace_flags = (value);
/* Generated macro accessors for 'recursion_depth' attribute of CallContext PMC. */
#define GETATTR_CallContext_recursion_depth(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->recursion_depth; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->recursion_depth;
#define SETATTR_CallContext_recursion_depth(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'UINTVAL' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->recursion_depth = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->recursion_depth = (value);
/* Generated macro accessors for 'positionals' attribute of CallContext PMC. */
#define GETATTR_CallContext_positionals(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->positionals; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'struct Pcc_cell *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->positionals;
#define SETATTR_CallContext_positionals(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'struct Pcc_cell *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->positionals = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->positionals = (value);
/* Generated macro accessors for 'num_positionals' attribute of CallContext PMC. */
#define GETATTR_CallContext_num_positionals(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->num_positionals; \
- } \
- else { \
- PMC * const attr_value = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "num_positionals")); \
- (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->num_positionals;
#define SETATTR_CallContext_num_positionals(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "num_positionals"), attr_value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->num_positionals = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->num_positionals = (value);
/* Generated macro accessors for 'allocated_positionals' attribute of CallContext PMC. */
#define GETATTR_CallContext_allocated_positionals(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->allocated_positionals; \
- } \
- else { \
- PMC * const attr_value = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "allocated_positionals")); \
- (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->allocated_positionals;
#define SETATTR_CallContext_allocated_positionals(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "allocated_positionals"), attr_value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->allocated_positionals = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->allocated_positionals = (value);
/* Generated macro accessors for 'type_tuple' attribute of CallContext PMC. */
#define GETATTR_CallContext_type_tuple(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->type_tuple; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "type_tuple")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->type_tuple;
#define SETATTR_CallContext_type_tuple(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "type_tuple"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->type_tuple = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->type_tuple = (value);
/* Generated macro accessors for 'short_sig' attribute of CallContext PMC. */
#define GETATTR_CallContext_short_sig(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->short_sig; \
- } \
- else { \
- PMC * const attr_value = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "short_sig")); \
- (dest) = (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->short_sig;
#define SETATTR_CallContext_short_sig(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
- VTABLE_set_string_native(interp, attr_value, value); \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "short_sig"), attr_value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->short_sig = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->short_sig = (value);
/* Generated macro accessors for 'arg_flags' attribute of CallContext PMC. */
#define GETATTR_CallContext_arg_flags(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->arg_flags; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "arg_flags")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->arg_flags;
#define SETATTR_CallContext_arg_flags(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "arg_flags"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->arg_flags = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->arg_flags = (value);
/* Generated macro accessors for 'return_flags' attribute of CallContext PMC. */
#define GETATTR_CallContext_return_flags(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->return_flags; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "return_flags")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->return_flags;
#define SETATTR_CallContext_return_flags(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "return_flags"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->return_flags = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->return_flags = (value);
/* Generated macro accessors for 'hash' attribute of CallContext PMC. */
#define GETATTR_CallContext_hash(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->hash; \
- } \
- else { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'Hash *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->hash;
#define SETATTR_CallContext_hash(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
- "Attributes of type 'Hash *' cannot be " \
- "subclassed from a high-level PMC."); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->hash = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->hash = (value);
/* Generated macro accessors for 'continuation' attribute of CallContext PMC. */
#define GETATTR_CallContext_continuation(interp, pmc, dest) \
- do { \
- if (!PObj_is_object_TEST(pmc)) { \
- (dest) = ((Parrot_CallContext_attributes *)PMC_data(pmc))->continuation; \
- } \
- else { \
- (dest) = VTABLE_get_attr_str(interp, \
- pmc, Parrot_str_new_constant(interp, "continuation")); \
- } \
- } while (0)
+ (dest) = PARROT_CALLCONTEXT(pmc)->continuation;
#define SETATTR_CallContext_continuation(interp, pmc, value) \
- do { \
- if (PObj_is_object_TEST(pmc)) { \
- VTABLE_set_attr_str(interp, pmc, \
- Parrot_str_new_constant(interp, "continuation"), value); \
- } \
- else \
- ((Parrot_CallContext_attributes *)PMC_data(pmc))->continuation = (value); \
- } while (0)
+ PARROT_CALLCONTEXT(pmc)->continuation = (value);
#endif /* PARROT_PMC_CALLCONTEXT_H_GUARD */
tag=RELEASE_6_6_0-0-gad40760
cc=cc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
optimize=
loadavg 1.91 1.10 0.77 1/470 6344
Performance counter stats for '../run-bench.sh' (4 runs):
151694.688457 task-clock (msec) # 0.998 CPUs utilized ( +- 0.13% )
13,812 context-switches # 0.091 K/sec ( +- 0.67% )
182 cpu-migrations # 0.001 K/sec ( +- 6.56% )
3,61,590 page-faults # 0.002 M/sec ( +- 0.00% )
1,40,53,65,08,073 cycles # 0.926 GHz ( +- 0.13% ) [83.34%]
71,09,04,62,191 stalled-cycles-frontend # 50.59% frontend cycles idle ( +- 0.37% ) [83.34%]
13,59,57,53,906 stalled-cycles-backend # 9.67% backend cycles idle ( +- 2.81% ) [66.67%]
1,71,78,81,13,927 instructions # 1.22 insns per cycle
# 0.41 stalled cycles per insn ( +- 0.01% ) [83.34%]
27,00,29,69,616 branches # 178.009 M/sec ( +- 0.01% ) [83.34%]
46,33,65,509 branch-misses # 1.72% of all branches ( +- 0.73% ) [83.33%]
152.002903636 seconds time elapsed ( +- 0.13% )
151617.489213,task-clock
14353,context-switches
136,cpu-migrations
361588,page-faults
140440520930,cycles
71377481389,stalled-cycles-frontend
15704664218,stalled-cycles-backend
171766298700,instructions
27000345038,branches
451721661,branch-misses
---------------------------------------------------------------------------------------
tag=RELEASE_6_6_0-1-g71d5afe
cc=cc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
optimize=
loadavg 2.85 0.98 0.45 1/470 5669
Performance counter stats for '../run-bench.sh' (4 runs):
67357.105838 task-clock (msec) # 0.996 CPUs utilized ( +- 5.66% )
6,370 context-switches # 0.095 K/sec ( +- 9.44% )
122 cpu-migrations # 0.002 K/sec ( +- 14.11% )
3,61,595 page-faults # 0.005 M/sec ( +- 0.00% )
1,42,68,52,77,787 cycles # 2.118 GHz ( +- 0.13% ) [83.34%]
73,60,41,40,964 stalled-cycles-frontend # 51.58% frontend cycles idle ( +- 0.12% ) [83.32%]
16,67,96,72,692 stalled-cycles-backend # 11.69% backend cycles idle ( +- 0.80% ) [66.65%]
1,71,58,01,75,631 instructions # 1.20 insns per cycle
# 0.43 stalled cycles per insn ( +- 0.03% ) [83.37%]
26,96,50,58,368 branches # 400.330 M/sec ( +- 0.02% ) [83.39%]
45,64,29,390 branch-misses # 1.69% of all branches ( +- 0.57% ) [83.34%]
67.649964686 seconds time elapsed ( +- 5.59% )
152306.055310,task-clock
15144,context-switches
127,cpu-migrations
361576,page-faults
141089938131,cycles
71152914183,stalled-cycles-frontend
15646442428,stalled-cycles-backend
171864019228,instructions
26997575505,branches
470476730,branch-misses
/* ex: set ro ft=c: -*- buffer-read-only:t -*-
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
*
* This file is generated automatically from './src/pmc/callcontext.pmc'
* by tools/build/pmc2c.pl.
*
* Any changes made here will be lost!
*
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
#ifndef PARROT_PMC_CALLCONTEXT_H_GUARD
#define PARROT_PMC_CALLCONTEXT_H_GUARD
PARROT_EXPORT VTABLE* Parrot_CallContext_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_CallContext_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_CallContext_get_vtable(PARROT_INTERP);
PARROT_EXPORT VTABLE* Parrot_CallContext_ro_get_vtable(PARROT_INTERP);
PARROT_EXPORT PMC* Parrot_CallContext_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_EXPORT Hash* Parrot_CallContext_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));
/* CallContext PMC's underlying struct. */
typedef struct Parrot_CallContext_attributes {
PMC * caller_ctx;
void * registers;
Regs_ni bp;
Regs_ps bp_ps;
UINTVAL n_regs_used[4];
PMC * lex_pad;
PMC * outer_ctx;
PMC * current_sub;
PMC * handlers;
PMC * current_cont;
PMC * current_namespace;
opcode_t * current_pc;
PMC * current_sig;
FLOATVAL * num_constants;
STRING ** str_constants;
PMC ** pmc_constants;
INTVAL current_HLL;
UINTVAL warns;
UINTVAL errors;
UINTVAL trace_flags;
UINTVAL recursion_depth;
struct Pcc_cell * positionals;
INTVAL num_positionals;
INTVAL allocated_positionals;
PMC * type_tuple;
STRING * short_sig;
PMC * arg_flags;
PMC * return_flags;
Hash * hash;
PMC * continuation;
} Parrot_CallContext_attributes;
/* Macro to access underlying structure of a CallContext PMC. */
#define PARROT_CALLCONTEXT(o) ((Parrot_CallContext_attributes *) PMC_data(o))
/* Generated macro accessors for 'caller_ctx' attribute of CallContext PMC. */
#define GETATTR_CallContext_caller_ctx(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->caller_ctx;
#define SETATTR_CallContext_caller_ctx(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->caller_ctx = (value);
/* Generated macro accessors for 'registers' attribute of CallContext PMC. */
#define GETATTR_CallContext_registers(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->registers;
#define SETATTR_CallContext_registers(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->registers = (value);
/* Generated macro accessors for 'bp' attribute of CallContext PMC. */
#define GETATTR_CallContext_bp(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->bp;
#define SETATTR_CallContext_bp(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->bp = (value);
/* Generated macro accessors for 'bp_ps' attribute of CallContext PMC. */
#define GETATTR_CallContext_bp_ps(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->bp_ps;
#define SETATTR_CallContext_bp_ps(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->bp_ps = (value);
/* Generated macro accessors for 'n_regs_used' attribute of CallContext PMC. */
#define GETATTR_CallContext_n_regs_used(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->n_regs_used;
#define SETATTR_CallContext_n_regs_used(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->n_regs_used = (value);
/* Generated macro accessors for 'lex_pad' attribute of CallContext PMC. */
#define GETATTR_CallContext_lex_pad(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->lex_pad;
#define SETATTR_CallContext_lex_pad(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->lex_pad = (value);
/* Generated macro accessors for 'outer_ctx' attribute of CallContext PMC. */
#define GETATTR_CallContext_outer_ctx(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->outer_ctx;
#define SETATTR_CallContext_outer_ctx(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->outer_ctx = (value);
/* Generated macro accessors for 'current_sub' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_sub(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->current_sub;
#define SETATTR_CallContext_current_sub(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->current_sub = (value);
/* Generated macro accessors for 'handlers' attribute of CallContext PMC. */
#define GETATTR_CallContext_handlers(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->handlers;
#define SETATTR_CallContext_handlers(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->handlers = (value);
/* Generated macro accessors for 'current_cont' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_cont(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->current_cont;
#define SETATTR_CallContext_current_cont(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->current_cont = (value);
/* Generated macro accessors for 'current_namespace' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_namespace(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->current_namespace;
#define SETATTR_CallContext_current_namespace(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->current_namespace = (value);
/* Generated macro accessors for 'current_pc' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_pc(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->current_pc;
#define SETATTR_CallContext_current_pc(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->current_pc = (value);
/* Generated macro accessors for 'current_sig' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_sig(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->current_sig;
#define SETATTR_CallContext_current_sig(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->current_sig = (value);
/* Generated macro accessors for 'num_constants' attribute of CallContext PMC. */
#define GETATTR_CallContext_num_constants(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->num_constants;
#define SETATTR_CallContext_num_constants(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->num_constants = (value);
/* Generated macro accessors for 'str_constants' attribute of CallContext PMC. */
#define GETATTR_CallContext_str_constants(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->str_constants;
#define SETATTR_CallContext_str_constants(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->str_constants = (value);
/* Generated macro accessors for 'pmc_constants' attribute of CallContext PMC. */
#define GETATTR_CallContext_pmc_constants(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->pmc_constants;
#define SETATTR_CallContext_pmc_constants(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->pmc_constants = (value);
/* Generated macro accessors for 'current_HLL' attribute of CallContext PMC. */
#define GETATTR_CallContext_current_HLL(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->current_HLL;
#define SETATTR_CallContext_current_HLL(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->current_HLL = (value);
/* Generated macro accessors for 'warns' attribute of CallContext PMC. */
#define GETATTR_CallContext_warns(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->warns;
#define SETATTR_CallContext_warns(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->warns = (value);
/* Generated macro accessors for 'errors' attribute of CallContext PMC. */
#define GETATTR_CallContext_errors(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->errors;
#define SETATTR_CallContext_errors(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->errors = (value);
/* Generated macro accessors for 'trace_flags' attribute of CallContext PMC. */
#define GETATTR_CallContext_trace_flags(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->trace_flags;
#define SETATTR_CallContext_trace_flags(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->trace_flags = (value);
/* Generated macro accessors for 'recursion_depth' attribute of CallContext PMC. */
#define GETATTR_CallContext_recursion_depth(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->recursion_depth;
#define SETATTR_CallContext_recursion_depth(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->recursion_depth = (value);
/* Generated macro accessors for 'positionals' attribute of CallContext PMC. */
#define GETATTR_CallContext_positionals(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->positionals;
#define SETATTR_CallContext_positionals(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->positionals = (value);
/* Generated macro accessors for 'num_positionals' attribute of CallContext PMC. */
#define GETATTR_CallContext_num_positionals(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->num_positionals;
#define SETATTR_CallContext_num_positionals(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->num_positionals = (value);
/* Generated macro accessors for 'allocated_positionals' attribute of CallContext PMC. */
#define GETATTR_CallContext_allocated_positionals(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->allocated_positionals;
#define SETATTR_CallContext_allocated_positionals(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->allocated_positionals = (value);
/* Generated macro accessors for 'type_tuple' attribute of CallContext PMC. */
#define GETATTR_CallContext_type_tuple(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->type_tuple;
#define SETATTR_CallContext_type_tuple(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->type_tuple = (value);
/* Generated macro accessors for 'short_sig' attribute of CallContext PMC. */
#define GETATTR_CallContext_short_sig(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->short_sig;
#define SETATTR_CallContext_short_sig(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->short_sig = (value);
/* Generated macro accessors for 'arg_flags' attribute of CallContext PMC. */
#define GETATTR_CallContext_arg_flags(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->arg_flags;
#define SETATTR_CallContext_arg_flags(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->arg_flags = (value);
/* Generated macro accessors for 'return_flags' attribute of CallContext PMC. */
#define GETATTR_CallContext_return_flags(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->return_flags;
#define SETATTR_CallContext_return_flags(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->return_flags = (value);
/* Generated macro accessors for 'hash' attribute of CallContext PMC. */
#define GETATTR_CallContext_hash(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->hash;
#define SETATTR_CallContext_hash(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->hash = (value);
/* Generated macro accessors for 'continuation' attribute of CallContext PMC. */
#define GETATTR_CallContext_continuation(interp, pmc, dest) \
(dest) = PARROT_CALLCONTEXT(pmc)->continuation;
#define SETATTR_CallContext_continuation(interp, pmc, value) \
PARROT_CALLCONTEXT(pmc)->continuation = (value);
#endif /* PARROT_PMC_CALLCONTEXT_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment