Module stark::sail::core [−][src]
Expand description
TODO: Gradual typing; more extensible type system; subtypes
Structs
| SlHead | Header for all Sail objects in memory |
| _SlListPtr | Pointer to the next element of a linked list; tagged with the SlHead (upper 2 unused bytes) |
Enums
| BaseSize | All type sizes that may be specified in the head |
| Cfg | Contains all valid values for the high six bits of an SlHead |
| CoreType | Core types that must be known in order to assemble the runtime |
| SymbolMode | The four “modes” a symbol can have |
Constants
| HEAD_LEN | Head includes pointer to next list element |
| NUM_8_LEN | |
| NUM_16_LEN | |
| NUM_32_LEN | |
| NUM_64_LEN | |
| NUM_128_LEN | |
| PTR_LEN | |
| SYMBOL_LEN | |
| _MIN_HEAD | ALL Sail objects that may be independently referenced, begin with bytes of this format |
Traits
| SizedBase | Trait for base types that are always the same size |
Functions
| basic_sym_p | Checks whether a Sail object is a basic symbol |
| bool_get | |
| bool_init | |
| bool_make | |
| bool_set | |
| core_cons_copy | Copies the values from a pair of Sail objects of core types into a two element list structure |
| core_copy_val | Copies the value from a Sail object of a core type into a newly allocated object |
| core_eq | Returns true if both arguments’ values are equal |
| core_hash | Computes a hash value for the provided object |
| core_read_field | Read from a field of a Sail object of a core type |
| core_size | Returns the size of an object, which must be of a core type |
| core_type | Returns None if the object is not of a core type, or its type if it is |
| core_write_field | Write to a field of a Sail object of a core type |
| demodes_sym | Returns a symbol set to the default, basic mode |
| env_arg_layer_get | Gets an object from the given argument layer by index |
| env_arg_layer_ins | Inserts the given object into the given argument layer using the given symbol’s ID |
| env_create | Creates an environment, which is a list of maps that should function as a LIFO stack |
| env_layer_ins_by_id | Inserts a symbol with the given ID into the environment, referring
to the |
| env_layer_ins_entry | Inserts the given symbol into the environment, referring to the
|
| env_layer_mut_by_id | Changes the object pointed to by the given ID in the environment, if the entry already exists |
| env_layer_mut_entry | Changes the object pointed to by the given symbol’s ID in the environment, if the entry already exists |
| env_lookup | Looks up the given symbol in the given environment, returning the object it refers to |
| env_lookup_by_id | Looks up the given symbol ID in the given environment, returning the object it refers to |
| env_lookup_entry | Looks up the given symbol ID in the given environment, returning the entry it refers to (symbol and object) |
| env_new_arg_layer | Creates a new association list based environment layer; this is meant for storing arguments to Sail procedures |
| env_new_layer | Creates a new hashmap based environment layer |
| f32_get | |
| f32_init | |
| f32_make | |
| f32_set | |
| f64_get | |
| f64_init | |
| f64_make | |
| f64_set | |
| get_base_size | Gets the base size of a Sail object |
| get_base_spec | Gets base type specifier from a Sail object (its meaning differs with size) |
| get_cfg_all | Gets the full configuration byte from a Sail object |
| get_cfg_spec | Gets the size / type configuration from a Sail object |
| get_next_list_elt | Gets the pointer to the next element from a list element |
| hash_map_insert | |
| hashvec_get_size | |
| hashvec_make | |
| i8_get | |
| i8_init | |
| i8_make | |
| i8_set | |
| i16_get | |
| i16_init | |
| i16_make | |
| i16_set | |
| i32_get | |
| i32_init | |
| i32_make | |
| i32_set | |
| i64_get | |
| i64_init | |
| i64_make | |
| i64_set | |
| i128_get | |
| i128_init | |
| i128_make | |
| i128_set | |
| id | Returns true if both arguments are the same Sail object |
| mode_of_sym | Get the mode of a symbol |
| modeize_sym | Set a symbol to one of the four symbol modes |
| nil | Creates a nil Sail object |
| nil_p | Checks whether a pointer, ostensibly to a Sail object, is null |
| nnil_ref_p | Checks whether a Sail object is a reference to another non-nil object |
| pred_type_p | Checks whether a valid Sail object has a type specifier with a predicate |
| prep_environment | Prepares a complete Sail runtime environment, including symbol table and env |
| proc_get_argct | |
| proc_lambda_get_arg | |
| proc_lambda_get_arg_id | |
| proc_lambda_get_body | |
| proc_lambda_make | |
| proc_lambda_set_arg | |
| proc_lambda_set_body | |
| proc_lambda_size | Gives the overall size of a lambda procedure by argument count |
| proc_native_get_body | |
| proc_native_make | |
| proc_native_set_body | |
| proc_native_size | Gives the overall size of a native procedure |
| proc_p | Checks whether a Sail object is an executable procedure |
| read_field_atomic_unchecked⚠ | Read from a field of a Sail object atomically without any checks |
| read_field_unchecked⚠ | Read from a field of a Sail object without any checks |
| ref_empty_p | |
| ref_get | |
| ref_init | |
| ref_make | |
| ref_set | |
| self_type_p | Checks whether a valid Sail object has a type specifier for itself alone |
| set_next_list_elt | Set the pointer to a list element’s next element |
| set_next_list_elt_cmpxcg | Set the pointer to a list element’s next element only if the
current pointer is equivalent to |
| stdvec_get_cap | |
| stdvec_get_len | |
| stdvec_idx | |
| stdvec_init | |
| stdvec_make | |
| stdvec_push | |
| stdvec_set_len | |
| str_hash | Provides a simple hash function for string slices |
| string_get | |
| string_get_cap | |
| string_get_len | |
| string_init | |
| string_make | |
| string_set | |
| string_set_len | |
| sym_get_id | |
| sym_init | |
| sym_make | |
| sym_set_id | |
| sym_tab_create | Creates a symbol table, which maps symbol strings to symbol IDs and vice versa |
| sym_tab_get_id | Returns a unique ID for any symbol string; inserts symbol into the table if not already present |
| sym_tab_insert | Takes the symbol table and a string object to insert, returning the symbol’s unique ID |
| sym_tab_lookup_by_id | Retrieves and returns the string representation of the given symbol |
| sym_tab_lookup_by_str | Retrieves and returns the symbol referring to the given string |
| sym_tab_lookup_id_num | Retrieves and returns the string representation corresponding to the given symbol ID |
| temp_base_sized_p | Identifies whether a given type ID refers to a base sized type |
| temp_get_size | Gives the size of a limited range of types (base sized) by type ID |
| temp_init_from | Initializes a Sail object from a base sized type and a pointer |
| truthy | Returns the truthiness of a valid Sail object |
| u8_get | |
| u8_init | |
| u8_make | |
| u8_set | |
| u16_get | |
| u16_init | |
| u16_make | |
| u16_set | |
| u32_get | |
| u32_init | |
| u32_make | |
| u32_set | |
| u64_get | |
| u64_init | |
| u64_make | |
| u64_set | |
| u128_get | |
| u128_init | |
| u128_make | |
| u128_set | |
| value_ptr | From a valid Sail object, returns a pointer to the start of the value proper |
| vec_size | Gives the overall size of a Vec with certain parameters |
| write_field_atomic_unchecked⚠ | Write to a field of a Sail object atomically without any checks |
| write_field_cmpxcg_unchecked⚠ | Write to a field of a Sail object only if the current value is the
same as |
| write_field_unchecked⚠ | Write to a field of a Sail object without any checks |
Type Definitions
| NativeFn | Signature for Sail functions implemented in Rust |