Skip to main content

Crate yulang_native

Crate yulang_native 

Source
Expand description

Native backend skeleton for Yulang.

This crate starts with a small control IR boundary. Cranelift codegen will sit behind this boundary later; for now the important behavior is that supported runtime IR lowers explicitly and unsupported runtime IR fails with a structured reason.

Re-exports§

pub use abi::NativeAbiBlock;
pub use abi::NativeAbiFunction;
pub use abi::NativeAbiModule;
pub use abi::NativeAbiStmt;
pub use abi::lower_closure_module_to_abi;
pub use abi_eval::NativeAbiEvalError;
pub use abi_eval::NativeAbiEvalResult;
pub use abi_eval::eval_abi_module;
pub use abi_format::format_abi_module;
pub use abi_lane::NativeAbiLaneAnalysis;
pub use abi_lane::NativeAbiRepr;
pub use abi_lane::NativeAbiReprAnalysis;
pub use abi_lane::NativeAbiValueLane;
pub use abi_lane::NativeRuntimePtrKind;
pub use abi_lane::analyze_abi_reprs;
pub use abi_lane::analyze_abi_value_lanes;
pub use abi_subset::NativeAbiSubsetError;
pub use abi_subset::validate_cranelift_prototype_subset;
pub use abi_validate::NativeAbiValidateError;
pub use abi_validate::validate_abi_module;
pub use backend_selection::NativeBackendPlan;
pub use backend_selection::NativeBackendReason;
pub use backend_selection::NativeBackendReasonKind;
pub use backend_selection::NativeBackendSelection;
pub use backend_selection::NativeRootBackend;
pub use backend_selection::NativeRootLabel;
pub use backend_selection::select_native_backends;
pub use closure::NativeClosureAbi;
pub use closure::NativeClosureBlock;
pub use closure::NativeClosureCapture;
pub use closure::NativeClosureCodeRef;
pub use closure::NativeClosureEnvRef;
pub use closure::NativeClosureEnvironment;
pub use closure::NativeClosureFunction;
pub use closure::NativeClosureModule;
pub use closure::NativeClosureSlot;
pub use closure::NativeClosureStmt;
pub use closure::closure_convert_module;
pub use compare::NativeCompareError;
pub use compare::NativeSourceCompareError;
pub use compare::NativeValueCompareError;
pub use compare::compare_module;
pub use compare::compare_module_i64;
pub use compare::compare_module_value;
pub use control_ir::BlockId;
pub use control_ir::NativeBlock;
pub use control_ir::NativeFunction;
pub use control_ir::NativeLiteral;
pub use control_ir::NativeModule;
pub use control_ir::NativeStmt;
pub use control_ir::NativeTerminator;
pub use control_ir::ValueId;
pub use cps_capture::infer_cps_captures;
pub use cps_closure::CpsClosureContinuation;
pub use cps_closure::CpsClosureFunction;
pub use cps_closure::CpsClosureModule;
pub use cps_closure::closure_convert_cps_module;
pub use cps_compare::CpsCompareError;
pub use cps_compare::CpsReprI64CompareReport;
pub use cps_compare::CpsReprI64RootCompare;
pub use cps_compare::compare_cps_module;
pub use cps_compare::compare_cps_repr_cranelift_i64;
pub use cps_compare::compare_cps_repr_cranelift_i64_report;
pub use cps_effectful_calls::reify_effectful_direct_calls;
pub use cps_env::CpsContinuationEnvironmentLayout;
pub use cps_env::CpsEnvironmentLayout;
pub use cps_env::CpsEnvironmentSlot;
pub use cps_env::CpsFunctionEnvironmentLayout;
pub use cps_env::layout_cps_environments;
pub use cps_eval::CpsEvalError;
pub use cps_eval::eval_cps_module;
pub use cps_frame_trace::CpsFrameTraceEvent;
pub use cps_frame_trace::CpsFrameTraceLayer;
pub use cps_frame_trace::CpsFrameTraceSlot;
pub use cps_frame_trace::with_cps_frame_trace;
pub use cps_ir::CpsContinuation;
pub use cps_ir::CpsContinuationId;
pub use cps_ir::CpsFunction;
pub use cps_ir::CpsHandler;
pub use cps_ir::CpsHandlerArm;
pub use cps_ir::CpsHandlerContextId;
pub use cps_ir::CpsHandlerId;
pub use cps_ir::CpsLiteral;
pub use cps_ir::CpsModule;
pub use cps_ir::CpsShotKind;
pub use cps_ir::CpsStmt;
pub use cps_ir::CpsTerminator;
pub use cps_ir::CpsValueId;
pub use cps_lower::CpsLowerError;
pub use cps_lower::CpsLowerResult;
pub use cps_lower::lower_cps_module;
pub use cps_optimize::CpsOptimizationOutput;
pub use cps_optimize::CpsOptimizationProfile;
pub use cps_optimize::optimize_cps_repr_abi_module;
pub use cps_repr::CpsReprAbiAnalysis;
pub use cps_repr::CpsReprAbiLane;
pub use cps_repr::CpsReprContinuation;
pub use cps_repr::CpsReprEnvironmentSlot;
pub use cps_repr::CpsReprEvalError;
pub use cps_repr::CpsReprFunction;
pub use cps_repr::CpsReprFunctionAbiAnalysis;
pub use cps_repr::CpsReprFunctionValueAnalysis;
pub use cps_repr::CpsReprModule;
pub use cps_repr::CpsReprValueAnalysis;
pub use cps_repr::CpsReprValueKind;
pub use cps_repr::analyze_cps_repr_abi_lanes;
pub use cps_repr::analyze_cps_repr_values;
pub use cps_repr::eval_cps_repr_module;
pub use cps_repr::lower_cps_repr_module;
pub use cps_repr_abi::CpsReprAbiContinuation;
pub use cps_repr_abi::CpsReprAbiEnvironmentSlot;
pub use cps_repr_abi::CpsReprAbiFunction;
pub use cps_repr_abi::CpsReprAbiHandler;
pub use cps_repr_abi::CpsReprAbiHandlerArm;
pub use cps_repr_abi::CpsReprAbiModule;
pub use cps_repr_abi::CpsReprAbiValue;
pub use cps_repr_abi::lower_cps_repr_abi_module;
pub use cps_repr_cranelift::CpsReprCraneliftError;
pub use cps_repr_cranelift::CpsReprJitModule;
pub use cps_repr_cranelift::CpsReprObjectModule;
pub use cps_repr_cranelift::compile_cps_repr_abi_module;
pub use cps_repr_cranelift::compile_cps_repr_abi_module_to_object;
pub use cps_repr_cranelift::compile_runtime_module_to_cps_repr_jit;
pub use cps_repr_cranelift::compile_runtime_module_to_cps_repr_object;
pub use cps_validate::CpsValidateError;
pub use cps_validate::validate_cps_module;
pub use cranelift::NativeCraneliftError;
pub use cranelift::NativeJitModule;
pub use cranelift::NativeObjectModule;
pub use cranelift::compile_abi_module;
pub use cranelift::compile_abi_module_to_object;
pub use eval::NativeEvalError;
pub use eval::eval_module;
pub use lower::NativeLowerError;
pub use lower::NativeLowerResult;
pub use lower::lower_module;
pub use native_runtime::NativeRuntimeContext;
pub use native_runtime::bool_is_true as native_runtime_bool_is_true;
pub use native_runtime::concat_string as native_runtime_concat_string;
pub use native_runtime::list_empty as native_runtime_list_empty;
pub use native_runtime::list_index as native_runtime_list_index;
pub use native_runtime::list_len as native_runtime_list_len;
pub use native_runtime::list_merge as native_runtime_list_merge;
pub use native_runtime::list_singleton as native_runtime_list_singleton;
pub use native_runtime::list_view_raw as native_runtime_list_view_raw;
pub use native_runtime::make_bool as native_runtime_make_bool;
pub use native_runtime::make_float as native_runtime_make_float;
pub use native_runtime::make_int as native_runtime_make_int;
pub use native_runtime::make_string as native_runtime_make_string;
pub use native_runtime::make_unit as native_runtime_make_unit;
pub use native_runtime::record_empty as native_runtime_record_empty;
pub use native_runtime::record_insert as native_runtime_record_insert;
pub use native_runtime::record_select as native_runtime_record_select;
pub use native_runtime::tuple_empty as native_runtime_tuple_empty;
pub use native_runtime::tuple_get as native_runtime_tuple_get;
pub use native_runtime::tuple_push as native_runtime_tuple_push;
pub use native_runtime::variant as native_runtime_variant;
pub use native_runtime::variant_payload as native_runtime_variant_payload;
pub use native_runtime::variant_tag_eq as native_runtime_variant_tag_eq;
pub use native_runtime::yulang_native_bool_is_true;
pub use native_runtime::yulang_native_concat_string;
pub use native_runtime::yulang_native_context_free;
pub use native_runtime::yulang_native_context_new;
pub use native_runtime::yulang_native_list_empty;
pub use native_runtime::yulang_native_list_index;
pub use native_runtime::yulang_native_list_index_range;
pub use native_runtime::yulang_native_list_index_range_raw;
pub use native_runtime::yulang_native_list_len;
pub use native_runtime::yulang_native_list_merge;
pub use native_runtime::yulang_native_list_singleton;
pub use native_runtime::yulang_native_list_splice;
pub use native_runtime::yulang_native_list_splice_raw;
pub use native_runtime::yulang_native_list_view_raw;
pub use native_runtime::yulang_native_make_bool;
pub use native_runtime::yulang_native_make_float;
pub use native_runtime::yulang_native_make_int;
pub use native_runtime::yulang_native_make_string;
pub use native_runtime::yulang_native_make_unit;
pub use native_runtime::yulang_native_print_value;
pub use native_runtime::yulang_native_record_empty;
pub use native_runtime::yulang_native_record_insert;
pub use native_runtime::yulang_native_record_select;
pub use native_runtime::yulang_native_string_index_range;
pub use native_runtime::yulang_native_string_index_range_raw;
pub use native_runtime::yulang_native_string_splice;
pub use native_runtime::yulang_native_string_splice_raw;
pub use native_runtime::yulang_native_tuple_empty;
pub use native_runtime::yulang_native_tuple_get;
pub use native_runtime::yulang_native_tuple_push;
pub use native_runtime::yulang_native_variant;
pub use native_runtime::yulang_native_variant_payload;
pub use native_runtime::yulang_native_variant_tag_eq;
pub use value_cranelift::NativeValueCraneliftError;
pub use value_cranelift::NativeValueJitModule;
pub use value_cranelift::NativeValueObjectModule;
pub use value_cranelift::compile_value_abi_module;
pub use value_cranelift::compile_value_abi_module_to_object;

Modules§

abi
Backend-neutral ABI lowering for native closure IR.
abi_eval
abi_format
abi_lane
abi_subset
abi_validate
backend_selection
closure
compare
control_ir
cps_capture
cps_closure
cps_compare
cps_effectful_calls
Normalize effectful direct calls into explicit CPS call terminators.
cps_env
cps_eval
cps_frame_trace
cps_ir
cps_lower
cps_optimize
Optimization entrypoint for backend-facing CPS representation ABI.
cps_repr
cps_repr_abi
Backend-facing ABI shape for CPS representation IR.
cps_repr_cranelift
cps_validate
cranelift
eval
lower
native_runtime
Runtime value support used by native value-lane code.
value_cranelift