Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
primops.hh File Reference
#include "eval.hh"
#include <tuple>
#include <vector>

Go to the source code of this file.

Classes

struct  nix::RegisterPrimOp
 

Functions

void nix::prim_importNative (EvalState &state, const PosIdx pos, Value **args, Value &v)
 
void nix::prim_exec (EvalState &state, const PosIdx pos, Value **args, Value &v)
 
void nix::makePositionThunks (EvalState &state, const PosIdx pos, Value &line, Value &column)
 

Variables

constexpr size_t nix::nonRecursiveStackReservation = 128
 
constexpr size_t nix::conservativeStackReservation = 16
 

Function Documentation

◆ prim_exec()

void nix::prim_exec ( EvalState & state,
const PosIdx pos,
Value ** args,
Value & v )

Execute a program and parse its output

◆ prim_importNative()

void nix::prim_importNative ( EvalState & state,
const PosIdx pos,
Value ** args,
Value & v )

Load a ValueInitializer from a DSO and return whatever it initializes

Variable Documentation

◆ conservativeStackReservation

size_t nix::conservativeStackReservation = 16
constexpr

Functions that maybe applied to self-similar inputs, such as concatMap on a tree, should reserve a smaller part of the stack for allocation.

Note: this is expected to be multiplied by sizeof(Value), or about 24 bytes.

◆ nonRecursiveStackReservation

size_t nix::nonRecursiveStackReservation = 128
constexpr

For functions where we do not expect deep recursion, we can use a sizable part of the stack a free allocation space.

Note: this is expected to be multiplied by sizeof(Value), or about 24 bytes.