mirror of
https://github.com/fluencelabs/aquavm
synced 2024-12-04 23:20:18 +00:00
feat(execution-engine): rename boxed_values into value_types (#664)
This commit is contained in:
parent
abdc88309f
commit
20ae5eeeb9
@ -16,9 +16,9 @@
|
||||
|
||||
mod values_sparse_matrix;
|
||||
|
||||
use crate::execution_step::boxed_value::CanonStreamWithProvenance;
|
||||
use crate::execution_step::boxed_value::ScalarRef;
|
||||
use crate::execution_step::errors_prelude::*;
|
||||
use crate::execution_step::value_types::CanonStreamWithProvenance;
|
||||
use crate::execution_step::value_types::ScalarRef;
|
||||
use crate::execution_step::ExecutionResult;
|
||||
use crate::execution_step::FoldState;
|
||||
use crate::execution_step::ValueAggregate;
|
||||
|
@ -18,7 +18,7 @@ pub(crate) mod errors;
|
||||
pub(crate) mod stream_map_key;
|
||||
|
||||
use self::stream_map_key::StreamMapKey;
|
||||
use crate::execution_step::boxed_value::StreamMap;
|
||||
use crate::execution_step::value_types::StreamMap;
|
||||
use crate::execution_step::ExecutionResult;
|
||||
use crate::execution_step::Generation;
|
||||
use crate::execution_step::ValueAggregate;
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
use super::*;
|
||||
use crate::execution_step::boxed_value::TracePosOperate;
|
||||
use crate::execution_step::resolver::Resolvable;
|
||||
use crate::execution_step::value_types::TracePosOperate;
|
||||
use crate::execution_step::CanonResultAggregate;
|
||||
use crate::execution_step::LiteralAggregate;
|
||||
use crate::execution_step::PEEK_ALLOWED_ON_NON_EMPTY;
|
||||
@ -126,7 +126,7 @@ fn apply_canon_stream(
|
||||
trace_ctx: &TraceHandler,
|
||||
) -> ExecutionResult<ValueAggregate> {
|
||||
// TODO: refactor this code after boxed value
|
||||
use crate::execution_step::boxed_value::JValuable;
|
||||
use crate::execution_step::value_types::JValuable;
|
||||
|
||||
let canon_stream = exec_ctx.scalars.get_canon_stream(ast_stream.name)?;
|
||||
let value = JValuable::as_jvalue(&&canon_stream.canon_stream).into_owned();
|
||||
@ -148,7 +148,7 @@ fn apply_canon_stream_wl(
|
||||
trace_ctx: &TraceHandler,
|
||||
) -> ExecutionResult<ValueAggregate> {
|
||||
// TODO: refactor this code after boxed value
|
||||
use crate::execution_step::boxed_value::JValuable;
|
||||
use crate::execution_step::value_types::JValuable;
|
||||
|
||||
let canon_stream = exec_ctx.scalars.get_canon_stream(ast_stream.name)?;
|
||||
let canon_stream_value = &canon_stream.canon_stream;
|
||||
|
@ -245,7 +245,7 @@ impl<'i> ResolvedCall<'i> {
|
||||
/// Check output type name for being already in execution context.
|
||||
// TODO: this check should be moved on a parsing stage
|
||||
fn check_output_name(output: &ast::CallOutputValue<'_>, exec_ctx: &ExecutionCtx<'_>) -> ExecutionResult<()> {
|
||||
use crate::execution_step::boxed_value::ScalarRef;
|
||||
use crate::execution_step::value_types::ScalarRef;
|
||||
|
||||
let scalar_name = match output {
|
||||
ast::CallOutputValue::Scalar(scalar) => scalar.name,
|
||||
|
@ -21,8 +21,8 @@ use super::canon_utils::CreateCanonStreamClosure;
|
||||
use super::ExecutionCtx;
|
||||
use super::ExecutionResult;
|
||||
use super::TraceHandler;
|
||||
use crate::execution_step::boxed_value::CanonStream;
|
||||
use crate::execution_step::boxed_value::CanonStreamWithProvenance;
|
||||
use crate::execution_step::value_types::CanonStream;
|
||||
use crate::execution_step::value_types::CanonStreamWithProvenance;
|
||||
use crate::log_instruction;
|
||||
use crate::trace_to_exec_err;
|
||||
|
||||
|
@ -21,8 +21,8 @@ use super::canon_utils::CreateCanonStreamClosure;
|
||||
use super::ExecutionCtx;
|
||||
use super::ExecutionResult;
|
||||
use super::TraceHandler;
|
||||
use crate::execution_step::boxed_value::CanonStream;
|
||||
use crate::execution_step::boxed_value::JValuable;
|
||||
use crate::execution_step::value_types::CanonStream;
|
||||
use crate::execution_step::value_types::JValuable;
|
||||
use crate::execution_step::CanonResultAggregate;
|
||||
use crate::execution_step::ValueAggregate;
|
||||
use crate::log_instruction;
|
||||
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
use crate::execution_step::boxed_value::CanonStream;
|
||||
use crate::execution_step::errors::UncatchableError;
|
||||
use crate::execution_step::instructions::resolve_peer_id_to_string;
|
||||
use crate::execution_step::value_types::CanonStream;
|
||||
use crate::execution_step::ExecutionCtx;
|
||||
use crate::execution_step::ExecutionResult;
|
||||
use crate::execution_step::TraceHandler;
|
||||
|
@ -25,4 +25,4 @@ use super::ExecutionCtx;
|
||||
use super::ExecutionResult;
|
||||
use super::Instruction;
|
||||
use super::ScalarRef;
|
||||
use crate::execution_step::boxed_value::*;
|
||||
use crate::execution_step::value_types::*;
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
use super::*;
|
||||
use crate::execution_step::boxed_value::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::boxed_value::IterableValue;
|
||||
use crate::execution_step::value_types::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::value_types::IterableValue;
|
||||
use crate::execution_step::CatchableError;
|
||||
use crate::execution_step::PEEK_ALLOWED_ON_NON_EMPTY;
|
||||
use crate::JValue;
|
||||
|
@ -19,7 +19,7 @@ use super::ExecutableInstruction;
|
||||
use super::ExecutionCtx;
|
||||
use super::ExecutionResult;
|
||||
use super::TraceHandler;
|
||||
use crate::execution_step::boxed_value::IterableValue;
|
||||
use crate::execution_step::value_types::IterableValue;
|
||||
use crate::execution_step::Joinable;
|
||||
use crate::joinable;
|
||||
use crate::log_instruction;
|
||||
|
@ -21,8 +21,8 @@ use super::ExecutableInstruction;
|
||||
use super::ExecutionCtx;
|
||||
use super::ExecutionResult;
|
||||
use super::TraceHandler;
|
||||
use crate::execution_step::boxed_value::Stream;
|
||||
use crate::execution_step::instructions::fold_stream::stream_execute_helpers::execute_with_stream;
|
||||
use crate::execution_step::value_types::Stream;
|
||||
use crate::log_instruction;
|
||||
|
||||
use air_parser::ast::FoldStream;
|
||||
|
@ -18,12 +18,12 @@ use super::completeness_updater::FoldGenerationObserver;
|
||||
use super::ExecutionCtx;
|
||||
use super::ExecutionResult;
|
||||
use super::TraceHandler;
|
||||
use crate::execution_step::boxed_value::IterableValue;
|
||||
use crate::execution_step::boxed_value::RecursiveCursorState;
|
||||
use crate::execution_step::boxed_value::RecursiveStreamCursor;
|
||||
use crate::execution_step::boxed_value::Stream;
|
||||
use crate::execution_step::instructions::fold::IterableType;
|
||||
use crate::execution_step::instructions::fold_scalar::fold;
|
||||
use crate::execution_step::value_types::IterableValue;
|
||||
use crate::execution_step::value_types::RecursiveCursorState;
|
||||
use crate::execution_step::value_types::RecursiveStreamCursor;
|
||||
use crate::execution_step::value_types::Stream;
|
||||
use crate::trace_to_exec_err;
|
||||
|
||||
use air_parser::ast::Instruction;
|
||||
|
@ -39,7 +39,7 @@ mod xor;
|
||||
pub(crate) use call::triplet::resolve_peer_id_to_string;
|
||||
pub(crate) use fold::FoldState;
|
||||
|
||||
use super::boxed_value::ScalarRef;
|
||||
use super::value_types::ScalarRef;
|
||||
use super::ExecutionCtx;
|
||||
use super::ExecutionError;
|
||||
use super::ExecutionResult;
|
||||
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
mod boxed_value;
|
||||
mod errors;
|
||||
pub(crate) mod execution_context;
|
||||
mod instructions;
|
||||
mod lambda_applier;
|
||||
mod resolver;
|
||||
mod value_types;
|
||||
|
||||
const PEEK_ALLOWED_ON_NON_EMPTY: &str = "peek always return elements inside fold,\
|
||||
this guaranteed by implementation of next and avoiding empty folds";
|
||||
@ -40,17 +40,17 @@ pub mod errors_prelude {
|
||||
|
||||
pub(super) use self::instructions::ExecutableInstruction;
|
||||
pub(super) use self::instructions::FoldState;
|
||||
pub(super) use boxed_value::CanonResultAggregate;
|
||||
pub(super) use boxed_value::Generation;
|
||||
pub(super) use boxed_value::LiteralAggregate;
|
||||
pub(super) use boxed_value::ScalarRef;
|
||||
pub(super) use boxed_value::ServiceResultAggregate;
|
||||
pub(super) use boxed_value::Stream;
|
||||
pub(super) use boxed_value::ValueAggregate;
|
||||
pub(crate) use errors::Joinable;
|
||||
pub(crate) use errors::LastErrorAffectable;
|
||||
pub(crate) use execution_context::ExecutionCtx;
|
||||
pub(crate) use execution_context::LastError;
|
||||
pub(super) use value_types::CanonResultAggregate;
|
||||
pub(super) use value_types::Generation;
|
||||
pub(super) use value_types::LiteralAggregate;
|
||||
pub(super) use value_types::ScalarRef;
|
||||
pub(super) use value_types::ServiceResultAggregate;
|
||||
pub(super) use value_types::Stream;
|
||||
pub(super) use value_types::ValueAggregate;
|
||||
|
||||
pub(crate) use air_trace_handler::TraceHandler;
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
use super::RcSecurityTetraplets;
|
||||
use super::Resolvable;
|
||||
use crate::execution_step::boxed_value::JValuable;
|
||||
use crate::execution_step::execution_context::ExecutionCtx;
|
||||
use crate::execution_step::lambda_applier::select_by_lambda_from_scalar;
|
||||
use crate::execution_step::value_types::JValuable;
|
||||
use crate::execution_step::ExecutionResult;
|
||||
use crate::JValue;
|
||||
use crate::LambdaAST;
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
use super::Iterable;
|
||||
use super::IterableItem;
|
||||
use crate::execution_step::boxed_value::CanonStream;
|
||||
use crate::execution_step::boxed_value::TracePosOperate;
|
||||
use crate::execution_step::value_types::CanonStream;
|
||||
use crate::execution_step::value_types::TracePosOperate;
|
||||
use crate::foldable_next;
|
||||
use crate::foldable_prev;
|
||||
|
@ -17,7 +17,7 @@
|
||||
use super::select_by_lambda_from_stream;
|
||||
use super::ExecutionResult;
|
||||
use super::JValuable;
|
||||
use crate::execution_step::boxed_value::CanonStream;
|
||||
use crate::execution_step::value_types::CanonStream;
|
||||
use crate::execution_step::ExecutionCtx;
|
||||
use crate::execution_step::RcSecurityTetraplets;
|
||||
use crate::JValue;
|
@ -18,7 +18,7 @@ use super::select_by_lambda_from_stream;
|
||||
use super::ExecutionResult;
|
||||
use super::JValuable;
|
||||
use super::ValueAggregate;
|
||||
use crate::execution_step::boxed_value::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::value_types::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::ExecutionCtx;
|
||||
use crate::execution_step::RcSecurityTetraplets;
|
||||
use crate::JValue;
|
@ -19,7 +19,7 @@ use super::ExecutionResult;
|
||||
use super::IterableItem;
|
||||
use super::JValuable;
|
||||
use super::LambdaAST;
|
||||
use crate::execution_step::boxed_value::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::value_types::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::ExecutionCtx;
|
||||
use crate::execution_step::RcSecurityTetraplets;
|
||||
use crate::JValue;
|
@ -19,7 +19,7 @@ use super::ExecutionResult;
|
||||
use super::JValuable;
|
||||
use super::LambdaAST;
|
||||
use super::ValueAggregate;
|
||||
use crate::execution_step::boxed_value::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::value_types::populate_tetraplet_with_lambda;
|
||||
use crate::execution_step::ExecutionCtx;
|
||||
use crate::execution_step::RcSecurityTetraplets;
|
||||
use crate::JValue;
|
@ -15,9 +15,9 @@
|
||||
*/
|
||||
|
||||
use super::Stream;
|
||||
use crate::execution_step::boxed_value::Iterable;
|
||||
use crate::execution_step::boxed_value::IterableItem;
|
||||
use crate::execution_step::boxed_value::IterableVecResolvedCall;
|
||||
use crate::execution_step::value_types::Iterable;
|
||||
use crate::execution_step::value_types::IterableItem;
|
||||
use crate::execution_step::value_types::IterableVecResolvedCall;
|
||||
use crate::execution_step::ValueAggregate;
|
||||
|
||||
use air_interpreter_data::GenerationIdx;
|
@ -17,7 +17,7 @@
|
||||
use super::values_matrix::NewValuesMatrix;
|
||||
use super::values_matrix::ValuesMatrix;
|
||||
use super::StreamCursor;
|
||||
use crate::execution_step::boxed_value::TracePosOperate;
|
||||
use crate::execution_step::value_types::TracePosOperate;
|
||||
use crate::execution_step::ExecutionResult;
|
||||
|
||||
use air_interpreter_data::GenerationIdx;
|
@ -17,8 +17,8 @@
|
||||
use super::Generation;
|
||||
use super::Stream;
|
||||
use super::ValueAggregate;
|
||||
use crate::execution_step::boxed_value::TracePosOperate;
|
||||
use crate::execution_step::execution_context::stream_map_key::StreamMapKey;
|
||||
use crate::execution_step::value_types::TracePosOperate;
|
||||
use crate::execution_step::ExecutionResult;
|
||||
use crate::JValue;
|
||||
|
||||
@ -86,8 +86,8 @@ impl fmt::Display for StreamMap {
|
||||
mod test {
|
||||
use super::Generation;
|
||||
use super::StreamMap;
|
||||
use crate::execution_step::boxed_value::stream_map::from_key_value;
|
||||
use crate::execution_step::execution_context::stream_map_key::StreamMapKey;
|
||||
use crate::execution_step::value_types::stream_map::from_key_value;
|
||||
use crate::execution_step::ValueAggregate;
|
||||
use crate::ExecutionError;
|
||||
use crate::JValue;
|
Loading…
Reference in New Issue
Block a user