Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pcc] temporarily add two hand-optimized callcontext pmc files
see gh #1083
- Loading branch information
Reini Urban
committed
Jul 22, 2014
1 parent
7b7a019
commit 4353c37
Showing
2 changed files
with
2,213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
/* 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. | ||
* and then hand-edited | ||
*/ | ||
|
||
/* 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)) | ||
|
||
#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) | ||
|
||
#define GETATTR_CallContext_registers(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->registers | ||
|
||
#define SETATTR_CallContext_registers(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->registers = (value) | ||
|
||
#define GETATTR_CallContext_bp(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->bp | ||
|
||
#define SETATTR_CallContext_bp(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->bp = (value) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#define GETATTR_CallContext_handlers(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->handlers | ||
|
||
#define SETATTR_CallContext_handlers(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->handlers = (value) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#define GETATTR_CallContext_warns(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->warns | ||
|
||
#define SETATTR_CallContext_warns(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->warns = (value) | ||
|
||
#define GETATTR_CallContext_errors(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->errors | ||
|
||
#define SETATTR_CallContext_errors(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->errors = (value) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#define GETATTR_CallContext_positionals(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->positionals | ||
|
||
#define SETATTR_CallContext_positionals(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->positionals = (value) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#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) | ||
|
||
#define GETATTR_CallContext_hash(interp, pmc, dest) \ | ||
(dest) = PARROT_CALLCONTEXT(pmc)->hash | ||
|
||
#define SETATTR_CallContext_hash(interp, pmc, value) \ | ||
PARROT_CALLCONTEXT(pmc)->hash = (value) | ||
|
||
#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: | ||
*/ | ||
|
Oops, something went wrong.