diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-01-22 12:22:34 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:27 -0400 |
commit | d528cf4fd5551c323484c2ffb79b56af0c6f50c4 (patch) | |
tree | 705f5729cd772cc4aff66fcd9e923a24ac9c388a /ujit_core.h | |
parent | 11512a80fce8bfac3adf7038e9d9e3839e5cbbfb (diff) | |
download | ruby-d528cf4fd5551c323484c2ffb79b56af0c6f50c4.tar.gz |
Added comments. Fixed compiler warning.
Diffstat (limited to 'ujit_core.h')
-rw-r--r-- | ujit_core.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ujit_core.h b/ujit_core.h index 5438cd850e..be4c39dd2f 100644 --- a/ujit_core.h +++ b/ujit_core.h @@ -23,7 +23,10 @@ // Maximum number of temp value types we keep track of #define MAX_TEMP_TYPES 8 -// Code generation context +/** +Code generation context +Contains information we can use to optimize code +*/ typedef struct CtxStruct { // Temporary variable types we keep track of @@ -64,7 +67,10 @@ enum uint8_t // Branch code generation function signature typedef void (*branchgen_fn)(codeblock_t* cb, uint8_t* target0, uint8_t* target1, uint8_t shape); -// Store info about an outgoing branch in a code segment +/** +Store info about an outgoing branch in a code segment +Note: care must be taken to minimize the size of branch_t objects +*/ typedef struct BranchEntry { // Positions where the generated code starts and ends @@ -89,7 +95,11 @@ typedef struct BranchEntry } branch_t; -// Basic block version +/** +Basic block version +Represents a portion of an iseq compiled with a given context +Note: care must be taken to minimize the size of block_t objects +*/ typedef struct BlockVersion { // Bytecode sequence (iseq, idx) this is a version of |