module core.rt.misc

Code Map

module core.rt.misc;


alias VMain = fn (string[]) (i32);

//! Initialise the monotonic code.
fn vrt_monotonic_init();
//! Get the ticks count.
fn vrt_monotonic_ticks() i64;
//! Get the runtime's initial ticks value.
fn vrt_monotonic_ticks_at_init() i64;
//! Get how many ticks make up a second.
fn vrt_monotonic_ticks_per_second() i64;
fn vrt_panic(msg: scope (scope (const(scope (char)[])[]), location: scope (const(scope (char)[]));
//! Perform a runtime cast.
fn vrt_handle_cast(obj: void*, ti: TypeInfo) void*;
//! Get the hash for size bytes of data.
fn vrt_hash(data: void*, size: size_t) u32;
//! Perform a memcmp between size bytes of d1 and d2.
fn vrt_memcmp(d1: void*, d2: void*, size: size_t) i32;
//! Run global constructors for linked modules.
fn vrt_run_global_ctors() i32;
//! Run local constructors for linked modules.
fn vrt_run_local_ctors() i32;
//! Run the given main function with the given arguments.
fn vrt_run_main(argc: i32, argv: char**, vMain: VMain) i32;
//! Run global destructors for linked modules.
fn vrt_run_global_dtors() i32;
//! Run local destructors for linked modules.
fn vrt_run_local_dtors() i32;
//! Encode c as a string in buf.
fn vrt_encode_static_u8(buf: char[6], c: dchar) size_t;
//! Decode a single codepoint of str, starting from index.
fn vrt_decode_u8_d(str: scope (const(scope (char)[]), index: size_t) dchar;
//! Decode a single codepoint of str, starting from index.
fn vrt_reverse_decode_u8_d(str: scope (const(scope (char)[]), index: size_t) dchar;
fn vrt_monotonic_init()

Initialise the monotonic code.

fn vrt_monotonic_ticks() i64

Get the ticks count.

The ticks count is an amount of time from a specific point.

fn vrt_monotonic_ticks_at_init() i64

Get the runtime's initial ticks value.

fn vrt_monotonic_ticks_per_second() i64

Get how many ticks make up a second.

fn vrt_handle_cast(obj: void*, ti: TypeInfo) void*

Perform a runtime cast.

fn vrt_hash(data: void*, size: size_t) u32

Get the hash for size bytes of data.

fn vrt_memcmp(d1: void*, d2: void*, size: size_t) i32

Perform a memcmp between size bytes of d1 and d2.

fn vrt_run_global_ctors() i32

Run global constructors for linked modules.

fn vrt_run_local_ctors() i32

Run local constructors for linked modules.

fn vrt_run_main(argc: i32, argv: char**, vMain: VMain) i32

Run the given main function with the given arguments.

Returns the return value of the function.

fn vrt_run_global_dtors() i32

Run global destructors for linked modules.

fn vrt_run_local_dtors() i32

Run local destructors for linked modules.

fn vrt_encode_static_u8(buf: char[6], c: dchar) size_t

Encode c as a string in buf.

Return

How many bytes of buf have been used, <= 6.

fn vrt_decode_u8_d(str: scope (const(scope (char)[]), index: size_t) dchar

Decode a single codepoint of str, starting from index.

index is updated to the next codepoint's start position.

fn vrt_reverse_decode_u8_d(str: scope (const(scope (char)[]), index: size_t) dchar

Decode a single codepoint of str, starting from index.

index is updated to the previous codepoint's start position.