aboutsummaryrefslogtreecommitdiff
path: root/core/reflect/reflect.odin
Commit message (Collapse)AuthorAgeFilesLines
* Change seed logicgingerBill2025-12-211-3/+5
|
* Add `reflect.default_map_hash_by_ptr`gingerBill2025-12-211-0/+10
|
* Add reflect.as_string16 and fix typosJeroen van Rijn2025-10-071-24/+46
|
* Improve documentation for `core:reflect`gingerBill2025-10-071-29/+205
|
* Change hashing rules for float-like types to make `0 == -0`gingerBill2025-04-161-3/+40
|
* Remove Type_Info_TupleJeroen van Rijn2025-04-131-3/+2
|
* Add `reflect.length` + `reflect.capacity` support for `#simd[N]T`Jeroen van Rijn2025-04-111-0/+8
|
* Add fix to `reflect.typeid_elem`Jeroen van Rijn2025-04-111-0/+1
|
* Remove `#relative` types from the compilergingerBill2024-11-141-54/+27
|
* reflect: add `enum_value_has_name` procLaytan Laats2024-11-111-0/+21
| | | | | Easy way to check if the current value has a defined name/member in the enum type.
* Add a few more reflect.bit_field_* helpers.Jeroen van Rijn2024-08-301-23/+68
|
* Add reflect.bit_fields_zippedJeroen van Rijn2024-08-301-0/+23
|
* fix `type_info_union_is_pure_maybe` only working with regular pointersLaytan Laats2024-08-111-1/+1
| | | | Fixes #3996
* Update comment.Jeroen van Rijn2024-08-051-3/+5
|
* Add `reflect.struct_field_count` that returns the number of fields in a ↵Jeroen van Rijn2024-08-051-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct type Example: ```odin package struct_count_example import "core:fmt" import "core:reflect" import "core:dynlib" Foo :: struct{ one: int, two: f32, } Bar :: struct { three: int, four: bool, five: f64, } Game_Api :: struct { init: proc(api: ^Game_Api), update: proc(api: ^Game_Api), using foo: Foo, bar: Bar, // Private stuff reload_count: int, __handle: rawptr, } API_PRIVATE_COUNT :: 2 game_api: Game_Api main :: proc() { fmt.printfln("Game_Api, .Top: %v", reflect.struct_field_count(Game_Api)) // 6 fmt.printfln("Game_Api, .Using: %v", reflect.struct_field_count(Game_Api, .Using)) // 8 fmt.printfln("Game_Api, .Recursive: %v", reflect.struct_field_count(Game_Api, .Recursive)) // 11 symbols_loaded, _ := dynlib.initialize_symbols(&game_api, "game.dll") symbols_expected := reflect.struct_field_count(Game_Api) - API_PRIVATE_COUNT if symbols_loaded == -1 { fmt.eprintln("Couldn't load game.dll") return } else if symbols_loaded != symbols_expected { fmt.eprintfln("Expected %v symbols, got %v", symbols_expected, symbols_loaded) return } } ```
* fix `reflect.any_base` and `reflect.any_core` with any's containing nilLaytan Laats2024-07-221-2/+2
|
* Reduce the size of `runtime.Type_Info`gingerBill2024-07-141-13/+13
|
* Fix `reflect.as_pointer`gingerBill2024-07-041-1/+1
|
* encoding/cbor: deterministically store bit sets as big endianLaytan Laats2024-03-041-0/+21
|
* Begin work adding `bit_field`gingerBill2024-02-221-0/+10
|
* Add `reflect.enum_name_from_value` and `reflect.enum_name_from_value_any`gingerBill2024-02-211-0/+37
|
* Replace `core:*` to `base:*` where appropriategingerBill2024-01-281-2/+2
|
* Remove `core:mem` dependency from `core:reflect`gingerBill2024-01-281-3/+1
|
* Change return values from `Struct_Tag` to `string`gingerBill2024-01-281-5/+5
|
* Remove #relative slices; Replace with #relative multi-pointersgingerBill2023-08-051-60/+59
|
* Replace `x in &y` Use `&v in y` syntax through core & vendor for ↵gingerBill2023-06-261-2/+2
| | | | `switch`/`for` statements
* Rename `ODIN_DISALLOW_RTTI` to `ODIN_NO_RTTI`; Remove dead command line flagsgingerBill2023-06-121-1/+1
|
* Add `reflect.struct_field_value`gingerBill2023-03-171-1/+8
|
* Rename to `Type_Info_Parameters`gingerBill2023-02-081-3/+4
|
* Remove `@(require_results)` from one proceduregingerBill2023-01-301-1/+0
|
* Add `@(require_results)` to `package reflect`gingerBill2023-01-291-0/+51
|
* Fix #2304gingerBill2023-01-161-3/+4
|
* Aliasing some procs to avoid code repetitionAndré (counter)2022-12-091-36/+7
| | | | | Aliasing some procedures within package reflect so they reference procedures from package runtime. This avoids redundancy and potential deviation. Not 100% sure about the ODIN_DISALLOW_RTTI part but I think it should be congruent as well.
* Begin work on implementing the new `map` internalsgingerBill2022-11-071-2/+2
|
* Keep -vet happygingerBill2022-09-081-0/+1
|
* Add `intrinsics.type_convert_variants_to_pointers` and ↵gingerBill2022-09-081-0/+10
| | | | `reflect.get_union_as_ptr_variants`
* Remove direct `core:mem` dependency in `core:reflect`gingerBill2022-08-261-24/+23
|
* Add `reflect.get_union_variant`gingerBill2022-08-261-0/+11
|
* Add `#soa` pointer type to aid with refactoring to `#soa` data typesgingerBill2022-08-081-0/+5
| | | | | | | | a: #soa[16]Foo p := &a[6] #assert(type_of(p) == #soa^#soa[16]Foo) p^.x = 123 p.x = 123
* Merge functionality of `#maybe` with the standard 'union' functionalitygingerBill2022-05-231-1/+1
|
* Fix some core:encoding/hxa stuff (error handling, header, max -> min)gitlost2022-03-161-0/+2
| | | | | Also add missing f16 case to core:reflect as_u64 & as_f64 Add tests for above & add previous tests missing from test/core/build.bat
* Add `reflect.deref`gingerBill2022-03-031-1/+13
|
* Fix logic in `is_nil` procedure: a non_nil slice means there is data to check.Andrea Piseri2022-02-021-1/+1
|
* Begin work on matrix typegingerBill2021-10-181-1/+5
|
* Add `reflect.set_union_value`dev-2021-10gingerBill2021-09-301-0/+39
|
* Add `reflect.any_base` `reflect.any_core`gingerBill2021-09-251-0/+15
|
* Merge branch 'master' into optional-semicolonsgingerBill2021-09-061-40/+134
|\
| * Allow comparisons of `any` if `reflect.equal` if ↵gingerBill2021-09-031-2/+7
| | | | | | | | `including_indirect_array_recursion` is enabled
| * Update reflect.equal to support more typesgingerBill2021-09-031-10/+43
| |
| * Add `including_indirect_array_recursion` argument to `reflect.equal`gingerBill2021-09-031-7/+62
| |