diff options
Diffstat (limited to 'libtnsl/src')
-rw-r--r-- | libtnsl/src/algo/algo.tnsl (renamed from libtnsl/src/alg/alg.tnsl) | 8 | ||||
-rw-r--r-- | libtnsl/src/algo/math/math.tnsl (renamed from libtnsl/src/alg/math/math.tnsl) | 8 | ||||
-rw-r--r-- | libtnsl/src/libtnsl.tnsl | 10 | ||||
-rw-r--r-- | libtnsl/src/reflect/type.tnsl | 54 |
4 files changed, 68 insertions, 12 deletions
diff --git a/libtnsl/src/alg/alg.tnsl b/libtnsl/src/algo/algo.tnsl index d346464..7ddd677 100644 --- a/libtnsl/src/alg/alg.tnsl +++ b/libtnsl/src/algo/algo.tnsl @@ -17,4 +17,10 @@ THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE EXPRESS OR IMPLIED -#/
\ No newline at end of file +#/ + +/; export module algo + /: include + "math" + :/ +;/
\ No newline at end of file diff --git a/libtnsl/src/alg/math/math.tnsl b/libtnsl/src/algo/math/math.tnsl index d346464..5676d09 100644 --- a/libtnsl/src/alg/math/math.tnsl +++ b/libtnsl/src/algo/math/math.tnsl @@ -17,4 +17,10 @@ THIS SOFTWARE/SOURCE CODE IS PROVIDED "AS IS" WITH NO WARRANTY, GUARANTEE, OR CLAIM OF FITNESS FOR ANY PURPOSE EXPRESS OR IMPLIED -#/
\ No newline at end of file +#/ + +/; export module math + /; include + + ;/ +;/
\ No newline at end of file diff --git a/libtnsl/src/libtnsl.tnsl b/libtnsl/src/libtnsl.tnsl index 266c1fa..434e7a4 100644 --- a/libtnsl/src/libtnsl.tnsl +++ b/libtnsl/src/libtnsl.tnsl @@ -20,5 +20,11 @@ #/ /;export module tnsl - -;/ + /: import + "algo" + "box" + "io" + "reflect" + "time" + :/ +;/
\ No newline at end of file diff --git a/libtnsl/src/reflect/type.tnsl b/libtnsl/src/reflect/type.tnsl index 2ed0016..b36dfc5 100644 --- a/libtnsl/src/reflect/type.tnsl +++ b/libtnsl/src/reflect/type.tnsl @@ -19,25 +19,63 @@ EXPRESS OR IMPLIED #/ -; raw struct _type_header { - uint +/## tnsl.reflect._type + Header data which prefixes all non-raw structs. + Upper limits for classes and libs defined here: + - Max 2^32 libraries + - Max 2^16 classes per library + - Max 2^8 Generics per class +#/ +; raw struct _type(uint8 N) { + uint32 _lib_index, + uint16 _type_index, - ~{}_type_header + {N}_type _generic_list } -; raw struct _method { +/## tnsl.reflect._method + Metadata for methods (can be decoded from library + symbol tables). Limits for methods defined here: + - Max 2^8 inputs + - Max 2^8 outputs +#/ +; raw struct _method(uint8 I, O) { + ~{}charp + name, + + {I}_type + inputs, + {O}_type + outputs, + ~void address } -; raw struct _type { - ~{}int - _offsets, +/## tnsl.reflect._member + Metadata about struct members +#/ +; raw struct _member { + ~{}charp + name, + + uint + offset, + + _type + _member_type +} +/## tnsl.reflect._type_addresses + Metadata about where things are stored + in a class +#/ +; raw struct _type_addresses { ~{}uint + _offsets, _super_offsets, ~{}_type @@ -47,7 +85,7 @@ _methods } -/; method _type_header +/; method _type /; _is (_type_header base) ;/ |