From 5209cea7012cfa3b39a5a289e65e2ea5e166d730 Mon Sep 17 00:00:00 2001 From: Escherichia Date: Thu, 21 Mar 2024 12:34:40 +0100 Subject: WIP: translate.ml and extract.ml do not compile. Some assert left to do and we need to see how translate_crate can give meta to the functions it calls --- compiler/InterpreterExpressions.mli | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/InterpreterExpressions.mli') diff --git a/compiler/InterpreterExpressions.mli b/compiler/InterpreterExpressions.mli index b975371c..69455682 100644 --- a/compiler/InterpreterExpressions.mli +++ b/compiler/InterpreterExpressions.mli @@ -12,7 +12,7 @@ open InterpreterPaths This function doesn't reorganize the context to make sure we can read the place. If needs be, you should call {!InterpreterPaths.update_ctx_along_read_place} first. *) -val read_place : access_kind -> place -> (typed_value -> m_fun) -> m_fun +val read_place : Meta.meta -> access_kind -> place -> (typed_value -> m_fun) -> m_fun (** Auxiliary function. @@ -31,7 +31,7 @@ val read_place : access_kind -> place -> (typed_value -> m_fun) -> m_fun primitively copyable and contain borrows. *) val access_rplace_reorganize_and_read : - config -> bool -> access_kind -> place -> (typed_value -> m_fun) -> m_fun + Meta.meta -> config -> bool -> access_kind -> place -> (typed_value -> m_fun) -> m_fun (** Evaluate an operand. @@ -42,11 +42,11 @@ val access_rplace_reorganize_and_read : of the environment, before evaluating all the operands at once. Use {!eval_operands} instead. *) -val eval_operand : config -> operand -> (typed_value -> m_fun) -> m_fun +val eval_operand : Meta.meta -> config -> operand -> (typed_value -> m_fun) -> m_fun (** Evaluate several operands at once. *) val eval_operands : - config -> operand list -> (typed_value list -> m_fun) -> m_fun + Meta.meta -> config -> operand list -> (typed_value list -> m_fun) -> m_fun (** Evaluate an rvalue which is not a global (globals are handled elsewhere). @@ -56,7 +56,7 @@ val eval_operands : reads should have been eliminated from the AST. *) val eval_rvalue_not_global : - config -> rvalue -> ((typed_value, eval_error) result -> m_fun) -> m_fun + Meta.meta -> config -> rvalue -> ((typed_value, eval_error) result -> m_fun) -> m_fun (** Evaluate a fake read (update the context so that we can read a place) *) -val eval_fake_read : config -> place -> cm_fun +val eval_fake_read : Meta.meta -> config -> place -> cm_fun -- cgit v1.2.3 From d6ea35868e30bbc7542bfa09bb04d5b6cbe93b22 Mon Sep 17 00:00:00 2001 From: Escherichia Date: Mon, 25 Mar 2024 12:06:05 +0100 Subject: Inverted meta and config argument orders (from meta -> config to config -> meta) --- compiler/InterpreterExpressions.mli | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/InterpreterExpressions.mli') diff --git a/compiler/InterpreterExpressions.mli b/compiler/InterpreterExpressions.mli index 69455682..76627c40 100644 --- a/compiler/InterpreterExpressions.mli +++ b/compiler/InterpreterExpressions.mli @@ -31,7 +31,7 @@ val read_place : Meta.meta -> access_kind -> place -> (typed_value -> m_fun) -> primitively copyable and contain borrows. *) val access_rplace_reorganize_and_read : - Meta.meta -> config -> bool -> access_kind -> place -> (typed_value -> m_fun) -> m_fun + config -> Meta.meta -> bool -> access_kind -> place -> (typed_value -> m_fun) -> m_fun (** Evaluate an operand. @@ -42,11 +42,11 @@ val access_rplace_reorganize_and_read : of the environment, before evaluating all the operands at once. Use {!eval_operands} instead. *) -val eval_operand : Meta.meta -> config -> operand -> (typed_value -> m_fun) -> m_fun +val eval_operand : config -> Meta.meta -> operand -> (typed_value -> m_fun) -> m_fun (** Evaluate several operands at once. *) val eval_operands : - Meta.meta -> config -> operand list -> (typed_value list -> m_fun) -> m_fun + config -> Meta.meta -> operand list -> (typed_value list -> m_fun) -> m_fun (** Evaluate an rvalue which is not a global (globals are handled elsewhere). @@ -56,7 +56,7 @@ val eval_operands : reads should have been eliminated from the AST. *) val eval_rvalue_not_global : - Meta.meta -> config -> rvalue -> ((typed_value, eval_error) result -> m_fun) -> m_fun + config -> Meta.meta -> rvalue -> ((typed_value, eval_error) result -> m_fun) -> m_fun (** Evaluate a fake read (update the context so that we can read a place) *) -val eval_fake_read : Meta.meta -> config -> place -> cm_fun +val eval_fake_read : config -> Meta.meta -> place -> cm_fun -- cgit v1.2.3 From 64666edb3c10cd42e15937ac4038b83def630e35 Mon Sep 17 00:00:00 2001 From: Escherichia Date: Thu, 28 Mar 2024 17:14:27 +0100 Subject: formatting --- compiler/InterpreterExpressions.mli | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'compiler/InterpreterExpressions.mli') diff --git a/compiler/InterpreterExpressions.mli b/compiler/InterpreterExpressions.mli index 76627c40..0fb12180 100644 --- a/compiler/InterpreterExpressions.mli +++ b/compiler/InterpreterExpressions.mli @@ -12,7 +12,8 @@ open InterpreterPaths This function doesn't reorganize the context to make sure we can read the place. If needs be, you should call {!InterpreterPaths.update_ctx_along_read_place} first. *) -val read_place : Meta.meta -> access_kind -> place -> (typed_value -> m_fun) -> m_fun +val read_place : + Meta.meta -> access_kind -> place -> (typed_value -> m_fun) -> m_fun (** Auxiliary function. @@ -31,7 +32,13 @@ val read_place : Meta.meta -> access_kind -> place -> (typed_value -> m_fun) -> primitively copyable and contain borrows. *) val access_rplace_reorganize_and_read : - config -> Meta.meta -> bool -> access_kind -> place -> (typed_value -> m_fun) -> m_fun + config -> + Meta.meta -> + bool -> + access_kind -> + place -> + (typed_value -> m_fun) -> + m_fun (** Evaluate an operand. @@ -42,7 +49,8 @@ val access_rplace_reorganize_and_read : of the environment, before evaluating all the operands at once. Use {!eval_operands} instead. *) -val eval_operand : config -> Meta.meta -> operand -> (typed_value -> m_fun) -> m_fun +val eval_operand : + config -> Meta.meta -> operand -> (typed_value -> m_fun) -> m_fun (** Evaluate several operands at once. *) val eval_operands : @@ -56,7 +64,11 @@ val eval_operands : reads should have been eliminated from the AST. *) val eval_rvalue_not_global : - config -> Meta.meta -> rvalue -> ((typed_value, eval_error) result -> m_fun) -> m_fun + config -> + Meta.meta -> + rvalue -> + ((typed_value, eval_error) result -> m_fun) -> + m_fun (** Evaluate a fake read (update the context so that we can read a place) *) val eval_fake_read : config -> Meta.meta -> place -> cm_fun -- cgit v1.2.3