primops: Explicit registering of primops

Change-Id: I05e72d2bfdc715d9e27cc672ac35619310b0864d
This commit is contained in:
Tom Hubrecht
2024-05-30 12:57:17 +02:00
parent 772cd6f2a1
commit 4ea0f70b8b
20 changed files with 329 additions and 103 deletions
+4 -4
View File
@@ -22,7 +22,7 @@ static void prim_abort(EvalState & state, const PosIdx pos, Value ** args, Value
.debugThrow();
}
static RegisterPrimOp primop_abort({
PrimOp primop_abort({
.name = "abort",
.args = {"s"},
.doc = R"(
@@ -52,7 +52,7 @@ static void prim_break(EvalState & state, const PosIdx pos, Value ** args, Value
v = *args[0];
}
static RegisterPrimOp primop_break({
PrimOp primop_break({
.name = "break",
.args = {"v"},
.doc = R"(
@@ -78,7 +78,7 @@ static void prim_throw(EvalState & state, const PosIdx pos, Value ** args, Value
state.error<ThrownError>(s).debugThrow();
}
static RegisterPrimOp primop_throw({
PrimOp primop_throw({
.name = "throw",
.args = {"s"},
.doc = R"(
@@ -126,7 +126,7 @@ static void prim_tryEval(EvalState & state, const PosIdx pos, Value ** args, Val
v.mkAttrs(attrs);
}
static RegisterPrimOp primop_tryEval({
PrimOp primop_tryEval({
.name = "__tryEval",
.args = {"e"},
.doc = R"(