1
0
mirror of https://github.com/fluencelabs/aquavm synced 2025-07-17 23:22:02 +00:00

Introduce TracePos type for trace positions ()

Many internal structures refer to trace positions; this is an important type of values. In the code, it is sometimes `u32`, sometimes `usize`. While such variables usually have "_pos" suffix, having a dedicated type does improve code with type guarantees.
This commit is contained in:
Ivan Boldyrev
2022-06-10 08:29:56 +03:00
committed by GitHub
parent e0f6fa1b4d
commit 6df2b9d084
47 changed files with 439 additions and 233 deletions

@@ -14,16 +14,14 @@
* limitations under the License.
*/
use super::ExecutedState;
use super::GlobalStreamGens;
use super::RestrictedStreamGens;
use super::DATA_FORMAT_VERSION;
use crate::ExecutionTrace;
use serde::Deserialize;
use serde::Serialize;
use std::ops::Deref;
pub type ExecutionTrace = Vec<ExecutedState>;
/// The AIR interpreter could be considered as a function
/// f(prev_data: InterpreterData, current_data: InterpreterData, ... ) -> (result_data: InterpreterData, ...).
/// This function receives prev and current data and produces a result data. All these data