class Savi::Compiler::CodeGen::PonyRT
- Savi::Compiler::CodeGen::PonyRT
- Reference
- Object
Defined in:
savi/compiler/code_gen/ponyrt.crConstant Summary
-
ACTOR_PAD_SIZE =
264
-
From libponyrt/pony.h Padding for actor types.
56 bytes: initial header, not including the type descriptor 52/104 bytes: heap 48/88 bytes: gc 28/0 bytes: padding to 64 bytes, ignored XXX: USE_RUNTIMESTATS -> 392
-
DESC_CUSTOM_DESERIALISE_FN =
10
-
DESC_CUSTOM_SERIALISE_SPACE_FN =
9
-
DESC_DESERIALISE_FN =
8
-
DESC_DISPATCH_FN =
11
-
DESC_EVENT_NOTIFY =
13
-
DESC_FIELD_COUNT =
2
-
DESC_FIELD_OFFSET =
3
-
DESC_FINAL_FN =
12
-
DESC_ID =
0
-
DESC_INSTANCE =
4
-
DESC_SERIALISE_FN =
7
-
DESC_SERIALISE_TRACE_FN =
6
-
DESC_SIZE =
1
-
DESC_TRACE_FN =
5
-
DESC_TRAITS =
14
-
DESC_TYPE_NAME =
15
-
DESC_VTABLE =
16
-
HEAP_MAX =
(1_u64 << HEAP_MAXBITS)
-
HEAP_MAXBITS =
(POOL_ALIGN_BITS - 1)
-
HEAP_MIN =
(1_u64 << HEAP_MINBITS)
-
HEAP_MINBITS =
5
-
From libponyrt/mem/heap.h
-
HEAP_SIZECLASSES =
((HEAP_MAXBITS - HEAP_MINBITS) + 1)
-
POOL_ALIGN_BITS =
10
-
POOL_MAX =
(1 << POOL_MAX_BITS)
-
POOL_MAX_BITS =
20
-
POOL_MIN =
(1 << POOL_MIN_BITS)
-
POOL_MIN_BITS =
5
-
From libponyrt/mem/pool.h
-
SIZECLASS_TABLE =
[0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4]
-
From libponyrt/mem/heap.c
-
TRACE_IMMUTABLE =
1
-
TRACE_MUTABLE =
0
-
From libponyrt/pony.h
-
TRACE_OPAQUE =
2
Constructors
Class Method Summary
- .clzl_64(x)
-
.heap_index(size)
From libponyrt/mem/heap.c
-
.pool_index(size)
From libponyrt/mem/pool.c TODO: verify correctness of result compared to ponyc for various sizes
Instance Method Summary
- #cast_kind_of(g : CodeGen, type_ref : Reach::Ref, llvm_type : LLVM::Type, pos : Source::Pos) : Symbol
- #desc : LLVM::Type
- #di_runtime_member_info(debug : DebugInfo)
-
#gen_alloc(g : CodeGen, gtype : GenType, from_expr : AST::Node | Nil, name : String)
This generates the code that allocates an object of the given type.
-
#gen_alloc_actor(g : CodeGen, gtype : GenType, from_expr : AST::Node | Nil, name, become_now = false)
This generates the special kind of allocation needed by actors, invoked by the above function when the type being allocated is an actor.
- #gen_alloc_ctx_get(g : CodeGen)
-
#gen_alloc_struct(g : CodeGen, llvm_type : LLVM::Type, name)
This generates more generic code for allocating a given LLVM struct type, without the assumption of it being initialized as a proper runtime object.
- #gen_cast_value(g : CodeGen, value : LLVM::Value, from_kind : Symbol, to_kind : Symbol, from_type : Reach::Ref, to_type : Reach::Ref, from_expr : AST::Node) : LLVM::Value
-
#gen_desc(g : CodeGen, gtype : GenType)
This defines a global constant for the type descriptor of a type, which is held as the first value in an object, used for identifying its type at runtime, as well as a host of other functions related to dealing with objects in the runtime, such as allocating them and tracing them.
-
#gen_desc_basetype
This defines the generic LLVM struct type for what a type descriptor holds.
- #gen_desc_fn_impls(g : CodeGen, gtype : GenType)
-
#gen_desc_init(g : CodeGen, gtype : GenType, vtable)
This populates the descriptor for the given type with its initialized data.
-
#gen_desc_type(g : CodeGen, type_def : Reach::Def, vtable_size : Int32) : LLVM::Type
This defines a more specific struct type than the above function, tailored to the specific type definition and its virtual table size.
- #gen_dispatch_impl(g : CodeGen, gtype : GenType)
-
#gen_expr_post(g : CodeGen, expr : AST::Node, value : LLVM::Value)
We don't hook into gen_expr post hook at all - simply return the value.
- #gen_get_desc(g : CodeGen, value : LLVM::Value)
- #gen_intrinsic_cpointer_alloc(g : CodeGen, params, llvm_type, elem_size_value)
- #gen_intrinsic_cpointer_realloc(g : CodeGen, params, llvm_type, elem_size_value)
- #gen_main(g : CodeGen)
- #gen_runtime_decls(g : CodeGen)
- #gen_runtime_defaults_func(g : CodeGen)
- #gen_send_impl(g : CodeGen, gtype : GenType, gfunc : GenFunc)
- #gen_struct_type(g : CodeGen, gtype : GenType)
- #gen_trace(g : CodeGen, src : LLVM::Value, dst : LLVM::Value, src_type, dst_type)
- #gen_trace_dynamic(g : CodeGen, dst, src_type, dst_type, after_block)
- #gen_trace_impl(g : CodeGen, gtype : GenType)
- #gen_trace_impl_for_array(g : CodeGen, gtype : GenType, fn)
- #gen_trace_known(g : CodeGen, dst, src_type, ponyrt_trace_kind)
- #gen_trace_tuple(g : CodeGen, dst, src_type)
- #gen_trace_unknown(g : CodeGen, dst, ponyrt_trace_kind)
- #gen_traits_gep_get(g, desc, name)
- #gen_traits_get(g, desc, name)
- #gen_type_name_get(g, desc, name)
- #gen_vtable_gep_get(g, desc, name)
- #gen_vtable_get(g, desc, name)
- #obj : LLVM::Type
Constructor Detail
Class Method Detail
From libponyrt/mem/pool.c
TODO verify correctness of result compared to ponyc for various sizes
Instance Method Detail
This generates the code that allocates an object of the given type. This is the first step before actually calling the constructor of it.
This generates the special kind of allocation needed by actors, invoked by the above function when the type being allocated is an actor.
This generates more generic code for allocating a given LLVM struct type, without the assumption of it being initialized as a proper runtime object.
This defines a global constant for the type descriptor of a type, which is held as the first value in an object, used for identifying its type at runtime, as well as a host of other functions related to dealing with objects in the runtime, such as allocating them and tracing them.
This defines the generic LLVM struct type for what a type descriptor holds. The type descriptor for each type uses a more specific version of this. The order and sizes here must exactly match what is expected by the runtime, and they should correlate to the constants above.
This populates the descriptor for the given type with its initialized data.
This defines a more specific struct type than the above function, tailored to the specific type definition and its virtual table size. The actual type descriptor value for the type is an instance of this.
We don't hook into gen_expr post hook at all - simply return the value.