Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in ops that allow for fast construction of low level signatures.
- Loading branch information
Showing
4 changed files
with
194 additions
and
38 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
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
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
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,25 @@ | ||
/* Flags that can be set on a signature element. */ | ||
#define SIG_ELEM_BIND_CAPTURE 1 | ||
#define SIG_ELEM_BIND_PRIVATE_ATTR 2 | ||
#define SIG_ELEM_BIND_PUBLIC_ATTR 4 | ||
#define SIG_ELEM_SLURPY_POS 8 | ||
#define SIG_ELEM_SLURPY_NAMED 16 | ||
#define SIG_ELEM_SLURPY_BLOCK 32 | ||
#define SIG_ELEM_INVOCANT 64 | ||
#define SIG_ELEM_MULTI_INVOCANT 128 | ||
#define SIG_ELEM_IS_RW 256 | ||
#define SIG_ELEM_IS_COPY 512 | ||
#define SIG_ELEM_IS_REF 1024 | ||
|
||
|
||
/* Data structure to describe a single element in the signature. */ | ||
typedef struct llsig_element { | ||
STRING *variable_name; /* The name in the lexpad to bind to, if any. */ | ||
PMC *named_names; /* List of the name(s) that a named parameter has, | ||
* or just non-null to mark a named slurpy. */ | ||
PMC *type_captures; /* Name(s) that we bind the type of a parameter to. */ | ||
INTVAL flags; /* Various flags about the parameter. */ | ||
PMC *nominal_type; /* The nominal type of the parameter. */ | ||
PMC *post_constraints; /* Junction of any extra constraints. */ | ||
PMC *sub_signature; /* Any nested signature. */ | ||
} llsig_element; |