mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-10-26 07:00:35 +03:00
Merge branch 'testnet3' into update/from-testnet3
This commit is contained in:
commit
d27ba5fa31
521
Cargo.lock
generated
521
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -132,7 +132,7 @@ default-features = false
|
||||
version = "0.6.4"
|
||||
|
||||
[dependencies.reqwest]
|
||||
version = "0.12.2"
|
||||
version = "0.12.4"
|
||||
features = [ "blocking", "json", "multipart" ]
|
||||
|
||||
[dependencies.self_update]
|
||||
@ -147,7 +147,7 @@ features = [ "derive" ]
|
||||
version = "1.0"
|
||||
|
||||
[dependencies.serial_test]
|
||||
version = "3.0.0"
|
||||
version = "3.1.0"
|
||||
|
||||
[dependencies.snarkvm]
|
||||
workspace = true
|
||||
@ -167,7 +167,7 @@ version = "0.3.18"
|
||||
features = [ "fmt" ]
|
||||
|
||||
[dependencies.zip]
|
||||
version = "^0.6"
|
||||
version = "^1.1"
|
||||
|
||||
[dependencies.crossterm]
|
||||
version = "0.27.0"
|
||||
|
@ -14,6 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use leo_ast::CompositeType;
|
||||
use leo_span::Symbol;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
@ -31,6 +32,12 @@ impl Location {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&CompositeType> for Location {
|
||||
fn from(composite: &CompositeType) -> Location {
|
||||
Location::new(composite.program, composite.id.name)
|
||||
}
|
||||
}
|
||||
|
||||
impl Serialize for Location {
|
||||
fn serialize<S>(&self, serializer: S) -> leo_errors::Result<S::Ok, S::Error>
|
||||
where
|
||||
|
@ -1,50 +0,0 @@
|
||||
// Copyright (C) 2019-2023 Aleo Systems Inc.
|
||||
// This file is part of the Leo library.
|
||||
|
||||
// The Leo library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// The Leo library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{CompositeType, Identifier, Node, NodeID, Type};
|
||||
use leo_span::Span;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
||||
/// A function output from an external program with type record.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct External {
|
||||
/// The name the parameter is accessible as in the function's body.
|
||||
pub identifier: Identifier,
|
||||
/// The name of the external program.
|
||||
pub program_name: Identifier,
|
||||
/// The name of the external record type.
|
||||
pub record: Identifier,
|
||||
/// The parameters span from any annotations to its type.
|
||||
pub span: Span,
|
||||
/// The ID of the node.
|
||||
pub id: NodeID,
|
||||
}
|
||||
|
||||
impl External {
|
||||
pub fn type_(&self) -> Type {
|
||||
Type::Composite(CompositeType { id: self.record, program: Some(self.program_name.name) })
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for External {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}: {}.leo/{}.record", self.identifier, self.program_name, self.record)
|
||||
}
|
||||
}
|
||||
|
||||
crate::simple_node_impl!(External);
|
@ -14,91 +14,15 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{External, Identifier, Mode, Node, NodeID, Type};
|
||||
use crate::{Identifier, Mode, Node, NodeID, Type};
|
||||
use leo_span::Span;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum Input {
|
||||
Internal(FunctionInput),
|
||||
External(External),
|
||||
}
|
||||
|
||||
impl fmt::Display for Input {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.fmt(f),
|
||||
External(input) => input.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Input {
|
||||
pub fn type_(&self) -> Type {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.type_.clone(),
|
||||
External(input) => input.type_(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn identifier(&self) -> Identifier {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.identifier,
|
||||
External(input) => input.identifier,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mode(&self) -> Mode {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.mode,
|
||||
External(_) => Mode::None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Node for Input {
|
||||
fn span(&self) -> Span {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.span(),
|
||||
External(input) => input.span(),
|
||||
}
|
||||
}
|
||||
|
||||
fn set_span(&mut self, span: Span) {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.set_span(span),
|
||||
External(input) => input.set_span(span),
|
||||
}
|
||||
}
|
||||
|
||||
fn id(&self) -> usize {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.id(),
|
||||
External(input) => input.id(),
|
||||
}
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: usize) {
|
||||
use Input::*;
|
||||
match self {
|
||||
Internal(input) => input.set_id(id),
|
||||
External(input) => input.set_id(id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A function parameter.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct FunctionInput {
|
||||
pub struct Input {
|
||||
/// The name the parameter is accessible as in the function's body.
|
||||
pub identifier: Identifier,
|
||||
/// The mode of the function parameter.
|
||||
@ -111,16 +35,28 @@ pub struct FunctionInput {
|
||||
pub id: NodeID,
|
||||
}
|
||||
|
||||
impl FunctionInput {
|
||||
impl Input {
|
||||
fn format(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{} {}: {}", self.mode, self.identifier, self.type_)
|
||||
}
|
||||
|
||||
pub fn identifier(&self) -> &Identifier {
|
||||
&self.identifier
|
||||
}
|
||||
|
||||
pub fn mode(&self) -> Mode {
|
||||
self.mode
|
||||
}
|
||||
|
||||
pub fn type_(&self) -> &Type {
|
||||
&self.type_
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for FunctionInput {
|
||||
impl fmt::Display for Input {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.format(f)
|
||||
}
|
||||
}
|
||||
|
||||
crate::simple_node_impl!(FunctionInput);
|
||||
crate::simple_node_impl!(Input);
|
||||
|
@ -23,9 +23,6 @@ pub use core_function::*;
|
||||
pub mod variant;
|
||||
pub use variant::*;
|
||||
|
||||
pub mod external;
|
||||
pub use external::*;
|
||||
|
||||
pub mod input;
|
||||
pub use input::*;
|
||||
|
||||
@ -85,16 +82,10 @@ impl Function {
|
||||
span: Span,
|
||||
id: NodeID,
|
||||
) -> Self {
|
||||
// Determine the output type of the function
|
||||
let get_output_type = |output: &Output| match &output {
|
||||
Output::Internal(output) => output.type_.clone(),
|
||||
Output::External(output) => output.type_(),
|
||||
};
|
||||
|
||||
let output_type = match output.len() {
|
||||
0 => Type::Unit,
|
||||
1 => get_output_type(&output[0]),
|
||||
_ => Type::Tuple(TupleType::new(output.iter().map(get_output_type).collect())),
|
||||
1 => output[0].type_.clone(),
|
||||
_ => Type::Tuple(TupleType::new(output.iter().map(|o| o.type_.clone()).collect())),
|
||||
};
|
||||
|
||||
Function { annotations, variant, identifier, input, output, output_type, block, span, id }
|
||||
|
@ -14,81 +14,15 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{External, Mode, Node, NodeID, Type};
|
||||
use crate::{Mode, Node, NodeID, Type};
|
||||
use leo_span::Span;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum Output {
|
||||
Internal(FunctionOutput),
|
||||
External(External),
|
||||
}
|
||||
|
||||
impl Output {
|
||||
pub fn type_(&self) -> Type {
|
||||
match self {
|
||||
Output::Internal(output) => output.type_.clone(),
|
||||
Output::External(output) => output.type_(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mode(&self) -> Mode {
|
||||
match self {
|
||||
Output::Internal(output) => output.mode,
|
||||
Output::External(_) => Mode::None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Output {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
use Output::*;
|
||||
match self {
|
||||
Internal(output) => output.fmt(f),
|
||||
External(output) => output.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Node for Output {
|
||||
fn span(&self) -> Span {
|
||||
use Output::*;
|
||||
match self {
|
||||
Internal(output) => output.span(),
|
||||
External(output) => output.span(),
|
||||
}
|
||||
}
|
||||
|
||||
fn set_span(&mut self, span: Span) {
|
||||
use Output::*;
|
||||
match self {
|
||||
Internal(output) => output.set_span(span),
|
||||
External(output) => output.set_span(span),
|
||||
}
|
||||
}
|
||||
|
||||
fn id(&self) -> NodeID {
|
||||
use Output::*;
|
||||
match self {
|
||||
Internal(output) => output.id(),
|
||||
External(output) => output.id(),
|
||||
}
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: NodeID) {
|
||||
use Output::*;
|
||||
match self {
|
||||
Internal(output) => output.set_id(id),
|
||||
External(output) => output.set_id(id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A function output.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct FunctionOutput {
|
||||
pub struct Output {
|
||||
/// The mode of the function output.
|
||||
pub mode: Mode,
|
||||
/// The type of the function output.
|
||||
@ -99,10 +33,20 @@ pub struct FunctionOutput {
|
||||
pub id: NodeID,
|
||||
}
|
||||
|
||||
impl fmt::Display for FunctionOutput {
|
||||
impl Output {
|
||||
pub fn type_(&self) -> &Type {
|
||||
&self.type_
|
||||
}
|
||||
|
||||
pub fn mode(&self) -> Mode {
|
||||
self.mode
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Output {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{} {}", self.mode, self.type_)
|
||||
}
|
||||
}
|
||||
|
||||
crate::simple_node_impl!(FunctionOutput);
|
||||
crate::simple_node_impl!(Output);
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use crate::{Identifier, Node, NodeID, Type};
|
||||
|
||||
use leo_span::{Span, Symbol};
|
||||
use leo_span::Span;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use snarkvm::prelude::{Mapping as MappingCore, Network};
|
||||
@ -38,11 +38,11 @@ pub struct Mapping {
|
||||
}
|
||||
|
||||
impl Mapping {
|
||||
pub fn from_snarkvm<N: Network>(mapping: &MappingCore<N>, program: Symbol) -> Self {
|
||||
pub fn from_snarkvm<N: Network>(mapping: &MappingCore<N>) -> Self {
|
||||
Self {
|
||||
identifier: Identifier::from(mapping.name()),
|
||||
key_type: Type::from_snarkvm(mapping.key().plaintext_type(), program),
|
||||
value_type: Type::from_snarkvm(mapping.value().plaintext_type(), program),
|
||||
key_type: Type::from_snarkvm(mapping.key().plaintext_type(), None),
|
||||
value_type: Type::from_snarkvm(mapping.value().plaintext_type(), None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ impl Composite {
|
||||
mode: if input.owner().is_public() { Mode::Public } else { Mode::Private },
|
||||
identifier: Identifier::from(id),
|
||||
type_: match entry {
|
||||
Public(t) => Type::from_snarkvm(t, external_program),
|
||||
Private(t) => Type::from_snarkvm(t, external_program),
|
||||
Constant(t) => Type::from_snarkvm(t, external_program),
|
||||
Public(t) => Type::from_snarkvm(t, None),
|
||||
Private(t) => Type::from_snarkvm(t, None),
|
||||
Constant(t) => Type::from_snarkvm(t, None),
|
||||
},
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
@ -104,7 +104,7 @@ impl Composite {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_snarkvm<N: Network>(input: &StructType<N>, program: Symbol) -> Self {
|
||||
pub fn from_snarkvm<N: Network>(input: &StructType<N>) -> Self {
|
||||
Self {
|
||||
identifier: Identifier::from(input.name()),
|
||||
members: input
|
||||
@ -113,12 +113,12 @@ impl Composite {
|
||||
.map(|(id, type_)| Member {
|
||||
mode: Mode::None,
|
||||
identifier: Identifier::from(id),
|
||||
type_: Type::from_snarkvm(type_, program),
|
||||
type_: Type::from_snarkvm(type_, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
})
|
||||
.collect(),
|
||||
external: Some(program),
|
||||
external: None,
|
||||
is_record: false,
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
|
@ -17,10 +17,7 @@
|
||||
use crate::{
|
||||
Annotation,
|
||||
CompositeType,
|
||||
External,
|
||||
Function,
|
||||
FunctionInput,
|
||||
FunctionOutput,
|
||||
FutureType,
|
||||
Identifier,
|
||||
Input,
|
||||
@ -36,7 +33,6 @@ use crate::{
|
||||
};
|
||||
use leo_span::{sym, Span, Symbol};
|
||||
|
||||
use crate::Type::Composite;
|
||||
use itertools::Itertools;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use snarkvm::{
|
||||
@ -91,16 +87,10 @@ impl FunctionStub {
|
||||
span: Span,
|
||||
id: NodeID,
|
||||
) -> Self {
|
||||
// Determine the output type of the function
|
||||
let get_output_type = |output: &Output| match &output {
|
||||
Output::Internal(output) => output.type_.clone(),
|
||||
Output::External(output) => output.type_(),
|
||||
};
|
||||
|
||||
let output_type = match output.len() {
|
||||
0 => Type::Unit,
|
||||
1 => get_output_type(&output[0]),
|
||||
_ => Type::Tuple(TupleType::new(output.iter().map(get_output_type).collect())),
|
||||
1 => output[0].type_.clone(),
|
||||
_ => Type::Tuple(TupleType::new(output.iter().map(|o| o.type_.clone()).collect())),
|
||||
};
|
||||
|
||||
FunctionStub { annotations, variant, identifier, input, output, output_type, span, id }
|
||||
@ -147,58 +137,55 @@ impl FunctionStub {
|
||||
.outputs()
|
||||
.iter()
|
||||
.map(|output| match output.value_type() {
|
||||
ValueType::Constant(val) => Output::Internal(FunctionOutput {
|
||||
ValueType::Constant(val) => vec![Output {
|
||||
mode: Mode::Constant,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Public(val) => Output::Internal(FunctionOutput {
|
||||
}],
|
||||
ValueType::Public(val) => vec![Output {
|
||||
mode: Mode::Public,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Private(val) => Output::Internal(FunctionOutput {
|
||||
}],
|
||||
ValueType::Private(val) => vec![Output {
|
||||
mode: Mode::Private,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Record(id) => Output::Internal(FunctionOutput {
|
||||
}],
|
||||
ValueType::Record(id) => vec![Output {
|
||||
mode: Mode::None,
|
||||
type_: Composite(CompositeType { id: Identifier::from(id), program: Some(program) }),
|
||||
type_: Type::Composite(CompositeType { id: Identifier::from(id), program: Some(program) }),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::ExternalRecord(loc) => Output::External(External {
|
||||
identifier: Identifier::new(Symbol::intern("dummy"), Default::default()),
|
||||
program_name: ProgramId::from(loc.program_id()).name,
|
||||
record: Identifier::from(loc.resource()),
|
||||
}],
|
||||
ValueType::ExternalRecord(loc) => {
|
||||
vec![Output {
|
||||
mode: Mode::None,
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
type_: Type::Composite(CompositeType {
|
||||
id: Identifier::from(loc.resource()),
|
||||
program: Some(ProgramId::from(loc.program_id()).name.name),
|
||||
}),
|
||||
}]
|
||||
}
|
||||
ValueType::Future(_) => vec![Output {
|
||||
mode: Mode::None,
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Future(_) => Output::Internal(FunctionOutput {
|
||||
mode: Mode::Public,
|
||||
type_: Type::Future(FutureType::new(
|
||||
Vec::new(),
|
||||
Some(Location::new(Some(program), Identifier::from(function.name()).name)),
|
||||
false,
|
||||
)),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
}],
|
||||
})
|
||||
.collect_vec();
|
||||
let output_vec = outputs
|
||||
.iter()
|
||||
.map(|output| match output {
|
||||
Output::Internal(output) => output.type_.clone(),
|
||||
Output::External(output) => {
|
||||
Type::Composite(CompositeType { id: output.record, program: Some(output.program_name.name) })
|
||||
}
|
||||
})
|
||||
.collect_vec();
|
||||
.collect_vec()
|
||||
.concat();
|
||||
let output_vec = outputs.iter().map(|output| output.type_.clone()).collect_vec();
|
||||
let output_type = match output_vec.len() {
|
||||
0 => Type::Unit,
|
||||
1 => output_vec[0].clone(),
|
||||
@ -219,41 +206,44 @@ impl FunctionStub {
|
||||
.map(|(index, input)| {
|
||||
let arg_name = Identifier::new(Symbol::intern(&format!("arg{}", index + 1)), Default::default());
|
||||
match input.value_type() {
|
||||
ValueType::Constant(val) => Input::Internal(FunctionInput {
|
||||
ValueType::Constant(val) => Input {
|
||||
identifier: arg_name,
|
||||
mode: Mode::Constant,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Public(val) => Input::Internal(FunctionInput {
|
||||
},
|
||||
ValueType::Public(val) => Input {
|
||||
identifier: arg_name,
|
||||
mode: Mode::Public,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Private(val) => Input::Internal(FunctionInput {
|
||||
},
|
||||
ValueType::Private(val) => Input {
|
||||
identifier: arg_name,
|
||||
mode: Mode::Private,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::Record(id) => Input::Internal(FunctionInput {
|
||||
},
|
||||
ValueType::Record(id) => Input {
|
||||
identifier: arg_name,
|
||||
mode: Mode::None,
|
||||
type_: Composite(CompositeType { id: Identifier::from(id), program: Some(program) }),
|
||||
type_: Type::Composite(CompositeType { id: Identifier::from(id), program: Some(program) }),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
ValueType::ExternalRecord(loc) => Input::External(External {
|
||||
identifier: Identifier::new(Symbol::intern("dummy"), Default::default()),
|
||||
program_name: ProgramId::from(loc.program_id()).name,
|
||||
record: Identifier::from(loc.resource()),
|
||||
},
|
||||
ValueType::ExternalRecord(loc) => Input {
|
||||
identifier: arg_name,
|
||||
mode: Mode::None,
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
type_: Type::Composite(CompositeType {
|
||||
id: Identifier::from(loc.name()),
|
||||
program: Some(ProgramId::from(loc.program_id()).name.name),
|
||||
}),
|
||||
},
|
||||
ValueType::Future(_) => panic!("Functions do not contain futures as inputs"),
|
||||
}
|
||||
})
|
||||
@ -280,24 +270,22 @@ impl FunctionStub {
|
||||
.inputs()
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(index, input)| {
|
||||
Input::Internal(FunctionInput {
|
||||
identifier: Identifier::new(Symbol::intern(&format!("arg{}", index + 1)), Default::default()),
|
||||
mode: Mode::None,
|
||||
type_: match input.finalize_type() {
|
||||
PlaintextFinalizeType(val) => Type::from_snarkvm(val, key_name),
|
||||
FutureFinalizeType(val) => Type::Future(FutureType::new(
|
||||
Vec::new(),
|
||||
Some(Location::new(
|
||||
Some(Identifier::from(val.program_id().name()).name),
|
||||
Symbol::intern(&format!("finalize/{}", val.resource())),
|
||||
)),
|
||||
false,
|
||||
.map(|(index, input)| Input {
|
||||
identifier: Identifier::new(Symbol::intern(&format!("arg{}", index + 1)), Default::default()),
|
||||
mode: Mode::None,
|
||||
type_: match input.finalize_type() {
|
||||
PlaintextFinalizeType(val) => Type::from_snarkvm(val, Some(key_name)),
|
||||
FutureFinalizeType(val) => Type::Future(FutureType::new(
|
||||
Vec::new(),
|
||||
Some(Location::new(
|
||||
Some(Identifier::from(val.program_id().name()).name),
|
||||
Symbol::intern(&format!("finalize/{}", val.resource())),
|
||||
)),
|
||||
},
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
})
|
||||
false,
|
||||
)),
|
||||
},
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
})
|
||||
.collect_vec(),
|
||||
output: Vec::new(),
|
||||
@ -315,24 +303,18 @@ impl FunctionStub {
|
||||
.outputs()
|
||||
.iter()
|
||||
.map(|output| match output.register_type() {
|
||||
Plaintext(val) => Output::Internal(FunctionOutput {
|
||||
Plaintext(val) => Output {
|
||||
mode: Mode::None,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, Some(program)),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
},
|
||||
Record(_) => panic!("Closures do not return records"),
|
||||
ExternalRecord(_) => panic!("Closures do not return external records"),
|
||||
Future(_) => panic!("Closures do not return futures"),
|
||||
})
|
||||
.collect_vec();
|
||||
let output_vec = outputs
|
||||
.iter()
|
||||
.map(|output| match output {
|
||||
Output::Internal(output) => output.type_.clone(),
|
||||
Output::External(_) => panic!("Closures do not return external records"),
|
||||
})
|
||||
.collect_vec();
|
||||
let output_vec = outputs.iter().map(|output| output.type_.clone()).collect_vec();
|
||||
let output_type = match output_vec.len() {
|
||||
0 => Type::Unit,
|
||||
1 => output_vec[0].clone(),
|
||||
@ -349,13 +331,13 @@ impl FunctionStub {
|
||||
.map(|(index, input)| {
|
||||
let arg_name = Identifier::new(Symbol::intern(&format!("arg{}", index + 1)), Default::default());
|
||||
match input.register_type() {
|
||||
Plaintext(val) => Input::Internal(FunctionInput {
|
||||
Plaintext(val) => Input {
|
||||
identifier: arg_name,
|
||||
mode: Mode::None,
|
||||
type_: Type::from_snarkvm(val, program),
|
||||
type_: Type::from_snarkvm(val, None),
|
||||
span: Default::default(),
|
||||
id: Default::default(),
|
||||
}),
|
||||
},
|
||||
Record(_) => panic!("Closures do not contain records as inputs"),
|
||||
ExternalRecord(_) => panic!("Closures do not contain external records as inputs"),
|
||||
Future(_) => panic!("Closures do not contain futures as inputs"),
|
||||
|
@ -53,7 +53,7 @@ impl ArrayType {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_snarkvm<N: Network>(array_type: &ConsoleArrayType<N>, program: Symbol) -> Self {
|
||||
pub fn from_snarkvm<N: Network>(array_type: &ConsoleArrayType<N>, program: Option<Symbol>) -> Self {
|
||||
Self {
|
||||
element_type: Box::new(Type::from_snarkvm(array_type.next_element_type(), program)),
|
||||
length: NonNegativeNumber::from(array_type.length().to_string().replace("u32", "")),
|
||||
|
@ -110,7 +110,40 @@ impl Type {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_snarkvm<N: Network>(t: &PlaintextType<N>, program: Symbol) -> Self {
|
||||
///
|
||||
/// Returns `true` if the self `Type` is equal to the other `Type` in all aspects besides composite program of origin.
|
||||
///
|
||||
/// Flattens array syntax: `[[u8; 1]; 2] == [u8; (2, 1)] == true`
|
||||
///
|
||||
pub fn eq_flat_relax_composite(&self, other: &Self) -> bool {
|
||||
match (self, other) {
|
||||
(Type::Address, Type::Address)
|
||||
| (Type::Boolean, Type::Boolean)
|
||||
| (Type::Field, Type::Field)
|
||||
| (Type::Group, Type::Group)
|
||||
| (Type::Scalar, Type::Scalar)
|
||||
| (Type::Signature, Type::Signature)
|
||||
| (Type::String, Type::String)
|
||||
| (Type::Unit, Type::Unit) => true,
|
||||
(Type::Array(left), Type::Array(right)) => {
|
||||
left.element_type().eq_flat_relax_composite(right.element_type()) && left.length() == right.length()
|
||||
}
|
||||
(Type::Identifier(left), Type::Identifier(right)) => left.matches(right),
|
||||
(Type::Integer(left), Type::Integer(right)) => left.eq(right),
|
||||
(Type::Mapping(left), Type::Mapping(right)) => {
|
||||
left.key.eq_flat_relax_composite(&right.key) && left.value.eq_flat(&right.value)
|
||||
}
|
||||
(Type::Tuple(left), Type::Tuple(right)) if left.length() == right.length() => left
|
||||
.elements()
|
||||
.iter()
|
||||
.zip_eq(right.elements().iter())
|
||||
.all(|(left_type, right_type)| left_type.eq_flat_relax_composite(right_type)),
|
||||
(Type::Composite(left), Type::Composite(right)) => left.id.name == right.id.name,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_snarkvm<N: Network>(t: &PlaintextType<N>, program: Option<Symbol>) -> Self {
|
||||
match t {
|
||||
Literal(lit) => match lit {
|
||||
snarkvm::prelude::LiteralType::Address => Type::Address,
|
||||
@ -131,7 +164,7 @@ impl Type {
|
||||
snarkvm::prelude::LiteralType::Signature => Type::Signature,
|
||||
snarkvm::prelude::LiteralType::String => Type::String,
|
||||
},
|
||||
Struct(s) => Type::Composite(CompositeType { id: common::Identifier::from(s), program: Some(program) }),
|
||||
Struct(s) => Type::Composite(CompositeType { id: common::Identifier::from(s), program }),
|
||||
Array(array) => Type::Array(ArrayType::from_snarkvm(array, program)),
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ workspace = true
|
||||
version = "1.10.4"
|
||||
|
||||
[dev-dependencies.serde]
|
||||
version = "1.0.197"
|
||||
version = "1.0.198"
|
||||
features = [ "derive" ]
|
||||
|
||||
[dev-dependencies.serde_yaml]
|
||||
|
@ -275,34 +275,14 @@ impl<'a> ProgramVisitor<'a> for CheckUniqueNodeIds<'a> {
|
||||
self.visit_identifier(identifier, &Default::default());
|
||||
// Check the inputs.
|
||||
for in_ in input {
|
||||
match in_ {
|
||||
Input::Internal(FunctionInput { identifier, type_, id, .. }) => {
|
||||
self.visit_identifier(identifier, &Default::default());
|
||||
self.check_ty(type_);
|
||||
self.check(*id);
|
||||
}
|
||||
Input::External(External { identifier, program_name, record, id, .. }) => {
|
||||
self.visit_identifier(identifier, &Default::default());
|
||||
self.visit_identifier(program_name, &Default::default());
|
||||
self.visit_identifier(record, &Default::default());
|
||||
self.check(*id);
|
||||
}
|
||||
}
|
||||
self.visit_identifier(in_.identifier(), &Default::default());
|
||||
self.check_ty(&in_.type_);
|
||||
self.check(in_.id);
|
||||
}
|
||||
// Check the outputs.
|
||||
for out in output {
|
||||
match out {
|
||||
Output::Internal(FunctionOutput { type_, id, .. }) => {
|
||||
self.check_ty(type_);
|
||||
self.check(*id);
|
||||
}
|
||||
Output::External(External { identifier, program_name, record, id, .. }) => {
|
||||
self.visit_identifier(identifier, &Default::default());
|
||||
self.visit_identifier(program_name, &Default::default());
|
||||
self.visit_identifier(record, &Default::default());
|
||||
self.check(*id);
|
||||
}
|
||||
}
|
||||
self.check_ty(&out.type_);
|
||||
self.check(out.id);
|
||||
}
|
||||
// Check the function body.
|
||||
self.visit_block(block);
|
||||
|
@ -236,10 +236,13 @@ impl ParserContext<'_> {
|
||||
self.expect(&Token::LeftCurly)?;
|
||||
let (members, end) = self.parse_struct_members()?;
|
||||
|
||||
// Only provide a program name for records.
|
||||
let external = if is_record { self.program_name } else { None };
|
||||
|
||||
Ok((struct_name.name, Composite {
|
||||
identifier: struct_name,
|
||||
members,
|
||||
external: self.program_name,
|
||||
external,
|
||||
is_record,
|
||||
span: start + end,
|
||||
id: self.node_builder.next_id(),
|
||||
@ -295,84 +298,16 @@ impl ParserContext<'_> {
|
||||
let name = self.expect_identifier()?;
|
||||
self.expect(&Token::Colon)?;
|
||||
|
||||
if self.peek_is_external() {
|
||||
let external = self.expect_identifier()?;
|
||||
let mut span = name.span + external.span;
|
||||
let type_ = self.parse_type()?.0;
|
||||
|
||||
// Parse `.leo/` or `.aleo/`.
|
||||
self.eat(&Token::Dot);
|
||||
self.eat_any(&[Token::Leo, Token::Aleo]);
|
||||
self.eat(&Token::Div);
|
||||
|
||||
// Parse record name.
|
||||
let record = self.expect_identifier()?;
|
||||
|
||||
// Parse `.record`.
|
||||
self.eat(&Token::Dot);
|
||||
self.eat(&Token::Record);
|
||||
span = span + self.prev_token.span;
|
||||
|
||||
Ok(functions::Input::External(External {
|
||||
identifier: name,
|
||||
program_name: external,
|
||||
record,
|
||||
span,
|
||||
id: self.node_builder.next_id(),
|
||||
}))
|
||||
} else {
|
||||
let type_ = self.parse_type()?.0;
|
||||
|
||||
Ok(functions::Input::Internal(FunctionInput {
|
||||
identifier: name,
|
||||
mode,
|
||||
type_,
|
||||
span: name.span,
|
||||
id: self.node_builder.next_id(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a [`FunctionOutput`] AST node if the next tokens represent a function output.
|
||||
fn parse_function_output(&mut self) -> Result<FunctionOutput> {
|
||||
// TODO: Could this span be made more accurate?
|
||||
let mode = self.parse_mode()?;
|
||||
let (type_, span) = self.parse_type()?;
|
||||
Ok(FunctionOutput { mode, type_, span, id: self.node_builder.next_id() })
|
||||
Ok(functions::Input { identifier: name, mode, type_, span: name.span, id: self.node_builder.next_id() })
|
||||
}
|
||||
|
||||
/// Returns a [`Output`] AST node if the next tokens represent a function output.
|
||||
fn parse_output(&mut self) -> Result<Output> {
|
||||
if self.peek_is_external() {
|
||||
let external = self.expect_identifier()?;
|
||||
let mut span = external.span;
|
||||
|
||||
// Parse `.leo/` or `.aleo/`.
|
||||
self.eat(&Token::Dot);
|
||||
self.eat_any(&[Token::Leo, Token::Aleo]);
|
||||
self.eat(&Token::Div);
|
||||
|
||||
// Parse record name.
|
||||
let record = self.expect_identifier()?;
|
||||
|
||||
// Parse `.record`.
|
||||
self.eat(&Token::Dot);
|
||||
self.eat(&Token::Record);
|
||||
span = span + self.prev_token.span;
|
||||
|
||||
Ok(Output::External(External {
|
||||
identifier: Identifier::new(Symbol::intern("dummy"), self.node_builder.next_id()),
|
||||
program_name: external,
|
||||
record,
|
||||
span,
|
||||
id: self.node_builder.next_id(),
|
||||
}))
|
||||
} else {
|
||||
Ok(Output::Internal(self.parse_function_output()?))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn peek_is_external(&self) -> bool {
|
||||
matches!((&self.token.token, self.look_ahead(1, |t| &t.token)), (Token::Identifier(_), Token::Dot))
|
||||
let mode = self.parse_mode()?;
|
||||
let (type_, span) = self.parse_type()?;
|
||||
Ok(Output { mode, type_, span, id: self.node_builder.next_id() })
|
||||
}
|
||||
|
||||
/// Returns an [`Annotation`] AST node if the next tokens represent an annotation.
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use crate::{CallGraph, StructGraph, SymbolTable, TypeTable};
|
||||
|
||||
use leo_ast::{Function, Program, ProgramId};
|
||||
use leo_ast::{Function, Program, ProgramId, Variant};
|
||||
use leo_span::Symbol;
|
||||
|
||||
use indexmap::IndexMap;
|
||||
@ -42,16 +42,18 @@ pub struct CodeGenerator<'a> {
|
||||
pub(crate) composite_mapping: IndexMap<&'a Symbol, (bool, String)>,
|
||||
/// Mapping of global identifiers to their associated names.
|
||||
pub(crate) global_mapping: IndexMap<&'a Symbol, String>,
|
||||
/// Are we traversing a transition function?
|
||||
pub(crate) is_transition_function: bool,
|
||||
/// Are we traversing a finalize block?
|
||||
pub(crate) in_finalize: bool,
|
||||
/// The variant of the function we are currently traversing.
|
||||
pub(crate) variant: Option<Variant>,
|
||||
/// A reference to program. This is needed to look up external programs.
|
||||
pub(crate) program: &'a Program,
|
||||
/// The program ID of the current program.
|
||||
pub(crate) program_id: Option<ProgramId>,
|
||||
/// A reference to the finalize caller.
|
||||
pub(crate) finalize_caller: Option<Symbol>,
|
||||
/// A counter to track the next available label.
|
||||
pub(crate) next_label: u64,
|
||||
/// The depth of the current conditional block.
|
||||
pub(crate) conditional_depth: u64,
|
||||
}
|
||||
|
||||
impl<'a> CodeGenerator<'a> {
|
||||
@ -74,11 +76,12 @@ impl<'a> CodeGenerator<'a> {
|
||||
variable_mapping: IndexMap::new(),
|
||||
composite_mapping: IndexMap::new(),
|
||||
global_mapping: IndexMap::new(),
|
||||
is_transition_function: false,
|
||||
in_finalize: false,
|
||||
variant: None,
|
||||
program,
|
||||
program_id: None,
|
||||
finalize_caller: None,
|
||||
next_label: 0u64,
|
||||
conditional_depth: 0u64,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
use crate::CodeGenerator;
|
||||
|
||||
use leo_ast::{functions, Composite, Function, Location, Mapping, Mode, Program, ProgramScope, Type, Variant};
|
||||
use leo_ast::{Composite, Function, Location, Mapping, Member, Mode, Program, ProgramScope, Type, Variant};
|
||||
use leo_span::{sym, Symbol};
|
||||
|
||||
use indexmap::IndexMap;
|
||||
use itertools::Itertools;
|
||||
use leo_span::{sym, Symbol};
|
||||
use std::fmt::Write as _;
|
||||
|
||||
impl<'a> CodeGenerator<'a> {
|
||||
@ -51,8 +51,21 @@ impl<'a> CodeGenerator<'a> {
|
||||
let order = self.struct_graph.post_order().unwrap();
|
||||
|
||||
// Create a mapping of symbols to references of structs so can perform constant-time lookups.
|
||||
let structs_map: IndexMap<Symbol, &Composite> =
|
||||
program_scope.structs.iter().map(|(name, struct_)| (*name, struct_)).collect();
|
||||
let structs_map: IndexMap<Symbol, &Composite> = self
|
||||
.symbol_table
|
||||
.structs
|
||||
.iter()
|
||||
.filter_map(|(name, struct_)| {
|
||||
// Only include structs and local records.
|
||||
if !(struct_.is_record
|
||||
&& struct_.external.map(|program| program != self.program_id.unwrap().name.name).unwrap_or(false))
|
||||
{
|
||||
Some((name.name, struct_))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Visit each `Struct` or `Record` in the post-ordering and produce an Aleo struct or record.
|
||||
program_string.push_str(
|
||||
@ -60,9 +73,9 @@ impl<'a> CodeGenerator<'a> {
|
||||
.into_iter()
|
||||
.map(|name| {
|
||||
match structs_map.get(&name) {
|
||||
// If the struct is found, it is a local struct.
|
||||
// If the struct is found, it is a struct or external record.
|
||||
Some(struct_) => self.visit_struct_or_record(struct_),
|
||||
// If the struct is not found, it is an imported struct.
|
||||
// If the struct is not found, it is an imported record.
|
||||
None => String::new(),
|
||||
}
|
||||
})
|
||||
@ -85,18 +98,11 @@ impl<'a> CodeGenerator<'a> {
|
||||
.iter()
|
||||
.map(|(_, function)| {
|
||||
if function.variant != Variant::AsyncFunction {
|
||||
// Set the `is_transition_function` flag.
|
||||
self.is_transition_function = function.variant.is_transition();
|
||||
|
||||
let mut function_string = self.visit_function(function);
|
||||
|
||||
// Unset the `is_transition_function` flag.
|
||||
self.is_transition_function = false;
|
||||
|
||||
// Attach the associated finalize to async transitions.
|
||||
if function.variant == Variant::AsyncTransition {
|
||||
// Set state variables.
|
||||
self.is_transition_function = false;
|
||||
self.finalize_caller = Some(function.identifier.name);
|
||||
// Generate code for the associated finalize function.
|
||||
let finalize = &self
|
||||
@ -155,8 +161,19 @@ impl<'a> CodeGenerator<'a> {
|
||||
self.composite_mapping.insert(&record.identifier.name, (true, output_string.clone()));
|
||||
writeln!(output_string, " {}:", record.identifier).expect("failed to write to string"); // todo: check if this is safe from name conflicts.
|
||||
|
||||
let mut members = Vec::with_capacity(record.members.len());
|
||||
let mut member_map: IndexMap<Symbol, Member> =
|
||||
record.members.clone().into_iter().map(|member| (member.identifier.name, member)).collect();
|
||||
|
||||
// Add the owner field to the beginning of the members list.
|
||||
// Note that type checking ensures that the owner field exists.
|
||||
members.push(member_map.shift_remove(&sym::owner).unwrap());
|
||||
|
||||
// Add the remaining fields to the members list.
|
||||
members.extend(member_map.into_iter().map(|(_, member)| member));
|
||||
|
||||
// Construct and append the record variables.
|
||||
for var in record.members.iter() {
|
||||
for var in members.iter() {
|
||||
let mode = match var.mode {
|
||||
Mode::Constant => "constant",
|
||||
Mode::Public => "public",
|
||||
@ -178,7 +195,7 @@ impl<'a> CodeGenerator<'a> {
|
||||
// Initialize the state of `self` with the appropriate values before visiting `function`.
|
||||
self.next_register = 0;
|
||||
self.variable_mapping = IndexMap::new();
|
||||
self.in_finalize = function.variant == Variant::AsyncFunction;
|
||||
self.variant = Some(function.variant);
|
||||
// TODO: Figure out a better way to initialize.
|
||||
self.variable_mapping.insert(&sym::SelfLower, "self".to_string());
|
||||
self.variable_mapping.insert(&sym::block, "block".to_string());
|
||||
@ -206,25 +223,21 @@ impl<'a> CodeGenerator<'a> {
|
||||
let register_string = format!("r{}", self.next_register);
|
||||
self.next_register += 1;
|
||||
|
||||
let type_string = match input {
|
||||
functions::Input::Internal(input) => {
|
||||
self.variable_mapping.insert(&input.identifier.name, register_string.clone());
|
||||
let visibility = match (self.is_transition_function, self.in_finalize, input.mode) {
|
||||
(true, _, Mode::None) => Mode::Private,
|
||||
(_, true, Mode::None) => Mode::Public,
|
||||
_ => input.mode,
|
||||
};
|
||||
// Futures are displayed differently in the input section. `input r0 as foo.aleo/bar.future;`
|
||||
if matches!(input.type_, Type::Future(_)) {
|
||||
let location = futures.remove(0);
|
||||
format!("{}.aleo/{}.future", location.program.unwrap(), location.name)
|
||||
} else {
|
||||
self.visit_type_with_visibility(&input.type_, visibility)
|
||||
}
|
||||
}
|
||||
functions::Input::External(input) => {
|
||||
self.variable_mapping.insert(&input.identifier.name, register_string.clone());
|
||||
format!("{}.aleo/{}.record", input.program_name, input.record)
|
||||
let type_string = {
|
||||
self.variable_mapping.insert(&input.identifier.name, register_string.clone());
|
||||
// Note that this unwrap is safe because we set the variant at the beginning of the function.
|
||||
let visibility = match (self.variant.unwrap(), input.mode) {
|
||||
(Variant::AsyncTransition, Mode::None) |
|
||||
(Variant::Transition, Mode::None) => Mode::Private,
|
||||
(Variant::AsyncFunction, Mode::None) => Mode::Public,
|
||||
_ => input.mode,
|
||||
};
|
||||
// Futures are displayed differently in the input section. `input r0 as foo.aleo/bar.future;`
|
||||
if matches!(input.type_, Type::Future(_)) {
|
||||
let location = futures.remove(0);
|
||||
format!("{}.aleo/{}.future", location.program.unwrap(), location.name)
|
||||
} else {
|
||||
self.visit_type_with_visibility(&input.type_, visibility)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,6 @@ use leo_ast::{
|
||||
ExpressionStatement,
|
||||
IterationStatement,
|
||||
Mode,
|
||||
Output,
|
||||
ReturnStatement,
|
||||
Statement,
|
||||
Type,
|
||||
@ -99,47 +98,27 @@ impl<'a> CodeGenerator<'a> {
|
||||
.iter()
|
||||
.zip_eq(output)
|
||||
.map(|(operand, output)| {
|
||||
match output {
|
||||
Output::Internal(output) => {
|
||||
let visibility = if self.is_transition_function {
|
||||
match self.in_finalize {
|
||||
// If in finalize block, the default visibility is public.
|
||||
true => match output.mode {
|
||||
Mode::None => Mode::Public,
|
||||
mode => mode,
|
||||
},
|
||||
// If not in finalize block, the default visibility is private.
|
||||
false => match output.mode {
|
||||
Mode::None => Mode::Private,
|
||||
mode => mode,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
// Only program functions have visibilities associated with their outputs.
|
||||
Mode::None
|
||||
};
|
||||
if let Type::Future(_) = output.type_ {
|
||||
future_output = format!(
|
||||
" output {} as {}.aleo/{}.future;\n",
|
||||
operand,
|
||||
self.program_id.unwrap().name,
|
||||
self.current_function.unwrap().identifier,
|
||||
);
|
||||
String::new()
|
||||
} else {
|
||||
format!(
|
||||
" output {} as {};\n",
|
||||
operand,
|
||||
self.visit_type_with_visibility(&output.type_, visibility)
|
||||
)
|
||||
}
|
||||
}
|
||||
Output::External(output) => {
|
||||
format!(
|
||||
" output {} as {}.aleo/{}.record;\n",
|
||||
operand, output.program_name, output.record,
|
||||
)
|
||||
}
|
||||
// Transitions outputs with no mode are private.
|
||||
// Note that this unwrap is safe because we set the variant before traversing the function.
|
||||
let visibility = match (self.variant.unwrap().is_transition(), output.mode) {
|
||||
(true, Mode::None) => Mode::Private,
|
||||
(_, mode) => mode,
|
||||
};
|
||||
|
||||
if let Type::Future(_) = output.type_ {
|
||||
future_output = format!(
|
||||
" output {} as {}.aleo/{}.future;\n",
|
||||
operand,
|
||||
self.program_id.unwrap().name,
|
||||
self.current_function.unwrap().identifier,
|
||||
);
|
||||
String::new()
|
||||
} else {
|
||||
format!(
|
||||
" output {} as {};\n",
|
||||
operand,
|
||||
self.visit_type_with_visibility(&output.type_, visibility)
|
||||
)
|
||||
}
|
||||
})
|
||||
.join("");
|
||||
@ -199,12 +178,60 @@ impl<'a> CodeGenerator<'a> {
|
||||
}
|
||||
|
||||
fn visit_conditional(&mut self, _input: &'a ConditionalStatement) -> String {
|
||||
// TODO: Once SSA is made optional, create a Leo error informing the user to enable the SSA pass.
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
// Note that this unwrap is safe because we set the variant before traversing the function.
|
||||
if !self.variant.unwrap().is_async_function() {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
} else {
|
||||
// Construct a label for the end of the `then` block.
|
||||
let end_then_label = format!("end_then_{}_{}", self.conditional_depth, self.next_label);
|
||||
self.next_label += 1;
|
||||
// Construct a label for the end of the `otherwise` block if it exists.
|
||||
let (has_otherwise, end_otherwise_label) = {
|
||||
match _input.otherwise.is_some() {
|
||||
true => {
|
||||
// Construct a label for the end of the `otherwise` block.
|
||||
let end_otherwise_label =
|
||||
{ format!("end_otherwise_{}_{}", self.conditional_depth, self.next_label) };
|
||||
self.next_label += 1;
|
||||
(true, end_otherwise_label)
|
||||
}
|
||||
false => (false, String::new()),
|
||||
}
|
||||
};
|
||||
|
||||
// Increment the conditional depth.
|
||||
self.conditional_depth += 1;
|
||||
|
||||
// Create a `branch` instruction.
|
||||
let (condition, mut instructions) = self.visit_expression(&_input.condition);
|
||||
instructions.push_str(&format!(" branch.eq {condition} false to {end_then_label};\n"));
|
||||
|
||||
// Visit the `then` block.
|
||||
instructions.push_str(&self.visit_block(&_input.then));
|
||||
// If the `otherwise` block is present, add a branch instruction to jump to the end of the `otherwise` block.
|
||||
if has_otherwise {
|
||||
instructions.push_str(&format!(" branch.eq true true to {end_otherwise_label};\n"));
|
||||
}
|
||||
|
||||
// Add a label for the end of the `then` block.
|
||||
instructions.push_str(&format!(" position {};\n", end_then_label));
|
||||
|
||||
// Visit the `otherwise` block.
|
||||
if let Some(else_block) = &_input.otherwise {
|
||||
// Visit the `otherwise` block.
|
||||
instructions.push_str(&self.visit_statement(else_block));
|
||||
// Add a label for the end of the `otherwise` block.
|
||||
instructions.push_str(&format!(" position {end_otherwise_label};\n"));
|
||||
}
|
||||
|
||||
// Decrement the conditional depth.
|
||||
self.conditional_depth -= 1;
|
||||
|
||||
instructions
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_iteration(&mut self, _input: &'a IterationStatement) -> String {
|
||||
// TODO: Once loop unrolling is made optional, create a Leo error informing the user to enable the loop unrolling pass..
|
||||
unreachable!("`IterationStatement`s should not be in the AST at this phase of compilation.");
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::CodeGenerator;
|
||||
use crate::{CodeGenerator, Location};
|
||||
|
||||
use leo_ast::{Mode, Type};
|
||||
|
||||
@ -49,10 +49,19 @@ impl<'a> CodeGenerator<'a> {
|
||||
|
||||
pub(crate) fn visit_type_with_visibility(&self, type_: &'a Type, visibility: Mode) -> String {
|
||||
match type_ {
|
||||
// When the type is a record.
|
||||
// Note that this unwrap is safe because all composite types have been added to the mapping.
|
||||
Type::Composite(struct_) if self.composite_mapping.get(&struct_.id.name).unwrap().0 => {
|
||||
format!("{}.record", struct_.id.name)
|
||||
// When the type is a record
|
||||
Type::Composite(struct_)
|
||||
if self
|
||||
.symbol_table
|
||||
.lookup_struct(Location::from(struct_), self.program_id.map(|p| p.name.name))
|
||||
.unwrap()
|
||||
.is_record =>
|
||||
{
|
||||
if struct_.program == self.program_id.map(|p| p.name.name) || struct_.program.is_none() {
|
||||
format!("{}.record", struct_.id.name)
|
||||
} else {
|
||||
format!("{}.aleo/{}.record", struct_.program.unwrap(), struct_.id.name)
|
||||
}
|
||||
}
|
||||
_ => match visibility {
|
||||
Mode::None => Self::visit_type(type_),
|
||||
|
@ -41,7 +41,7 @@ pub enum DiGraphError<N: Node> {
|
||||
}
|
||||
|
||||
/// A directed graph.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct DiGraph<N: Node> {
|
||||
/// The set of nodes in the graph.
|
||||
nodes: IndexSet<N>,
|
||||
@ -107,6 +107,17 @@ impl<N: Node> DiGraph<N> {
|
||||
Ok(finished)
|
||||
}
|
||||
|
||||
/// Retains a subset of the nodes, and removes all edges in which the source or destination is not in the subset.
|
||||
pub fn retain_nodes(&mut self, nodes: &IndexSet<N>) {
|
||||
// Remove the nodes from the set of nodes.
|
||||
self.nodes.retain(|node| nodes.contains(node));
|
||||
self.edges.retain(|node, _| nodes.contains(node));
|
||||
// Remove the edges that reference the nodes.
|
||||
for (_, children) in self.edges.iter_mut() {
|
||||
children.retain(|child| nodes.contains(child));
|
||||
}
|
||||
}
|
||||
|
||||
// Detects if there is a cycle in the graph starting from the given node, via a recursive depth-first search.
|
||||
// If there is no cycle, returns `None`.
|
||||
// If there is a cycle, returns the node that was most recently discovered.
|
||||
@ -214,4 +225,33 @@ mod test {
|
||||
|
||||
check_post_order(&graph, &[1, 2, 3, 4, 5]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_retain_nodes() {
|
||||
let mut graph = DiGraph::<u32>::new(IndexSet::new());
|
||||
|
||||
graph.add_edge(1, 2);
|
||||
graph.add_edge(1, 3);
|
||||
graph.add_edge(1, 5);
|
||||
graph.add_edge(2, 3);
|
||||
graph.add_edge(2, 4);
|
||||
graph.add_edge(2, 5);
|
||||
graph.add_edge(3, 4);
|
||||
graph.add_edge(4, 5);
|
||||
|
||||
let mut nodes = IndexSet::new();
|
||||
nodes.insert(1);
|
||||
nodes.insert(2);
|
||||
nodes.insert(3);
|
||||
|
||||
graph.retain_nodes(&nodes);
|
||||
|
||||
let mut expected = DiGraph::<u32>::new(IndexSet::new());
|
||||
expected.add_edge(1, 2);
|
||||
expected.add_edge(1, 3);
|
||||
expected.add_edge(2, 3);
|
||||
expected.edges.insert(3, IndexSet::new());
|
||||
|
||||
assert_eq!(graph, expected);
|
||||
}
|
||||
}
|
||||
|
@ -56,18 +56,19 @@ pub struct SymbolTable {
|
||||
impl SymbolTable {
|
||||
/// Recursively checks if the symbol table contains an entry for the given symbol.
|
||||
/// Leo does not allow any variable shadowing or overlap between different symbols.
|
||||
pub fn check_shadowing(&self, location: &Location, span: Span) -> Result<()> {
|
||||
pub fn check_shadowing(&self, location: &Location, is_struct: bool, span: Span) -> Result<()> {
|
||||
if self.functions.contains_key(location) {
|
||||
return Err(AstError::shadowed_function(location.name, span).into());
|
||||
} else if let Some(existing) = self.structs.get(location) {
|
||||
return match existing.is_record {
|
||||
true => Err(AstError::shadowed_record(location.name, span).into()),
|
||||
false => Err(AstError::shadowed_struct(location.name, span).into()),
|
||||
};
|
||||
} else if self.structs.get(location).is_some() && !(location.program.is_none() && is_struct) {
|
||||
// The second half of the conditional makes sure that structs are only caught for shadowing local records during ST creation, not for redefinition of external structs.
|
||||
return Err(AstError::shadowed_record(location.name, span).into());
|
||||
} else if self.structs.get(&Location::new(None, location.name)).is_some() && !is_struct {
|
||||
// Struct redefinition is allowed. If there are more than one occurrences, the error will be caught in the creator pass.
|
||||
return Err(AstError::shadowed_struct(location.name, span).into());
|
||||
} else if self.variables.contains_key(location) {
|
||||
return Err(AstError::shadowed_variable(location.name, span).into());
|
||||
}
|
||||
if let Some(parent) = self.parent.as_ref() { parent.check_shadowing(location, span) } else { Ok(()) }
|
||||
if let Some(parent) = self.parent.as_ref() { parent.check_shadowing(location, is_struct, span) } else { Ok(()) }
|
||||
}
|
||||
|
||||
/// Returns the current scope index.
|
||||
@ -81,7 +82,7 @@ impl SymbolTable {
|
||||
/// Inserts a function into the symbol table.
|
||||
pub fn insert_fn(&mut self, location: Location, insert: &Function) -> Result<()> {
|
||||
let id = self.scope_index();
|
||||
self.check_shadowing(&location, insert.span)?;
|
||||
self.check_shadowing(&location, false, insert.span)?;
|
||||
self.functions.insert(location, Self::new_function_symbol(id, insert));
|
||||
self.scopes.push(Default::default());
|
||||
Ok(())
|
||||
@ -89,13 +90,40 @@ impl SymbolTable {
|
||||
|
||||
/// Inserts a struct into the symbol table.
|
||||
pub fn insert_struct(&mut self, location: Location, insert: &Composite) -> Result<()> {
|
||||
match self.check_shadowing(&location, insert.span) {
|
||||
Ok(_) => {
|
||||
self.structs.insert(location, insert.clone());
|
||||
Ok(())
|
||||
// Check shadowing.
|
||||
self.check_shadowing(&location, !insert.is_record, insert.span)?;
|
||||
|
||||
if insert.is_record {
|
||||
// Insert the record into the symbol table.
|
||||
self.structs.insert(location, insert.clone());
|
||||
} else {
|
||||
if let Some(struct_) = self.structs.get(&Location::new(None, location.name)) {
|
||||
// Allow redefinition of external structs so long as the definitions match.
|
||||
if !self.check_eq_struct(insert, struct_) {
|
||||
return Err(AstError::redefining_external_struct(location.name, insert.span).into());
|
||||
}
|
||||
}
|
||||
Err(e) => Err(e),
|
||||
// Insert with program location set to `None` to reflect that in snarkVM structs are not attached to programs (unlike records).
|
||||
self.structs.insert(Location::new(None, location.name), insert.clone());
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Checks if two structs are equal.
|
||||
fn check_eq_struct(&self, new: &Composite, old: &Composite) -> bool {
|
||||
if new.is_record || old.is_record {
|
||||
return false;
|
||||
}
|
||||
if new.members.len() != old.members.len() {
|
||||
return false;
|
||||
}
|
||||
for (member1, member2) in new.members.iter().zip(old.members.iter()) {
|
||||
if member1.name() != member2.name() || !member1.type_.eq_flat_relax_composite(&member2.type_) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
/// Attach a finalize to a function.
|
||||
@ -112,7 +140,7 @@ impl SymbolTable {
|
||||
|
||||
/// Inserts a variable into the symbol table.
|
||||
pub fn insert_variable(&mut self, location: Location, insert: VariableSymbol) -> Result<()> {
|
||||
self.check_shadowing(&location, insert.span)?;
|
||||
self.check_shadowing(&location, false, insert.span)?;
|
||||
self.variables.insert(location, insert);
|
||||
Ok(())
|
||||
}
|
||||
@ -152,14 +180,15 @@ impl SymbolTable {
|
||||
}
|
||||
|
||||
/// Attempts to lookup a struct in the symbol table.
|
||||
pub fn lookup_struct(&self, location: Location) -> Option<&Composite> {
|
||||
pub fn lookup_struct(&self, location: Location, main_program: Option<Symbol>) -> Option<&Composite> {
|
||||
if let Some(struct_) = self.structs.get(&location) {
|
||||
Some(struct_)
|
||||
} else if let Some(parent) = self.parent.as_ref() {
|
||||
parent.lookup_struct(location)
|
||||
} else {
|
||||
None
|
||||
return Some(struct_);
|
||||
} else if location.program == main_program {
|
||||
if let Some(struct_) = self.structs.get(&Location::new(None, location.name)) {
|
||||
return Some(struct_);
|
||||
}
|
||||
}
|
||||
if let Some(parent) = self.parent.as_ref() { parent.lookup_struct(location, main_program) } else { None }
|
||||
}
|
||||
|
||||
/// Attempts to lookup a variable in the symbol table.
|
||||
@ -173,6 +202,11 @@ impl SymbolTable {
|
||||
}
|
||||
}
|
||||
|
||||
/// Attempts to lookup a variable in the current scope.
|
||||
pub fn lookup_variable_in_current_scope(&self, location: Location) -> Option<&VariableSymbol> {
|
||||
self.variables.get(&location)
|
||||
}
|
||||
|
||||
/// Returns the scope associated with `index`, if it exists in the symbol table.
|
||||
pub fn lookup_scope_by_index(&self, index: usize) -> Option<&RefCell<Self>> {
|
||||
self.scopes.get(index)
|
||||
|
@ -26,11 +26,13 @@ pub struct DeadCodeEliminator<'a> {
|
||||
pub(crate) used_variables: IndexSet<Symbol>,
|
||||
/// Whether or not the variables are necessary.
|
||||
pub(crate) is_necessary: bool,
|
||||
/// Whether or not we are currently traversing a finalize block.
|
||||
pub(crate) is_finalize: bool,
|
||||
}
|
||||
|
||||
impl<'a> DeadCodeEliminator<'a> {
|
||||
/// Initializes a new `DeadCodeEliminator`.
|
||||
pub fn new(node_builder: &'a NodeBuilder) -> Self {
|
||||
Self { node_builder, used_variables: Default::default(), is_necessary: false }
|
||||
Self { node_builder, used_variables: Default::default(), is_necessary: false, is_finalize: false }
|
||||
}
|
||||
}
|
||||
|
@ -117,8 +117,29 @@ impl StatementReconstructor for DeadCodeEliminator<'_> {
|
||||
}
|
||||
|
||||
/// Flattening removes conditional statements from the program.
|
||||
fn reconstruct_conditional(&mut self, _: ConditionalStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
fn reconstruct_conditional(&mut self, input: ConditionalStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
if !self.is_finalize {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
} else {
|
||||
(
|
||||
Statement::Conditional(ConditionalStatement {
|
||||
then: self.reconstruct_block(input.then).0,
|
||||
otherwise: input.otherwise.map(|n| Box::new(self.reconstruct_statement(*n).0)),
|
||||
condition: {
|
||||
// Set the `is_necessary` flag.
|
||||
self.is_necessary = true;
|
||||
let condition = self.reconstruct_expression(input.condition).0;
|
||||
// Unset the `is_necessary` flag.
|
||||
self.is_necessary = false;
|
||||
|
||||
condition
|
||||
},
|
||||
span: input.span,
|
||||
id: input.id,
|
||||
}),
|
||||
Default::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// Parsing guarantees that console statements are not present in the program.
|
||||
|
@ -16,6 +16,37 @@
|
||||
|
||||
use crate::Destructurer;
|
||||
|
||||
use leo_ast::ProgramReconstructor;
|
||||
use leo_ast::{Finalize, Function, ProgramReconstructor, StatementReconstructor};
|
||||
|
||||
impl ProgramReconstructor for Destructurer<'_> {}
|
||||
impl ProgramReconstructor for Destructurer<'_> {
|
||||
fn reconstruct_function(&mut self, input: Function) -> Function {
|
||||
Function {
|
||||
annotations: input.annotations,
|
||||
variant: input.variant,
|
||||
identifier: input.identifier,
|
||||
input: input.input,
|
||||
output: input.output,
|
||||
output_type: input.output_type,
|
||||
block: self.reconstruct_block(input.block).0,
|
||||
finalize: input.finalize.map(|finalize| {
|
||||
// Set the `is_finalize` flag before reconstructing the finalize block.
|
||||
self.is_finalize = true;
|
||||
// Reconstruct the finalize block.
|
||||
let finalize = Finalize {
|
||||
identifier: finalize.identifier,
|
||||
input: finalize.input,
|
||||
output: finalize.output,
|
||||
output_type: finalize.output_type,
|
||||
block: self.reconstruct_block(finalize.block).0,
|
||||
span: finalize.span,
|
||||
id: finalize.id,
|
||||
};
|
||||
// Reset the `is_finalize` flag.
|
||||
self.is_finalize = false;
|
||||
finalize
|
||||
}),
|
||||
span: input.span,
|
||||
id: input.id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -220,8 +220,22 @@ impl StatementReconstructor for Destructurer<'_> {
|
||||
(Block { span: block.span, statements, id: self.node_builder.next_id() }, Default::default())
|
||||
}
|
||||
|
||||
fn reconstruct_conditional(&mut self, _: ConditionalStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
fn reconstruct_conditional(&mut self, input: ConditionalStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
// Conditional statements can only exist in finalize blocks.
|
||||
if !self.is_finalize {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
} else {
|
||||
(
|
||||
Statement::Conditional(ConditionalStatement {
|
||||
condition: self.reconstruct_expression(input.condition).0,
|
||||
then: self.reconstruct_block(input.then).0,
|
||||
otherwise: input.otherwise.map(|n| Box::new(self.reconstruct_statement(*n).0)),
|
||||
span: input.span,
|
||||
id: input.id,
|
||||
}),
|
||||
Default::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn reconstruct_console(&mut self, _: ConsoleStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
|
@ -30,11 +30,13 @@ pub struct Destructurer<'a> {
|
||||
pub(crate) assigner: &'a Assigner,
|
||||
/// A mapping between variables and flattened tuple expressions.
|
||||
pub(crate) tuples: IndexMap<Symbol, TupleExpression>,
|
||||
/// Whether or not we are currently traversing a finalize block.
|
||||
pub(crate) is_finalize: bool,
|
||||
}
|
||||
|
||||
impl<'a> Destructurer<'a> {
|
||||
pub(crate) fn new(type_table: &'a TypeTable, node_builder: &'a NodeBuilder, assigner: &'a Assigner) -> Self {
|
||||
Self { type_table, node_builder, assigner, tuples: IndexMap::new() }
|
||||
Self { type_table, node_builder, assigner, tuples: IndexMap::new(), is_finalize: false }
|
||||
}
|
||||
|
||||
/// A wrapper around `assigner.simple_assign_statement` that tracks the type of the lhs.
|
||||
|
@ -84,7 +84,7 @@ impl ExpressionReconstructor for Flattener<'_> {
|
||||
};
|
||||
|
||||
// Note that type checking guarantees that both expressions have the same same type. This is a sanity check.
|
||||
assert!(first_type.eq_flat(&second_type));
|
||||
assert!(first_type.eq_flat_relax_composite(&second_type));
|
||||
|
||||
match &first_type {
|
||||
Type::Array(first_type) => self.ternary_array(first_type, &input.condition, &first, &second),
|
||||
@ -92,7 +92,7 @@ impl ExpressionReconstructor for Flattener<'_> {
|
||||
// Get the struct definitions.
|
||||
let first_type = self
|
||||
.symbol_table
|
||||
.lookup_struct(Location::new(first_type.program, first_type.id.name))
|
||||
.lookup_struct(Location::new(self.program, first_type.id.name), self.program)
|
||||
.unwrap();
|
||||
self.ternary_struct(first_type, &input.condition, &first, &second)
|
||||
}
|
||||
|
@ -16,10 +16,30 @@
|
||||
|
||||
use crate::Flattener;
|
||||
|
||||
use leo_ast::{Function, ProgramReconstructor, StatementReconstructor};
|
||||
use leo_ast::{Function, ProgramReconstructor, ProgramScope, Statement, StatementReconstructor};
|
||||
|
||||
impl ProgramReconstructor for Flattener<'_> {
|
||||
/// Flattens a function's body.
|
||||
/// Flattens a program scope.
|
||||
fn reconstruct_program_scope(&mut self, input: ProgramScope) -> ProgramScope {
|
||||
self.program = Some(input.program_id.name.name);
|
||||
ProgramScope {
|
||||
program_id: input.program_id,
|
||||
structs: input.structs.into_iter().map(|(i, c)| (i, self.reconstruct_struct(c))).collect(),
|
||||
mappings: input.mappings.into_iter().map(|(id, mapping)| (id, self.reconstruct_mapping(mapping))).collect(),
|
||||
functions: input.functions.into_iter().map(|(i, f)| (i, self.reconstruct_function(f))).collect(),
|
||||
consts: input
|
||||
.consts
|
||||
.into_iter()
|
||||
.map(|(i, c)| match self.reconstruct_const(c) {
|
||||
(Statement::Const(declaration), _) => (i, declaration),
|
||||
_ => unreachable!("`reconstruct_const` can only return `Statement::Const`"),
|
||||
})
|
||||
.collect(),
|
||||
span: input.span,
|
||||
}
|
||||
}
|
||||
|
||||
/// Flattens a function's body
|
||||
fn reconstruct_function(&mut self, function: Function) -> Function {
|
||||
// Flatten the function body.
|
||||
let mut block = self.reconstruct_block(function.block).0;
|
||||
|
@ -47,6 +47,7 @@ use leo_ast::{
|
||||
Type,
|
||||
UnitExpression,
|
||||
};
|
||||
use leo_span::Symbol;
|
||||
|
||||
pub struct Flattener<'a> {
|
||||
/// The symbol table associated with the program.
|
||||
@ -64,6 +65,8 @@ pub struct Flattener<'a> {
|
||||
/// Note that returns are inserted in the order they are encountered during a pre-order traversal of the AST.
|
||||
/// Note that type checking guarantees that there is at most one return in a basic block.
|
||||
pub(crate) returns: Vec<(Option<Expression>, ReturnStatement)>,
|
||||
/// The program name.
|
||||
pub(crate) program: Option<Symbol>,
|
||||
}
|
||||
|
||||
impl<'a> Flattener<'a> {
|
||||
@ -73,7 +76,15 @@ impl<'a> Flattener<'a> {
|
||||
node_builder: &'a NodeBuilder,
|
||||
assigner: &'a Assigner,
|
||||
) -> Self {
|
||||
Self { symbol_table, type_table, node_builder, assigner, condition_stack: Vec::new(), returns: Vec::new() }
|
||||
Self {
|
||||
symbol_table,
|
||||
type_table,
|
||||
node_builder,
|
||||
assigner,
|
||||
condition_stack: Vec::new(),
|
||||
returns: Vec::new(),
|
||||
program: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Clears the state associated with `ReturnStatements`, returning the ones that were previously stored.
|
||||
|
@ -18,6 +18,7 @@
|
||||
//! The pass flattens `ConditionalStatement`s into a sequence of `AssignStatement`s.
|
||||
//! The pass rewrites `ReturnStatement`s into `AssignStatement`s and consolidates the returned values as a single `ReturnStatement` at the end of the function.
|
||||
//! The pass rewrites ternary expressions over composite data types, into ternary expressions over the individual fields of the composite data type, followed by an expression constructing the composite data type.
|
||||
//! Note that this transformation is only applied to non-finalize code.
|
||||
//!
|
||||
//! Consider the following Leo code, output by the SSA pass.
|
||||
//! ```leo
|
||||
|
@ -32,6 +32,8 @@ pub struct FunctionInliner<'a> {
|
||||
pub(crate) reconstructed_functions: Vec<(Symbol, Function)>,
|
||||
/// The main program.
|
||||
pub(crate) program: Option<Symbol>,
|
||||
/// Whether or not we are currently traversing a finalize block.
|
||||
pub(crate) is_finalize: bool,
|
||||
}
|
||||
|
||||
impl<'a> FunctionInliner<'a> {
|
||||
@ -49,6 +51,7 @@ impl<'a> FunctionInliner<'a> {
|
||||
reconstructed_functions: Default::default(),
|
||||
type_table,
|
||||
program: None,
|
||||
is_finalize: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
use crate::FunctionInliner;
|
||||
|
||||
use leo_ast::{Function, ProgramReconstructor, ProgramScope};
|
||||
use leo_ast::{Finalize, Function, ProgramReconstructor, ProgramScope, StatementReconstructor};
|
||||
use leo_span::Symbol;
|
||||
|
||||
use indexmap::IndexMap;
|
||||
@ -60,4 +60,35 @@ impl ProgramReconstructor for FunctionInliner<'_> {
|
||||
span: input.span,
|
||||
}
|
||||
}
|
||||
|
||||
fn reconstruct_function(&mut self, input: Function) -> Function {
|
||||
Function {
|
||||
annotations: input.annotations,
|
||||
variant: input.variant,
|
||||
identifier: input.identifier,
|
||||
input: input.input,
|
||||
output: input.output,
|
||||
output_type: input.output_type,
|
||||
block: self.reconstruct_block(input.block).0,
|
||||
finalize: input.finalize.map(|finalize| {
|
||||
// Set the `is_finalize` flag before reconstructing the finalize block.
|
||||
self.is_finalize = true;
|
||||
// Reconstruct the finalize block.
|
||||
let finalize = Finalize {
|
||||
identifier: finalize.identifier,
|
||||
input: finalize.input,
|
||||
output: finalize.output,
|
||||
output_type: finalize.output_type,
|
||||
block: self.reconstruct_block(finalize.block).0,
|
||||
span: finalize.span,
|
||||
id: finalize.id,
|
||||
};
|
||||
// Reset the `is_finalize` flag.
|
||||
self.is_finalize = false;
|
||||
finalize
|
||||
}),
|
||||
span: input.span,
|
||||
id: input.id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,21 @@ impl StatementReconstructor for FunctionInliner<'_> {
|
||||
}
|
||||
|
||||
/// Flattening removes conditional statements from the program.
|
||||
fn reconstruct_conditional(&mut self, _: ConditionalStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
fn reconstruct_conditional(&mut self, input: ConditionalStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
if !self.is_finalize {
|
||||
unreachable!("`ConditionalStatement`s should not be in the AST at this phase of compilation.")
|
||||
} else {
|
||||
(
|
||||
Statement::Conditional(ConditionalStatement {
|
||||
condition: self.reconstruct_expression(input.condition).0,
|
||||
then: self.reconstruct_block(input.then).0,
|
||||
otherwise: input.otherwise.map(|n| Box::new(self.reconstruct_statement(*n).0)),
|
||||
span: input.span,
|
||||
id: input.id,
|
||||
}),
|
||||
Default::default(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// Parsing guarantees that console statements are not present in the program.
|
||||
|
@ -255,7 +255,7 @@ impl ExpressionConsumer for StaticSingleAssigner<'_> {
|
||||
// Lookup the struct definition.
|
||||
// Note that type checking guarantees that the correct struct definition exists.
|
||||
let struct_definition: &Composite =
|
||||
self.symbol_table.lookup_struct(Location::new(self.program, input.name.name)).unwrap();
|
||||
self.symbol_table.lookup_struct(Location::new(self.program, input.name.name), self.program).unwrap();
|
||||
|
||||
// Initialize the list of reordered members.
|
||||
let mut reordered_members = Vec::with_capacity(members.len());
|
||||
|
@ -14,8 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use indexmap::IndexSet;
|
||||
use leo_ast::*;
|
||||
use leo_errors::emitter::Handler;
|
||||
use leo_errors::{emitter::Handler, AstError, LeoError};
|
||||
use leo_span::Symbol;
|
||||
|
||||
use crate::{SymbolTable, VariableSymbol, VariableType};
|
||||
@ -32,11 +33,13 @@ pub struct SymbolTableCreator<'a> {
|
||||
program_name: Option<Symbol>,
|
||||
/// Whether or not traversing stub.
|
||||
is_stub: bool,
|
||||
/// The set of local structs that have been successfully visited.
|
||||
structs: IndexSet<Symbol>,
|
||||
}
|
||||
|
||||
impl<'a> SymbolTableCreator<'a> {
|
||||
pub fn new(handler: &'a Handler) -> Self {
|
||||
Self { symbol_table: Default::default(), handler, program_name: None, is_stub: false }
|
||||
Self { symbol_table: Default::default(), handler, program_name: None, is_stub: false, structs: IndexSet::new() }
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +68,11 @@ impl<'a> ProgramVisitor<'a> for SymbolTableCreator<'a> {
|
||||
}
|
||||
|
||||
fn visit_struct(&mut self, input: &'a Composite) {
|
||||
if let Err(err) = self.symbol_table.insert_struct(Location::new(self.program_name, input.name()), input) {
|
||||
// Allow up to one local redefinition for each external struct.
|
||||
if !input.is_record && !self.structs.insert(input.name()) {
|
||||
return self.handler.emit_err::<LeoError>(AstError::shadowed_struct(input.name(), input.span).into());
|
||||
}
|
||||
if let Err(err) = self.symbol_table.insert_struct(Location::new(input.external, input.name()), input) {
|
||||
self.handler.emit_err(err);
|
||||
}
|
||||
}
|
||||
@ -115,7 +122,7 @@ impl<'a> ProgramVisitor<'a> for SymbolTableCreator<'a> {
|
||||
}
|
||||
|
||||
fn visit_struct_stub(&mut self, input: &'a Composite) {
|
||||
if let Err(err) = self.symbol_table.insert_struct(Location::new(self.program_name, input.name()), input) {
|
||||
if let Err(err) = self.symbol_table.insert_struct(Location::new(input.external, input.name()), input) {
|
||||
self.handler.emit_err(err);
|
||||
}
|
||||
}
|
||||
|
@ -14,21 +14,15 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::TypeChecker;
|
||||
use crate::{TypeChecker, VariableSymbol};
|
||||
|
||||
use leo_ast::{
|
||||
Variant::{AsyncFunction, AsyncTransition},
|
||||
*,
|
||||
};
|
||||
use leo_ast::*;
|
||||
use leo_errors::{emitter::Handler, TypeCheckerError};
|
||||
use leo_span::{sym, Span, Symbol};
|
||||
|
||||
use itertools::Itertools;
|
||||
use leo_ast::{
|
||||
CoreFunction::FutureAwait,
|
||||
Type::{Future, Tuple},
|
||||
};
|
||||
use snarkvm::console::network::{MainnetV0, Network};
|
||||
|
||||
use itertools::Itertools;
|
||||
use std::str::FromStr;
|
||||
|
||||
fn return_incorrect_type(t1: Option<Type>, t2: Option<Type>, expected: &Option<Type>) -> Option<Type> {
|
||||
@ -126,7 +120,7 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
}
|
||||
|
||||
// Await futures here so that can use the argument variable names to lookup.
|
||||
if core_instruction == FutureAwait {
|
||||
if core_instruction == CoreFunction::FutureAwait {
|
||||
if access.arguments.len() != 1 {
|
||||
self.emit_err(TypeCheckerError::can_only_await_one_future_at_a_time(access.span));
|
||||
return Some(Type::Unit);
|
||||
@ -169,7 +163,7 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
return Some(actual);
|
||||
}
|
||||
}
|
||||
Future(_) => {
|
||||
Type::Future(_) => {
|
||||
// Get the fully inferred type.
|
||||
if let Some(Type::Future(inferred_f)) = self.type_table.get(&access.tuple.id()) {
|
||||
// Make sure in range.
|
||||
@ -245,11 +239,7 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
match self.visit_expression(&access.inner, &None) {
|
||||
Some(Type::Composite(struct_)) => {
|
||||
// Retrieve the struct definition associated with `identifier`.
|
||||
let struct_ = self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(struct_.program, struct_.id.name))
|
||||
.cloned();
|
||||
let struct_ = self.lookup_struct(struct_.program, struct_.id.name);
|
||||
if let Some(struct_) = struct_ {
|
||||
// Check that `access.name` is a member of the struct.
|
||||
match struct_.members.iter().find(|member| member.name() == access.name.name) {
|
||||
@ -635,8 +625,8 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
self.emit_err(TypeCheckerError::cannot_call_external_inline_function(input.span));
|
||||
}
|
||||
// Async functions return a single future.
|
||||
let mut ret = if func.variant == AsyncFunction {
|
||||
// Type check after know the input types.
|
||||
let mut ret = if func.variant == Variant::AsyncFunction {
|
||||
// Type check after resolving the input types.
|
||||
if let Some(Type::Future(_)) = expected {
|
||||
Type::Future(FutureType::new(
|
||||
Vec::new(),
|
||||
@ -647,25 +637,29 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
self.emit_err(TypeCheckerError::return_type_of_finalize_function_is_future(input.span));
|
||||
Type::Unit
|
||||
}
|
||||
} else if func.variant == AsyncTransition {
|
||||
} else if func.variant == Variant::AsyncTransition {
|
||||
// Fully infer future type.
|
||||
let future_type = Type::Future(FutureType::new(
|
||||
// Assumes that external function stubs have been processed.
|
||||
self.finalize_input_types
|
||||
.get(&Location::new(input.program, Symbol::intern(&format!("finalize/{}", ident.name))))
|
||||
.unwrap()
|
||||
.clone(),
|
||||
Some(Location::new(input.program, ident.name)),
|
||||
true,
|
||||
));
|
||||
let future_type = match self.async_function_input_types.get(&Location::new(input.program, Symbol::intern(&format!("finalize/{}", ident.name)))) {
|
||||
Some(inputs) => {
|
||||
Type::Future(FutureType::new(
|
||||
inputs.clone(), Some(Location::new(input.program, ident.name)), true
|
||||
))
|
||||
},
|
||||
None => {
|
||||
self.emit_err(TypeCheckerError::async_function_not_found(ident.name, input.span));
|
||||
return Some(Type::Future(FutureType::new(
|
||||
Vec::new(), Some(Location::new(input.program, ident.name)), false
|
||||
)))
|
||||
}
|
||||
};
|
||||
let fully_inferred_type = match func.output_type {
|
||||
Tuple(tup) => Tuple(TupleType::new(
|
||||
Type::Tuple(tup) => Type::Tuple(TupleType::new(
|
||||
tup.elements()
|
||||
.iter()
|
||||
.map(|t| if matches!(t, Future(_)) { future_type.clone() } else { t.clone() })
|
||||
.map(|t| if matches!(t, Type::Future(_)) { future_type.clone() } else { t.clone() })
|
||||
.collect::<Vec<Type>>(),
|
||||
)),
|
||||
Future(_) => future_type,
|
||||
Type::Future(_) => future_type,
|
||||
_ => panic!("Invalid output type for async transition."),
|
||||
};
|
||||
self.assert_and_return_type(fully_inferred_type, expected, input.span())
|
||||
@ -686,9 +680,9 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
self.scope_state.is_call = true;
|
||||
let (mut input_futures, mut inferred_finalize_inputs) = (Vec::new(), Vec::new());
|
||||
func.input.iter().zip(input.arguments.iter()).for_each(|(expected, argument)| {
|
||||
let ty = self.visit_expression(argument, &Some(expected.type_()));
|
||||
let ty = self.visit_expression(argument, &Some(expected.type_().clone()));
|
||||
// Extract information about futures that are being consumed.
|
||||
if func.variant == AsyncFunction && matches!(expected.type_(), Type::Future(_)) {
|
||||
if func.variant == Variant::AsyncFunction && matches!(expected.type_(), Type::Future(_)) {
|
||||
match argument {
|
||||
Expression::Identifier(_)
|
||||
| Expression::Call(_)
|
||||
@ -733,14 +727,14 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
}
|
||||
|
||||
// Propagate futures from async functions and transitions.
|
||||
if func.variant.is_async() {
|
||||
if func.variant.is_async_function() {
|
||||
// Cannot have async calls in a conditional block.
|
||||
if self.scope_state.is_conditional {
|
||||
self.emit_err(TypeCheckerError::async_call_in_conditional(input.span));
|
||||
}
|
||||
|
||||
// Can only call async functions and external async transitions from an async transition body.
|
||||
if self.scope_state.variant != Some(AsyncTransition) {
|
||||
if self.scope_state.variant != Some(Variant::AsyncTransition) {
|
||||
self.emit_err(TypeCheckerError::async_call_can_only_be_done_from_async_transition(
|
||||
input.span,
|
||||
));
|
||||
@ -775,8 +769,9 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
Location::new(self.scope_state.program_name, ident.name),
|
||||
)
|
||||
.unwrap();
|
||||
drop(st);
|
||||
// Create expectation for finalize inputs that will be checked when checking corresponding finalize function signature.
|
||||
self.finalize_input_types.insert(
|
||||
self.async_function_input_types.insert(
|
||||
Location::new(self.scope_state.program_name, ident.name),
|
||||
inferred_finalize_inputs.clone(),
|
||||
);
|
||||
@ -794,10 +789,11 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
// Type check in case the expected type is known.
|
||||
self.assert_and_return_type(ret.clone(), expected, input.span());
|
||||
}
|
||||
// Set call location so that definition statement knows where future comes from.
|
||||
self.scope_state.call_location = Some(Location::new(input.program, ident.name));
|
||||
}
|
||||
|
||||
// Set call location so that definition statement knows where future comes from.
|
||||
self.scope_state.call_location = Some(Location::new(input.program, ident.name));
|
||||
|
||||
Some(ret)
|
||||
} else {
|
||||
self.emit_err(TypeCheckerError::unknown_sym("function", ident.name, ident.span()));
|
||||
@ -821,11 +817,7 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
}
|
||||
|
||||
fn visit_struct_init(&mut self, input: &'a StructExpression, additional: &Self::AdditionalInput) -> Self::Output {
|
||||
let struct_ = self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(self.scope_state.program_name, input.name.name))
|
||||
.cloned();
|
||||
let struct_ = self.lookup_struct(self.scope_state.program_name, input.name.name).clone();
|
||||
if let Some(struct_) = struct_ {
|
||||
// Check struct type name.
|
||||
let ret = self.check_expected_struct(&struct_, additional, input.name.span());
|
||||
@ -871,9 +863,10 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
}
|
||||
|
||||
fn visit_identifier(&mut self, input: &'a Identifier, expected: &Self::AdditionalInput) -> Self::Output {
|
||||
if let Some(var) = self.symbol_table.borrow().lookup_variable(Location::new(None, input.name)) {
|
||||
let var = self.symbol_table.borrow().lookup_variable(Location::new(None, input.name)).cloned();
|
||||
if let Some(var) = &var {
|
||||
if matches!(var.type_, Type::Future(_)) && matches!(expected, Some(Type::Future(_))) {
|
||||
if self.scope_state.variant == Some(AsyncTransition) && self.scope_state.is_call {
|
||||
if self.scope_state.variant == Some(Variant::AsyncTransition) && self.scope_state.is_call {
|
||||
// Consume future.
|
||||
match self.scope_state.futures.remove(&input.name) {
|
||||
Some(future) => {
|
||||
@ -961,14 +954,16 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
||||
|
||||
fn visit_locator(&mut self, input: &'a LocatorExpression, expected: &Self::AdditionalInput) -> Self::Output {
|
||||
// Check that the locator points to a valid resource in the ST.
|
||||
let loc_: VariableSymbol;
|
||||
if let Some(var) =
|
||||
self.symbol_table.borrow().lookup_variable(Location::new(Some(input.program.name.name), input.name))
|
||||
{
|
||||
Some(self.assert_and_return_type(var.type_.clone(), expected, input.span()))
|
||||
loc_ = var.clone();
|
||||
} else {
|
||||
self.emit_err(TypeCheckerError::unknown_sym("variable", input.name, input.span()));
|
||||
None
|
||||
return None;
|
||||
}
|
||||
Some(self.assert_and_return_type(loc_.type_.clone(), expected, input.span()))
|
||||
}
|
||||
|
||||
fn visit_ternary(&mut self, input: &'a TernaryExpression, expected: &Self::AdditionalInput) -> Self::Output {
|
||||
|
@ -221,34 +221,35 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
|
||||
check_has_field(sym::owner, Type::Address);
|
||||
}
|
||||
|
||||
for Member { mode, identifier, type_, span, .. } in input.members.iter() {
|
||||
// Check that the member type is not a tuple.
|
||||
if matches!(type_, Type::Tuple(_)) {
|
||||
self.emit_err(TypeCheckerError::composite_data_type_cannot_contain_tuple(
|
||||
if input.is_record { "record" } else { "struct" },
|
||||
identifier.span,
|
||||
));
|
||||
}
|
||||
// Ensure that there are no record members.
|
||||
self.assert_member_is_not_record(identifier.span, input.identifier.name, type_);
|
||||
|
||||
// If the member is a struct, add it to the struct dependency graph.
|
||||
// Note that we have already checked that each member is defined and valid.
|
||||
if let Type::Composite(struct_member_type) = type_ {
|
||||
// Note that since there are no cycles in the program dependency graph, there are no cycles in the struct dependency graph caused by external structs.
|
||||
self.struct_graph.add_edge(input.identifier.name, struct_member_type.id.name);
|
||||
} else if let Type::Array(array_type) = type_ {
|
||||
// Get the base element type.
|
||||
let base_element_type = array_type.base_element_type();
|
||||
// If the base element type is a struct, then add it to the struct dependency graph.
|
||||
if let Type::Identifier(member_type) = base_element_type {
|
||||
self.struct_graph.add_edge(input.identifier.name, member_type.name);
|
||||
if !(input.is_record && self.is_stub) {
|
||||
for Member { mode, identifier, type_, span, .. } in input.members.iter() {
|
||||
// Check that the member type is not a tuple.
|
||||
if matches!(type_, Type::Tuple(_)) {
|
||||
self.emit_err(TypeCheckerError::composite_data_type_cannot_contain_tuple(
|
||||
if input.is_record { "record" } else { "struct" },
|
||||
identifier.span,
|
||||
));
|
||||
}
|
||||
// Ensure that there are no record members.
|
||||
self.assert_member_is_not_record(identifier.span, input.identifier.name, type_);
|
||||
// If the member is a struct, add it to the struct dependency graph.
|
||||
// Note that we have already checked that each member is defined and valid.
|
||||
if let Type::Composite(struct_member_type) = type_ {
|
||||
// Note that since there are no cycles in the program dependency graph, there are no cycles in the struct dependency graph caused by external structs.
|
||||
self.struct_graph.add_edge(input.identifier.name, struct_member_type.id.name);
|
||||
} else if let Type::Array(array_type) = type_ {
|
||||
// Get the base element type.
|
||||
let base_element_type = array_type.base_element_type();
|
||||
// If the base element type is a struct, then add it to the struct dependency graph.
|
||||
if let Type::Composite(member_type) = base_element_type {
|
||||
self.struct_graph.add_edge(input.identifier.name, member_type.id.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the input is a struct, then check that the member does not have a mode.
|
||||
if !input.is_record && !matches!(mode, Mode::None) {
|
||||
self.emit_err(TypeCheckerError::struct_cannot_have_member_mode(*span));
|
||||
// If the input is a struct, then check that the member does not have a mode.
|
||||
if !input.is_record && !matches!(mode, Mode::None) {
|
||||
self.emit_err(TypeCheckerError::struct_cannot_have_member_mode(*span));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -260,9 +261,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
|
||||
match input.key_type.clone() {
|
||||
Type::Tuple(_) => self.emit_err(TypeCheckerError::invalid_mapping_type("key", "tuple", input.span)),
|
||||
Type::Composite(struct_type) => {
|
||||
if let Some(struct_) =
|
||||
self.symbol_table.borrow().lookup_struct(Location::new(struct_type.program, struct_type.id.name))
|
||||
{
|
||||
if let Some(struct_) = self.lookup_struct(struct_type.program, struct_type.id.name) {
|
||||
if struct_.is_record {
|
||||
self.emit_err(TypeCheckerError::invalid_mapping_type("key", "record", input.span));
|
||||
}
|
||||
@ -279,9 +278,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
|
||||
match input.value_type.clone() {
|
||||
Type::Tuple(_) => self.emit_err(TypeCheckerError::invalid_mapping_type("value", "tuple", input.span)),
|
||||
Type::Composite(struct_type) => {
|
||||
if let Some(struct_) =
|
||||
self.symbol_table.borrow().lookup_struct(Location::new(struct_type.program, struct_type.id.name))
|
||||
{
|
||||
if let Some(struct_) = self.lookup_struct(struct_type.program, struct_type.id.name) {
|
||||
if struct_.is_record {
|
||||
self.emit_err(TypeCheckerError::invalid_mapping_type("value", "record", input.span));
|
||||
}
|
||||
|
@ -70,15 +70,28 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
|
||||
}
|
||||
};
|
||||
|
||||
let var_type = if let Some(var) =
|
||||
self.symbol_table.borrow_mut().lookup_variable(Location::new(None, var_name.name))
|
||||
// Lookup the variable in the symbol table and retrieve its type.
|
||||
let var_type = if let Some(var) = self.symbol_table.borrow().lookup_variable(Location::new(None, var_name.name))
|
||||
{
|
||||
// If the variable exists, then check that it is not a constant.
|
||||
match &var.declaration {
|
||||
VariableType::Const => self.emit_err(TypeCheckerError::cannot_assign_to_const_var(var_name, var.span)),
|
||||
VariableType::Input(Mode::Constant) => {
|
||||
self.emit_err(TypeCheckerError::cannot_assign_to_const_input(var_name, var.span))
|
||||
}
|
||||
_ => {}
|
||||
VariableType::Mut | VariableType::Input(_) => {}
|
||||
}
|
||||
|
||||
// If the variable exists and its in an async function, then check that it is in the current scope.
|
||||
if self.scope_state.is_async
|
||||
&& self.scope_state.is_conditional
|
||||
&& self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_variable_in_current_scope(Location::new(None, var_name.name))
|
||||
.is_none()
|
||||
{
|
||||
self.emit_err(TypeCheckerError::async_cannot_assign_outside_conditional(var_name, var.span));
|
||||
}
|
||||
// Prohibit reassignment of futures.
|
||||
if let Type::Future(_) = var.type_ {
|
||||
@ -88,7 +101,6 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
|
||||
Some(var.type_.clone())
|
||||
} else {
|
||||
self.emit_err(TypeCheckerError::unknown_sym("variable", var_name.name, var_name.span));
|
||||
|
||||
None
|
||||
};
|
||||
|
||||
@ -115,7 +127,7 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
|
||||
|
||||
// Set the `has_return` flag for the then-block.
|
||||
let previous_has_return = core::mem::replace(&mut self.scope_state.has_return, then_block_has_return);
|
||||
// Set the `is_conditional` flag for the conditional block.
|
||||
// Set the `is_conditional` flag.
|
||||
let previous_is_conditional = core::mem::replace(&mut self.scope_state.is_conditional, true);
|
||||
|
||||
// Create scope for checking awaits in `then` branch of conditional.
|
||||
@ -224,7 +236,7 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
|
||||
// Check that the type of the definition is defined.
|
||||
self.assert_type_is_valid(&input.type_, input.span);
|
||||
|
||||
// Check that the type of the definition is not a unit type, singleton tuple type, nested tuple type, or external struct type.
|
||||
// Check that the type of the definition is not a unit type, singleton tuple type, or nested tuple type.
|
||||
match &input.type_ {
|
||||
// If the type is an empty tuple, return an error.
|
||||
Type::Unit => self.emit_err(TypeCheckerError::lhs_must_be_identifier_or_tuple(input.span)),
|
||||
@ -236,19 +248,12 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
|
||||
if matches!(type_, Type::Tuple(_)) {
|
||||
self.emit_err(TypeCheckerError::nested_tuple_type(input.span))
|
||||
}
|
||||
if let Type::Composite(composite) = type_ {
|
||||
self.assert_internal_struct(composite, input.span);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Type::Mapping(_) | Type::Err => unreachable!(
|
||||
"Parsing guarantees that `mapping` and `err` types are not present at this location in the AST."
|
||||
),
|
||||
// Make sure there are no instances of external structs created.
|
||||
Type::Composite(composite) => {
|
||||
self.assert_internal_struct(composite, input.span);
|
||||
}
|
||||
// Otherwise, the type is valid.
|
||||
_ => (), // Do nothing
|
||||
}
|
||||
@ -395,7 +400,7 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
|
||||
|
||||
// Fully type the expected return value.
|
||||
if self.scope_state.variant == Some(Variant::AsyncTransition) && self.scope_state.has_called_finalize {
|
||||
let inferred_future_type = match self.finalize_input_types.get(&func.unwrap().finalize.clone().unwrap()) {
|
||||
let inferred_future_type = match self.async_function_input_types.get(&func.unwrap().finalize.clone().unwrap()) {
|
||||
Some(types) => Future(FutureType::new(
|
||||
types.clone(),
|
||||
Some(Location::new(self.scope_state.program_name, parent)),
|
||||
|
@ -14,7 +14,15 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{CallGraph, StructGraph, SymbolTable, TypeTable, VariableSymbol, VariableType};
|
||||
use crate::{
|
||||
type_checking::{await_checker::AwaitChecker, scope_state::ScopeState},
|
||||
CallGraph,
|
||||
StructGraph,
|
||||
SymbolTable,
|
||||
TypeTable,
|
||||
VariableSymbol,
|
||||
VariableType,
|
||||
};
|
||||
|
||||
use leo_ast::{
|
||||
Composite,
|
||||
@ -29,7 +37,6 @@ use leo_ast::{
|
||||
MappingType,
|
||||
Mode,
|
||||
Node,
|
||||
Output,
|
||||
Type,
|
||||
Variant,
|
||||
};
|
||||
@ -38,15 +45,8 @@ use leo_span::{Span, Symbol};
|
||||
|
||||
use snarkvm::console::network::{MainnetV0, Network};
|
||||
|
||||
use crate::type_checking::{await_checker::AwaitChecker, scope_state::ScopeState};
|
||||
use indexmap::IndexMap;
|
||||
use indexmap::{IndexMap, IndexSet};
|
||||
use itertools::Itertools;
|
||||
use leo_ast::{
|
||||
Input::Internal,
|
||||
Mode::Public,
|
||||
Type::{Future, Tuple},
|
||||
Variant::AsyncTransition,
|
||||
};
|
||||
use std::cell::RefCell;
|
||||
|
||||
pub struct TypeChecker<'a> {
|
||||
@ -65,7 +65,9 @@ pub struct TypeChecker<'a> {
|
||||
/// Struct to store the state relevant to checking all futures are awaited.
|
||||
pub(crate) await_checker: AwaitChecker,
|
||||
/// Mapping from async function name to the inferred input types.
|
||||
pub(crate) finalize_input_types: IndexMap<Location, Vec<Type>>,
|
||||
pub(crate) async_function_input_types: IndexMap<Location, Vec<Type>>,
|
||||
/// The set of used composites.
|
||||
pub(crate) used_structs: IndexSet<Symbol>,
|
||||
}
|
||||
|
||||
const ADDRESS_TYPE: Type = Type::Address;
|
||||
@ -133,7 +135,8 @@ impl<'a> TypeChecker<'a> {
|
||||
handler,
|
||||
scope_state: ScopeState::new(),
|
||||
await_checker: AwaitChecker::new(max_depth, !disabled),
|
||||
finalize_input_types: IndexMap::new(),
|
||||
async_function_input_types: IndexMap::new(),
|
||||
used_structs: IndexSet::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,63 +183,16 @@ impl<'a> TypeChecker<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Determines if the two types have the same structure.
|
||||
/// Needs access to the symbol table in order to compare nested future and struct types.
|
||||
pub(crate) fn check_eq_type_structure(&self, actual: &Type, expected: &Type, span: Span) -> bool {
|
||||
if actual.eq_flat(expected) {
|
||||
return true;
|
||||
}
|
||||
// All of these types could return false for `eq_flat` if they have an external struct.
|
||||
match (actual, expected) {
|
||||
(Type::Array(left), Type::Array(right)) => {
|
||||
self.check_eq_type_structure(left.element_type(), right.element_type(), span)
|
||||
&& left.length() == right.length()
|
||||
}
|
||||
(Type::Integer(left), Type::Integer(right)) => left.eq(right),
|
||||
(Type::Mapping(left), Type::Mapping(right)) => {
|
||||
self.check_eq_type_structure(&left.key, &right.key, span)
|
||||
&& self.check_eq_type_structure(&left.value, &right.value, span)
|
||||
}
|
||||
(Type::Tuple(left), Type::Tuple(right)) if left.length() == right.length() => left
|
||||
.elements()
|
||||
.iter()
|
||||
.zip_eq(right.elements().iter())
|
||||
.all(|(left_type, right_type)| self.check_eq_type_structure(left_type, right_type, span)),
|
||||
(Type::Composite(left), Type::Composite(right)) => {
|
||||
if left.id.name == right.id.name && left.program == right.program {
|
||||
true
|
||||
}
|
||||
// TODO: Can optimize by caching the successful matches.
|
||||
else if !self.check_duplicate_struct(left.id.name, left.program.unwrap(), right.program.unwrap()) {
|
||||
self.emit_err(TypeCheckerError::struct_definitions_dont_match(
|
||||
left.id.name.to_string(),
|
||||
left.program.unwrap().to_string(),
|
||||
right.program.unwrap().to_string(),
|
||||
span,
|
||||
));
|
||||
false
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
// Don't type check when type hasn't been explicitly defined.
|
||||
(Type::Future(left), Type::Future(right)) if !left.is_explicit || !right.is_explicit => true,
|
||||
(Type::Future(left), Type::Future(right)) if left.inputs.len() == right.inputs.len() => left
|
||||
.inputs()
|
||||
.iter()
|
||||
.zip_eq(right.inputs().iter())
|
||||
.all(|(left_type, right_type)| self.check_eq_type_structure(left_type, right_type, span)),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Emits an error if the two given types are not equal.
|
||||
pub(crate) fn check_eq_types(&self, t1: &Option<Type>, t2: &Option<Type>, span: Span) {
|
||||
match (t1, t2) {
|
||||
(Some(t1), Some(t2)) => {
|
||||
if !self.check_eq_type_structure(t1, t2, span) {
|
||||
self.emit_err(TypeCheckerError::expected_one_type_of(t1.to_string(), t2, span));
|
||||
(Some(t1), Some(t2)) if !Type::eq_flat_relax_composite(t1, t2) => {
|
||||
// If both types are futures, print them out.
|
||||
if let (Type::Future(f1), Type::Future(f2)) = (t1, t2) {
|
||||
println!("Future 1: {:?}", f1);
|
||||
println!("Future 2: {:?}", f2);
|
||||
}
|
||||
self.emit_err(TypeCheckerError::type_should_be(t1, t2, span))
|
||||
}
|
||||
(Some(type_), None) | (None, Some(type_)) => {
|
||||
self.emit_err(TypeCheckerError::type_should_be("no type", type_, span))
|
||||
@ -247,7 +203,7 @@ impl<'a> TypeChecker<'a> {
|
||||
|
||||
/// Use this method when you know the actual type.
|
||||
/// Emits an error to the handler if the `actual` type is not equal to the `expected` type.
|
||||
pub(crate) fn assert_and_return_type(&self, actual: Type, expected: &Option<Type>, span: Span) -> Type {
|
||||
pub(crate) fn assert_and_return_type(&mut self, actual: Type, expected: &Option<Type>, span: Span) -> Type {
|
||||
if expected.is_some() {
|
||||
self.check_eq_types(&Some(actual.clone()), expected, span);
|
||||
}
|
||||
@ -255,8 +211,10 @@ impl<'a> TypeChecker<'a> {
|
||||
}
|
||||
|
||||
/// Emits an error to the error handler if the `actual` type is not equal to the `expected` type.
|
||||
pub(crate) fn assert_type(&self, actual: &Option<Type>, expected: &Type, span: Span) {
|
||||
self.check_type(|actual: &Type| actual.eq_flat(expected), expected.to_string(), actual, span)
|
||||
pub(crate) fn assert_type(&mut self, actual: &Option<Type>, expected: &Type, span: Span) {
|
||||
if let Some(actual) = actual {
|
||||
self.check_eq_types(&Some(actual.clone()), &Some(expected.clone()), span);
|
||||
}
|
||||
}
|
||||
|
||||
/// Emits an error to the error handler if the given type is not an address.
|
||||
@ -449,7 +407,7 @@ impl<'a> TypeChecker<'a> {
|
||||
/// Emits an error if the correct number of arguments are not provided.
|
||||
/// Emits an error if the arguments are not of the correct type.
|
||||
pub(crate) fn check_core_function_call(
|
||||
&self,
|
||||
&mut self,
|
||||
core_function: CoreFunction,
|
||||
arguments: &[(Option<Type>, Span)],
|
||||
function_span: Span,
|
||||
@ -1116,60 +1074,11 @@ impl<'a> TypeChecker<'a> {
|
||||
Type::Composite(current_struct)
|
||||
}
|
||||
|
||||
/// Determines if two struct definitions from different programs match or not.
|
||||
pub(crate) fn check_duplicate_struct(&self, name: Symbol, program_1: Symbol, program_2: Symbol) -> bool {
|
||||
// Make sure that both structs have been defined already.
|
||||
let st = self.symbol_table.borrow();
|
||||
let (struct_1, struct_2) = match (
|
||||
st.lookup_struct(Location::new(Some(program_1), name)),
|
||||
st.lookup_struct(Location::new(Some(program_2), name)),
|
||||
) {
|
||||
(Some(struct_1), Some(struct_2)) => (struct_1, struct_2),
|
||||
_ => return false,
|
||||
};
|
||||
|
||||
// Make sure both structs have the same number of members
|
||||
if struct_1.members.len() != struct_2.members.len() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure that all members of the structs match.
|
||||
for (member_1, member_2) in struct_1.members.iter().zip(struct_2.members.iter()) {
|
||||
// Make sure that the member names match.
|
||||
if member_1.identifier.name != member_2.identifier.name {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure that the member types match.
|
||||
if member_1.type_.eq_flat(&member_2.type_) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Recursively check that the member types match in the case that the type is struct.
|
||||
return if let (Type::Composite(internal_struct_1), Type::Composite(internal_struct_2)) =
|
||||
(&member_1.type_, &member_2.type_)
|
||||
{
|
||||
self.check_duplicate_struct(
|
||||
internal_struct_1.id.name,
|
||||
internal_struct_1.program.unwrap(),
|
||||
internal_struct_2.program.unwrap(),
|
||||
)
|
||||
} else {
|
||||
false
|
||||
};
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
/// Emits an error if the struct member is a record type.
|
||||
pub(crate) fn assert_member_is_not_record(&self, span: Span, parent: Symbol, type_: &Type) {
|
||||
pub(crate) fn assert_member_is_not_record(&mut self, span: Span, parent: Symbol, type_: &Type) {
|
||||
match type_ {
|
||||
Type::Composite(struct_)
|
||||
if self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(struct_.program, struct_.id.name))
|
||||
.map_or(false, |struct_| struct_.is_record) =>
|
||||
if self.lookup_struct(struct_.program, struct_.id.name).map_or(false, |struct_| struct_.is_record) =>
|
||||
{
|
||||
self.emit_err(TypeCheckerError::struct_or_record_cannot_contain_record(parent, struct_.id.name, span))
|
||||
}
|
||||
@ -1183,7 +1092,7 @@ impl<'a> TypeChecker<'a> {
|
||||
}
|
||||
|
||||
/// Emits an error if the type or its constituent types is not valid.
|
||||
pub(crate) fn assert_type_is_valid(&self, type_: &Type, span: Span) -> bool {
|
||||
pub(crate) fn assert_type_is_valid(&mut self, type_: &Type, span: Span) -> bool {
|
||||
let mut is_valid = true;
|
||||
match type_ {
|
||||
// String types are temporarily disabled.
|
||||
@ -1192,13 +1101,7 @@ impl<'a> TypeChecker<'a> {
|
||||
self.emit_err(TypeCheckerError::strings_are_not_supported(span));
|
||||
}
|
||||
// Check that the named composite type has been defined.
|
||||
Type::Composite(struct_)
|
||||
if self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(struct_.program, struct_.id.name))
|
||||
.is_none() =>
|
||||
{
|
||||
Type::Composite(struct_) if self.lookup_struct(struct_.program, struct_.id.name).is_none() => {
|
||||
is_valid = false;
|
||||
self.emit_err(TypeCheckerError::undefined_type(struct_.id.name, span));
|
||||
}
|
||||
@ -1230,11 +1133,7 @@ impl<'a> TypeChecker<'a> {
|
||||
// Array elements cannot be records.
|
||||
Type::Composite(struct_type) => {
|
||||
// Look up the type.
|
||||
if let Some(struct_) = self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(struct_type.program, struct_type.id.name))
|
||||
{
|
||||
if let Some(struct_) = self.lookup_struct(struct_type.program, struct_type.id.name) {
|
||||
// Check that the type is not a record.
|
||||
if struct_.is_record {
|
||||
self.emit_err(TypeCheckerError::array_element_cannot_be_record(span));
|
||||
@ -1272,11 +1171,11 @@ impl<'a> TypeChecker<'a> {
|
||||
if self.scope_state.variant == Some(Variant::AsyncFunction) && !self.scope_state.is_stub {
|
||||
// Finalize functions are not allowed to return values.
|
||||
if !function.output.is_empty() {
|
||||
self.emit_err(TypeCheckerError::finalize_function_cannot_return_value(function.span()));
|
||||
self.emit_err(TypeCheckerError::async_function_cannot_return_value(function.span()));
|
||||
}
|
||||
|
||||
// Check that the input types are consistent with when the function is invoked.
|
||||
if let Some(inferred_input_types) = self.finalize_input_types.get(&self.scope_state.location()) {
|
||||
if let Some(inferred_input_types) = self.async_function_input_types.get(&self.scope_state.location()) {
|
||||
// Check same number of inputs as expected.
|
||||
if inferred_input_types.len() != function.input.len() {
|
||||
return self.emit_err(TypeCheckerError::async_function_input_length_mismatch(
|
||||
@ -1286,25 +1185,23 @@ impl<'a> TypeChecker<'a> {
|
||||
));
|
||||
}
|
||||
// Check that the input parameters match the inferred types from when the async function is invoked.
|
||||
function.input.iter().zip_eq(inferred_input_types.iter()).for_each(|(t1, t2)| {
|
||||
if let Internal(fn_input) = t1 {
|
||||
// Allow partial type matching of futures since inferred are fully typed, whereas AST has default futures.
|
||||
if matches!(t2, Type::Future(_)) && matches!(fn_input.type_, Type::Future(_)) {
|
||||
// Insert to symbol table
|
||||
if let Err(err) = self.symbol_table.borrow_mut().insert_variable(
|
||||
Location::new(None, fn_input.identifier.name),
|
||||
VariableSymbol {
|
||||
type_: t2.clone(),
|
||||
span: fn_input.identifier.span(),
|
||||
declaration: VariableType::Input(Public),
|
||||
},
|
||||
) {
|
||||
self.handler.emit_err(err);
|
||||
}
|
||||
for (t1, t2) in function.input.iter().zip_eq(inferred_input_types.iter()) {
|
||||
// Allow partial type matching of futures since inferred are fully typed, whereas AST has default futures.
|
||||
if matches!(t2, Type::Future(_)) && matches!(t1.type_(), Type::Future(_)) {
|
||||
// Insert to symbol table
|
||||
if let Err(err) = self.symbol_table.borrow_mut().insert_variable(
|
||||
Location::new(None, t1.identifier().name),
|
||||
VariableSymbol {
|
||||
type_: t2.clone(),
|
||||
span: t1.identifier.span(),
|
||||
declaration: VariableType::Input(Mode::Public),
|
||||
},
|
||||
) {
|
||||
self.handler.emit_err(err);
|
||||
}
|
||||
self.check_eq_types(&Some(t1.type_()), &Some(t2.clone()), t1.span())
|
||||
}
|
||||
});
|
||||
self.check_eq_types(&Some(t1.type_().clone()), &Some(t2.clone()), t1.span())
|
||||
}
|
||||
} else {
|
||||
self.emit_warning(TypeCheckerWarning::async_function_is_never_called_by_transition_function(
|
||||
function.identifier.name,
|
||||
@ -1316,7 +1213,7 @@ impl<'a> TypeChecker<'a> {
|
||||
// Type check the function's parameters.
|
||||
function.input.iter().enumerate().for_each(|(_index, input_var)| {
|
||||
// Check that the type of input parameter is defined.
|
||||
self.assert_type_is_valid(&input_var.type_(), input_var.span());
|
||||
self.assert_type_is_valid(input_var.type_(), input_var.span());
|
||||
// Check that the type of the input parameter is not a tuple.
|
||||
if matches!(input_var.type_(), Type::Tuple(_)) {
|
||||
self.emit_err(TypeCheckerError::function_cannot_take_tuple_as_input(input_var.span()))
|
||||
@ -1325,9 +1222,7 @@ impl<'a> TypeChecker<'a> {
|
||||
else if let Type::Composite(struct_) = input_var.type_() {
|
||||
// Throw error for undefined type.
|
||||
if !function.variant.is_transition() {
|
||||
if let Some(elem) =
|
||||
self.symbol_table.borrow().lookup_struct(Location::new(struct_.program, struct_.id.name))
|
||||
{
|
||||
if let Some(elem) = self.lookup_struct(struct_.program, struct_.id.name) {
|
||||
if elem.is_record {
|
||||
self.emit_err(TypeCheckerError::function_cannot_input_or_output_a_record(input_var.span()))
|
||||
}
|
||||
@ -1337,37 +1232,38 @@ impl<'a> TypeChecker<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the finalize input parameter is not constant or private.
|
||||
if self.scope_state.variant == Some(Variant::AsyncFunction)
|
||||
&& (input_var.mode() == Mode::Constant || input_var.mode() == Mode::Private)
|
||||
&& (input_var.mode() == Mode::Constant || input_var.mode() == Mode::Private)
|
||||
{
|
||||
self.emit_err(TypeCheckerError::finalize_input_mode_must_be_public(input_var.span()));
|
||||
}
|
||||
|
||||
// Note that this unwrap is safe since we assign to `self.variant` above.
|
||||
match self.scope_state.variant.unwrap() {
|
||||
// If the function is a transition function, then check that the parameter mode is not a constant.
|
||||
Variant::Transition | Variant::AsyncTransition if input_var.mode() == Mode::Constant => {
|
||||
self.emit_err(TypeCheckerError::transition_function_inputs_cannot_be_const(input_var.span()))
|
||||
}
|
||||
// If the function is not a transition function, then check that the parameters do not have an associated mode.
|
||||
// If the function is standard function or inline, then check that the parameters do not have an associated mode.
|
||||
Variant::Function | Variant::Inline if input_var.mode() != Mode::None => {
|
||||
self.emit_err(TypeCheckerError::regular_function_inputs_cannot_have_modes(input_var.span()))
|
||||
}
|
||||
// Async functions cannot have private inputs.
|
||||
Variant::AsyncFunction if input_var.mode() == Mode::Private => {
|
||||
self.emit_err(TypeCheckerError::async_function_input_cannot_be_private(input_var.span()));
|
||||
// If the function is an async function, then check that the input parameter is not constant or private.
|
||||
Variant::AsyncFunction if input_var.mode() == Mode::Constant || input_var.mode() == Mode::Private => {
|
||||
self.emit_err(TypeCheckerError::async_function_input_must_be_public(input_var.span()));
|
||||
}
|
||||
_ => {} // Do nothing.
|
||||
}
|
||||
|
||||
// If the function is not a transition function, then it cannot have a record as input
|
||||
if let Type::Composite(struct_) = input_var.type_() {
|
||||
if let Some(val) = self.lookup_struct(struct_.program, struct_.id.name) {
|
||||
if val.is_record && !function.variant.is_transition() {
|
||||
self.emit_err(TypeCheckerError::function_cannot_input_or_output_a_record(input_var.span()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add function inputs to the symbol table. Futures have already been added.
|
||||
if !matches!(&input_var.type_(), &Type::Future(_)) {
|
||||
if let Err(err) = self.symbol_table.borrow_mut().insert_variable(
|
||||
Location::new(None, input_var.identifier().name),
|
||||
VariableSymbol {
|
||||
type_: input_var.type_(),
|
||||
type_: input_var.type_().clone(),
|
||||
span: input_var.identifier().span(),
|
||||
declaration: VariableType::Input(input_var.mode()),
|
||||
},
|
||||
@ -1379,68 +1275,63 @@ impl<'a> TypeChecker<'a> {
|
||||
|
||||
// Type check the function's return type.
|
||||
// Note that checking that each of the component types are defined is sufficient to check that `output_type` is defined.
|
||||
function.output.iter().enumerate().for_each(|(index, output)| {
|
||||
match output {
|
||||
Output::External(external) => {
|
||||
// If the function is not a transition function, then it cannot output a record.
|
||||
// Note that an external output must always be a record.
|
||||
if !function.variant.is_transition() {
|
||||
self.emit_err(TypeCheckerError::function_cannot_input_or_output_a_record(external.span()));
|
||||
function.output.iter().enumerate().for_each(|(index, function_output)| {
|
||||
// If the function is not a transition function, then it cannot output a record.
|
||||
// Note that an external output must always be a record.
|
||||
if let Type::Composite(struct_) = function_output.type_.clone() {
|
||||
if let Some(val) = self.lookup_struct(struct_.program, struct_.id.name) {
|
||||
if val.is_record && !function.variant.is_transition() {
|
||||
self.emit_err(TypeCheckerError::function_cannot_input_or_output_a_record(function_output.span));
|
||||
}
|
||||
}
|
||||
Output::Internal(function_output) => {
|
||||
// Check that the type of output is defined.
|
||||
if self.assert_type_is_valid(&function_output.type_, function_output.span) {
|
||||
// If the function is not a transition function, then it cannot output a record.
|
||||
if let Type::Composite(struct_) = function_output.type_.clone() {
|
||||
if !function.variant.is_transition()
|
||||
&& self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(struct_.program, struct_.id.name))
|
||||
.unwrap()
|
||||
.is_record
|
||||
{
|
||||
self.emit_err(TypeCheckerError::function_cannot_input_or_output_a_record(
|
||||
function_output.span,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check that the type of the output is not a tuple. This is necessary to forbid nested tuples.
|
||||
if matches!(&function_output.type_, Type::Tuple(_)) {
|
||||
self.emit_err(TypeCheckerError::nested_tuple_type(function_output.span))
|
||||
}
|
||||
// Check that the mode of the output is valid.
|
||||
// For functions, only public and private outputs are allowed
|
||||
if function_output.mode == Mode::Constant {
|
||||
self.emit_err(TypeCheckerError::cannot_have_constant_output_mode(function_output.span));
|
||||
}
|
||||
// Async transitions must return exactly one future, and it must be in the last position.
|
||||
if self.scope_state.variant == Some(AsyncTransition)
|
||||
&& ((index < function.output.len() - 1 && matches!(function_output.type_, Type::Future(_)))
|
||||
|| (index == function.output.len() - 1
|
||||
&& !matches!(function_output.type_, Type::Future(_))))
|
||||
}
|
||||
// Check that the type of output is defined.
|
||||
if self.assert_type_is_valid(&function_output.type_, function_output.span) {
|
||||
// If the function is not a transition function, then it cannot output a record.
|
||||
if let Type::Composite(struct_) = function_output.type_.clone() {
|
||||
if !function.variant.is_transition()
|
||||
&& self.lookup_struct(struct_.program, struct_.id.name).unwrap().is_record
|
||||
{
|
||||
self.emit_err(TypeCheckerError::async_transition_invalid_output(function_output.span));
|
||||
self.emit_err(TypeCheckerError::function_cannot_input_or_output_a_record(function_output.span));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check that the type of the output is not a tuple. This is necessary to forbid nested tuples.
|
||||
if matches!(&function_output.type_, Type::Tuple(_)) {
|
||||
self.emit_err(TypeCheckerError::nested_tuple_type(function_output.span))
|
||||
}
|
||||
// Check that the mode of the output is valid.
|
||||
// For functions, only public and private outputs are allowed
|
||||
if function_output.mode == Mode::Constant {
|
||||
self.emit_err(TypeCheckerError::cannot_have_constant_output_mode(function_output.span));
|
||||
}
|
||||
// Async transitions must return exactly one future, and it must be in the last position.
|
||||
if self.scope_state.variant == Some(Variant::AsyncTransition)
|
||||
&& ((index < function.output.len() - 1 && matches!(function_output.type_, Type::Future(_)))
|
||||
|| (index == function.output.len() - 1 && !matches!(function_output.type_, Type::Future(_))))
|
||||
{
|
||||
self.emit_err(TypeCheckerError::async_transition_invalid_output(function_output.span));
|
||||
}
|
||||
// If the function is not an async transition, then it cannot have a future as output.
|
||||
if self.scope_state.variant != Some(Variant::AsyncTransition) && matches!(function_output.type_, Type::Future(_))
|
||||
{
|
||||
self.emit_err(TypeCheckerError::only_async_transition_can_return_future(function_output.span));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// Emits an error if the type corresponds to an external struct.
|
||||
pub(crate) fn assert_internal_struct(&self, composite: &CompositeType, span: Span) {
|
||||
let st = self.symbol_table.borrow();
|
||||
match st.lookup_struct(Location::new(composite.program, composite.id.name)) {
|
||||
None => self.emit_err(TypeCheckerError::undefined_type(composite.id, span)),
|
||||
Some(composite_def) => {
|
||||
if !composite_def.is_record && composite_def.external.unwrap() != self.scope_state.program_name.unwrap()
|
||||
{
|
||||
self.emit_err(TypeCheckerError::cannot_define_external_struct(composite.id, span))
|
||||
}
|
||||
}
|
||||
/// Wrapper around lookup_struct that additionally records all structs that are used in the program.
|
||||
pub(crate) fn lookup_struct(&mut self, program: Option<Symbol>, name: Symbol) -> Option<Composite> {
|
||||
let struct_ = self
|
||||
.symbol_table
|
||||
.borrow()
|
||||
.lookup_struct(Location::new(program, name), self.scope_state.program_name)
|
||||
.cloned();
|
||||
// Record the usage.
|
||||
if let Some(s) = &struct_ {
|
||||
self.used_structs.insert(s.identifier.name);
|
||||
}
|
||||
struct_
|
||||
}
|
||||
|
||||
/// Type checks the awaiting of a future.
|
||||
@ -1477,12 +1368,12 @@ impl<'a> TypeChecker<'a> {
|
||||
index: usize,
|
||||
span: Span,
|
||||
) {
|
||||
let ty: Type = if let Future(_) = type_ {
|
||||
let ty: Type = if let Type::Future(_) = type_ {
|
||||
// Need to insert the fully inferred future type, or else will just be default future type.
|
||||
let ret = match inferred_type.unwrap() {
|
||||
Future(future) => Future(future),
|
||||
Tuple(tuple) => match tuple.elements().get(index) {
|
||||
Some(Future(future)) => Future(future.clone()),
|
||||
Type::Future(future) => Type::Future(future),
|
||||
Type::Tuple(tuple) => match tuple.elements().get(index) {
|
||||
Some(Type::Future(future)) => Type::Future(future.clone()),
|
||||
_ => unreachable!("Parsing guarantees that the inferred type is a future."),
|
||||
},
|
||||
_ => {
|
||||
|
@ -40,6 +40,9 @@ impl<'a> Pass for TypeChecker<'a> {
|
||||
visitor.visit_program(ast.as_repr());
|
||||
handler.last_err().map_err(|e| *e)?;
|
||||
|
||||
// Remove unused structs from the struct graph.
|
||||
// This prevents unused struct definitions from being included in the generated bytecode.
|
||||
visitor.struct_graph.retain_nodes(&visitor.used_structs);
|
||||
Ok((visitor.symbol_table.take(), visitor.struct_graph, visitor.call_graph))
|
||||
}
|
||||
}
|
||||
|
@ -29,5 +29,5 @@ version = "0.2.1"
|
||||
version = "1.0.1"
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0.197"
|
||||
version = "1.0.198"
|
||||
features = [ "derive", "rc" ]
|
||||
|
@ -38,11 +38,11 @@ version = "0.6.1"
|
||||
version = "2.2.0"
|
||||
|
||||
[dependencies.reqwest]
|
||||
version = "0.12.2"
|
||||
version = "0.12.4"
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0.197"
|
||||
version = "1.0.198"
|
||||
features = [ "derive", "rc" ]
|
||||
|
||||
[dependencies.thiserror]
|
||||
version = "1.0.58"
|
||||
version = "1.0.59"
|
||||
|
@ -146,11 +146,11 @@ create_messages!(
|
||||
help: None,
|
||||
}
|
||||
|
||||
@backtraced
|
||||
@formatted
|
||||
redefining_external_struct {
|
||||
args: (struct_: impl Display),
|
||||
msg: format!("There are two mismatched definitions of struct `{struct_}`."),
|
||||
help: Some("Duplicate definitions of structs are required to use external structs, but each field's name and type must match exactly.".to_string()),
|
||||
msg: format!("There are two definitions of struct `{struct_}` that do not match."),
|
||||
help: Some("Check the import files to see if there are any struct definitions of the same name.".to_string()),
|
||||
}
|
||||
|
||||
@backtraced
|
||||
|
@ -313,7 +313,6 @@ create_messages!(
|
||||
help: None,
|
||||
}
|
||||
|
||||
/// Enforce that cannot use an external type to do anything except input/output of function
|
||||
@formatted
|
||||
external_type_cannot_be_used_inside_function {
|
||||
args: (program: impl Display, file_type: impl Display),
|
||||
|
@ -858,4 +858,11 @@ create_messages!(
|
||||
msg: format!("Cannot use operation `{operation}` on external mapping."),
|
||||
help: Some("The only valid operations on external mappings are contains, get, and get_or_use.".to_string()),
|
||||
}
|
||||
|
||||
@formatted
|
||||
finalize_cannot_assign_outside_conditional {
|
||||
args: (variable: impl Display),
|
||||
msg: format!("Cannot re-assign to `{variable}` from a conditional scope to an outer scope in a finalize block."),
|
||||
help: Some("This is a fundamental restriction that can often be avoided by using a ternary operator `?` or re-declaring the variable in the current scope. In the future, ARC XXXX (https://github.com/AleoHQ/ARCs) will support more complex assignments in finalize blocks.".to_string()),
|
||||
}
|
||||
);
|
||||
|
@ -16,7 +16,7 @@ program battleship.aleo {
|
||||
destroyer: u64,
|
||||
// The address of the opponent.
|
||||
player: address,
|
||||
) -> board.aleo/board_state.record {
|
||||
) -> board.aleo/board_state {
|
||||
// Verify that each individual ship placement bitstring is valid.
|
||||
let valid_carrier: bool = verify.aleo/validate_ship(carrier, 5u64, 31u64, 4311810305u64);
|
||||
assert(valid_carrier);
|
||||
@ -44,22 +44,22 @@ program battleship.aleo {
|
||||
// This function commits a given board to a game with an opponent and creates the initial dummy move.
|
||||
transition offer_battleship(
|
||||
// The board record to start a game with.
|
||||
board: board.aleo/board_state.record,
|
||||
) -> (board.aleo/board_state.record, move.aleo/move.record) {
|
||||
board: board.aleo/board_state,
|
||||
) -> (board.aleo/board_state, move.aleo/move) {
|
||||
let state: board.aleo/board_state = board.aleo/start_board(board);
|
||||
let dummy: move.aleo/move = move.aleo/start_game(board.player_2);
|
||||
|
||||
return (state, dummy);
|
||||
}
|
||||
|
||||
// Returns updated board_state.record that has been started and can no longer be used to join or start new games.
|
||||
// Returns updated board_state that has been started and can no longer be used to join or start new games.
|
||||
// Returns dummy move record owned by the opponent.
|
||||
transition start_battleship(
|
||||
// The board record to play the game with.
|
||||
board: board.aleo/board_state.record,
|
||||
board: board.aleo/board_state,
|
||||
// The move record to play to begin the game. This should be the dummy move record created from offer_battleship.
|
||||
move_start: move.aleo/move.record,
|
||||
) -> (board.aleo/board_state.record, move.aleo/move.record) {
|
||||
move_start: move.aleo/move,
|
||||
) -> (board.aleo/board_state, move.aleo/move) {
|
||||
// Validate that the move players and board players match each other.
|
||||
assert_eq(board.player_1, move_start.player_2);
|
||||
assert_eq(board.player_2, move_start.player_1);
|
||||
@ -74,12 +74,12 @@ program battleship.aleo {
|
||||
// Returns new move record owned by opponent.
|
||||
transition play(
|
||||
// The board record to update.
|
||||
board: board.aleo/board_state.record,
|
||||
board: board.aleo/board_state,
|
||||
// The incoming move from the opponent.
|
||||
move_incoming: move.aleo/move.record,
|
||||
move_incoming: move.aleo/move,
|
||||
// The u64 equivalent of the bitwise representation of the next coordinate to play on the opponent's board.
|
||||
shoot: u64,
|
||||
) -> (board.aleo/board_state.record, move.aleo/move.record) {
|
||||
) -> (board.aleo/board_state, move.aleo/move) {
|
||||
// Verify the board has been started. This prevents players from starting a game and then creating
|
||||
// a brand new board to play with.
|
||||
assert(board.game_started);
|
||||
|
@ -45,7 +45,7 @@ version = "1.0"
|
||||
features = [ "derive" ]
|
||||
|
||||
[dependencies.serial_test]
|
||||
version = "3.0.0"
|
||||
version = "3.1.0"
|
||||
|
||||
[dependencies.toml]
|
||||
version = "0.8"
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 951e0114110d23b297cafc49a243a611b7ea4e084ec49720b8df349b4b636140
|
||||
type_checked_symbol_table: 3a6825875b2cae550b65d4f355ef6414baae16af6c85addc26f3f0da0a6e8c9a
|
||||
unrolled_symbol_table: 3a6825875b2cae550b65d4f355ef6414baae16af6c85addc26f3f0da0a6e8c9a
|
||||
initial_ast: 0dce2e10f5db71839485cc08ed98e10329a3bcbaef64f70241cf5fe9b6937c1f
|
||||
unrolled_ast: 0dce2e10f5db71839485cc08ed98e10329a3bcbaef64f70241cf5fe9b6937c1f
|
||||
ssa_ast: fed466ed0da21b09184b2333c55256f25660833063b84a2491e5dc513bcc8bb2
|
||||
flattened_ast: 1e7101d7d484d85926b898bde6a6528fb56fdb0b6063ed006cc4928521db22ac
|
||||
destructured_ast: bc5b46644525316e2557560b6b839bea2302c1a3811f1b05174b82593a59a1ca
|
||||
inlined_ast: bc5b46644525316e2557560b6b839bea2302c1a3811f1b05174b82593a59a1ca
|
||||
dce_ast: 8f242b13cd1eeb95609fc779ec1276f01a53a6ce24e1890aa3da2ba636a4c88b
|
||||
- initial_symbol_table: 756e2b87734bb537caa46fae8a2b650aab26e96062df959e32e4828535c6affd
|
||||
type_checked_symbol_table: d53bb8960397c6ee70314bcd5a30dbb59d655bda52b4937c16a94af0417fe793
|
||||
unrolled_symbol_table: d53bb8960397c6ee70314bcd5a30dbb59d655bda52b4937c16a94af0417fe793
|
||||
initial_ast: 3e0dce3c7ac38e237c811a557ddf5422d92024cd3a2f9a050f5089fb49e1c0d2
|
||||
unrolled_ast: 3e0dce3c7ac38e237c811a557ddf5422d92024cd3a2f9a050f5089fb49e1c0d2
|
||||
ssa_ast: e4e399f95f533afdcd018463d8a27bc573fcc02dfd11b0e32990e690b98584da
|
||||
flattened_ast: 2b95ef75e175131a082bc796f2b57942c2fb395373c91ef5fbbf1ed70d80a2c3
|
||||
destructured_ast: 6b932fa3264ea209145cb10679089bb14e6f5e667c8cff3b9adef16424e70646
|
||||
inlined_ast: 6b932fa3264ea209145cb10679089bb14e6f5e667c8cff3b9adef16424e70646
|
||||
dce_ast: 23001f440ab4c99e89ac05facdfe45b10206fcc86a80bb11f8108c9b3785151b
|
||||
bytecode: e434c09cee27a5dfb5a4e9e9fd26aa2ba6e7f0653fad3a4f2a7d85983ba559c9
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 3f35643726cd2b07aa420a78617a595622e8fee61d9543ebc4ca0bf5f562caa5
|
||||
type_checked_symbol_table: c1930dabb10b3f851acd57eef08ff97f409419740e5b632acf0105b1e93ee6b0
|
||||
unrolled_symbol_table: c1930dabb10b3f851acd57eef08ff97f409419740e5b632acf0105b1e93ee6b0
|
||||
initial_ast: 1bb0070b60c80e2c1c768a02b377bea1fa03c759f73dc39568ebbcf2c34d9829
|
||||
unrolled_ast: 1bb0070b60c80e2c1c768a02b377bea1fa03c759f73dc39568ebbcf2c34d9829
|
||||
ssa_ast: 3242a2682a29a77d31149d2a0af22d4355eeb239df8ab3326414d0c588b15f37
|
||||
flattened_ast: a71dc86fda82889c2f3940bf08a7bf77ee9c405418cb3bded4f847d82a89d4b5
|
||||
destructured_ast: 851f56d123341353119c1473befefe603fbfadddee37d1e7799c3d4fbf26e4bf
|
||||
inlined_ast: 851f56d123341353119c1473befefe603fbfadddee37d1e7799c3d4fbf26e4bf
|
||||
dce_ast: 851f56d123341353119c1473befefe603fbfadddee37d1e7799c3d4fbf26e4bf
|
||||
- initial_symbol_table: aa5665d4b9e05e78e9181f1bb7e07f98f0009c1f82b29b781173679d0392f75c
|
||||
type_checked_symbol_table: c9a355adf84dd491014c8150453db6edb824f841877c1e912bc659ca15416723
|
||||
unrolled_symbol_table: c9a355adf84dd491014c8150453db6edb824f841877c1e912bc659ca15416723
|
||||
initial_ast: 55ccd130c0fb8317c3ccd6eeafdd9630fdab2447c4368c0f6870ce0f81a60e82
|
||||
unrolled_ast: 55ccd130c0fb8317c3ccd6eeafdd9630fdab2447c4368c0f6870ce0f81a60e82
|
||||
ssa_ast: ec3c124600b30e1bbe9c2745037f4a841ad4d12e9b4ce41f446faa1d7b34be6c
|
||||
flattened_ast: 6ac2d505d4bdb8575e80cea4cb619f5fb22558049d8c122ec5f237a6f6cf20ad
|
||||
destructured_ast: 3b63dde26bf7deafc85a6445ad350d02afa0e23edeb22f605f0e24b4925846bb
|
||||
inlined_ast: 3b63dde26bf7deafc85a6445ad350d02afa0e23edeb22f605f0e24b4925846bb
|
||||
dce_ast: 3b63dde26bf7deafc85a6445ad350d02afa0e23edeb22f605f0e24b4925846bb
|
||||
bytecode: da1b0a83a17b801368b0a583b158d88d9d807a33000c8e89e82da123c8041aea
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 4c2abaff5b21697577b5197109b668e87a40306c4230155199f65399e4a7fae5
|
||||
type_checked_symbol_table: fce31d5f75a9b4ea01b3d57a042e151dd0ffa7fff3a41d6609647cc855d0e8ca
|
||||
unrolled_symbol_table: fce31d5f75a9b4ea01b3d57a042e151dd0ffa7fff3a41d6609647cc855d0e8ca
|
||||
initial_ast: ed8950347dbcfbf8d26a417968f242981a7ae09c170aaa82c5e7eeba4808fcd4
|
||||
unrolled_ast: ed8950347dbcfbf8d26a417968f242981a7ae09c170aaa82c5e7eeba4808fcd4
|
||||
ssa_ast: 8db184a9b32054786d68ef80983d04e0333214436cfce2f9d56a08c6e78a478f
|
||||
flattened_ast: 4e5a6a821a96c8194dcef0bd6c616e0597e435a3886c46dd255f5566f7d09b8c
|
||||
destructured_ast: c6d910254ef63cd0b7beb8c1fd2744c8dc2e5702ac692a0b0ee46d4272641dd3
|
||||
inlined_ast: c6d910254ef63cd0b7beb8c1fd2744c8dc2e5702ac692a0b0ee46d4272641dd3
|
||||
dce_ast: c6d910254ef63cd0b7beb8c1fd2744c8dc2e5702ac692a0b0ee46d4272641dd3
|
||||
- initial_symbol_table: af1b9dd4e2e7f82e1a536bfc53948de3c814fc9ccf61e5115c2109e09cfb2b67
|
||||
type_checked_symbol_table: a87370905b296fa38a2921ce60df21da4670958bcf91d6c236acf70d02343087
|
||||
unrolled_symbol_table: a87370905b296fa38a2921ce60df21da4670958bcf91d6c236acf70d02343087
|
||||
initial_ast: a1b18ca13abd5d553005007013851ea090ce27a325f360f36a087fd7125b1c9b
|
||||
unrolled_ast: a1b18ca13abd5d553005007013851ea090ce27a325f360f36a087fd7125b1c9b
|
||||
ssa_ast: 048c531ce2a9cbecfa2e1ea0479ff3e245adcac3641843092083354074a3eeab
|
||||
flattened_ast: 01c4814b6404c3801fedfd3e54056cb765af01f26209407347826bc3651f9adc
|
||||
destructured_ast: 6ec15e189f4ff47f7b8b18aad652dfb6d440415341b6e8df1f18706f80d9c8b4
|
||||
inlined_ast: 6ec15e189f4ff47f7b8b18aad652dfb6d440415341b6e8df1f18706f80d9c8b4
|
||||
dce_ast: 6ec15e189f4ff47f7b8b18aad652dfb6d440415341b6e8df1f18706f80d9c8b4
|
||||
bytecode: bde2653fac0393940c5400272e53492228206e50abb36ce080b95043003ee976
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 4c2abaff5b21697577b5197109b668e87a40306c4230155199f65399e4a7fae5
|
||||
type_checked_symbol_table: f59ac690784f6dc977aedaa326e50075a55966b293c2ad6e8b096f9066ea44d7
|
||||
unrolled_symbol_table: f59ac690784f6dc977aedaa326e50075a55966b293c2ad6e8b096f9066ea44d7
|
||||
initial_ast: a59e2b26659a5d0d2dde07e1074b87770db51b0cc2681b7a2b748cacf589be78
|
||||
unrolled_ast: a59e2b26659a5d0d2dde07e1074b87770db51b0cc2681b7a2b748cacf589be78
|
||||
ssa_ast: 8ca94639953d46643a50a4382e71476c5a5b2913ff68cd85bfe481338ac62d0b
|
||||
flattened_ast: b81add13f72644b3ad389f74c88cfc9a20f2706546e176c545586b0b2f15b633
|
||||
destructured_ast: 21f348012cb90db57366d295cc95036721a80816f14fe3cbdfc864746774409b
|
||||
inlined_ast: 21f348012cb90db57366d295cc95036721a80816f14fe3cbdfc864746774409b
|
||||
dce_ast: 21f348012cb90db57366d295cc95036721a80816f14fe3cbdfc864746774409b
|
||||
- initial_symbol_table: af1b9dd4e2e7f82e1a536bfc53948de3c814fc9ccf61e5115c2109e09cfb2b67
|
||||
type_checked_symbol_table: a7e0e6793233e6dec4b48137418a894ee322ac0635bccf5376979766adf2bbfa
|
||||
unrolled_symbol_table: a7e0e6793233e6dec4b48137418a894ee322ac0635bccf5376979766adf2bbfa
|
||||
initial_ast: fb145169ad1e437da9a503342918f5793085d4f5355837ac261984c33042831c
|
||||
unrolled_ast: fb145169ad1e437da9a503342918f5793085d4f5355837ac261984c33042831c
|
||||
ssa_ast: 315ce58a6c118e5955412d56ab3d52990475bf2452b8d8e21aba7c7628f59e84
|
||||
flattened_ast: f90ae68ee0bcbd72c41672353efc856b34f166a20a6de512fb70f8217ec5051e
|
||||
destructured_ast: afb641b9398c8b97833609f67e51483893d56505c6c2e64ed4173e79ad226e91
|
||||
inlined_ast: afb641b9398c8b97833609f67e51483893d56505c6c2e64ed4173e79ad226e91
|
||||
dce_ast: afb641b9398c8b97833609f67e51483893d56505c6c2e64ed4173e79ad226e91
|
||||
bytecode: c0b90b7f7e80041dc1a314c1a87290534936018fb001c6e1291266a02393c6f2
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 88a8ff2f354f16881dc7684a079ea9a5fa2adf0e1f2d839e02d94c75ec5d1586
|
||||
type_checked_symbol_table: 0e87e1db2789303438fdcfdba35ac549c221c2f54d84adbd07b14c52bc76073a
|
||||
unrolled_symbol_table: 6286a9d0867cdac3c29b8bd41fdf763eb9a4c3f3d5c739075aa598ba230ac9ba
|
||||
initial_ast: 39ae61c4640c874b18857c71c823770497bd028921e50e894be0de11bb6e24d6
|
||||
unrolled_ast: be6c3781a1a7f25e061513de704d3dc6fbf38e73f131c20193253bd66b4c65c9
|
||||
ssa_ast: bf646978106931fcce1030f23328e7ba80312ea6154aad0c25a5e2c80fbf91e3
|
||||
flattened_ast: 0ff810b8b3dc97e0657c4da64a4560064912ca76c92eb59e62564e6c333dec7b
|
||||
destructured_ast: 6e610e2ba4320a30a9014f054f27de57f25d2cf6853df5bc560874a2af2e4c11
|
||||
inlined_ast: 6e610e2ba4320a30a9014f054f27de57f25d2cf6853df5bc560874a2af2e4c11
|
||||
dce_ast: 6e610e2ba4320a30a9014f054f27de57f25d2cf6853df5bc560874a2af2e4c11
|
||||
- initial_symbol_table: 86cc47c4ae9edafe0811fe203d260ee357a3f7853a2ffbf0a9afc8e911369f51
|
||||
type_checked_symbol_table: d27200bee59ed91be0d42e9c04b8b89a8afb8a8518db3372f0ff65d097967144
|
||||
unrolled_symbol_table: 168951779efa956128e2892c5c3d538b3f34cabec54dd8efb70c4105a22f8edb
|
||||
initial_ast: e638024190743e42d22971bf4a5d2ae071661a5c05a9774f97763362531c3f99
|
||||
unrolled_ast: 9e599c1b6e6ab0b8f32f83b2cb2e327848eb02bca60c782ae40a0bd051bc9662
|
||||
ssa_ast: a43e3ef81113c1d9c70cfbfef5052b4fa26eb2feb8094ce60dd68aff58d6c2b7
|
||||
flattened_ast: 8b353b3efece3f3c00a6742a9706db425d1c93cb2f69be28071917304212d43f
|
||||
destructured_ast: a673e29723f018691dd0f9585836e9b8361b043b1d514961837f0c6099f54eef
|
||||
inlined_ast: a673e29723f018691dd0f9585836e9b8361b043b1d514961837f0c6099f54eef
|
||||
dce_ast: a673e29723f018691dd0f9585836e9b8361b043b1d514961837f0c6099f54eef
|
||||
bytecode: 5f0cb09518f39fc62d32faa38cb42fa04dca2587eaaaa1e0ac30fa9885ce4248
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 994a69e9c9cdabab84e56cbb71e44426ab828e9fd4391ef0a7d4a20842da8f7f
|
||||
type_checked_symbol_table: e16d69137279da8e1af444a12e61c6c0bd97f192c4bebb6dc3aff92c37110a09
|
||||
unrolled_symbol_table: e16d69137279da8e1af444a12e61c6c0bd97f192c4bebb6dc3aff92c37110a09
|
||||
initial_ast: b93f8550acf8a1c02bb861ee31eee8824acdd4dd821ea72ebf33bd8acf776bb1
|
||||
unrolled_ast: b93f8550acf8a1c02bb861ee31eee8824acdd4dd821ea72ebf33bd8acf776bb1
|
||||
ssa_ast: 5307b6870b80c4ad964158ca0eba2c95b43a124c1f54ab34ddb0a7affb653287
|
||||
flattened_ast: 7770d00663c84e224859dae653f356276a7d533d64b4bbc5af09fa0b9f9d8008
|
||||
destructured_ast: e1efb2bb3a4453cf4237deb53c617aa97a9458f7950b49cbedc8cc6395efafa7
|
||||
inlined_ast: e1efb2bb3a4453cf4237deb53c617aa97a9458f7950b49cbedc8cc6395efafa7
|
||||
dce_ast: e1efb2bb3a4453cf4237deb53c617aa97a9458f7950b49cbedc8cc6395efafa7
|
||||
- initial_symbol_table: bbff18546983d05503a84e82edfc8ba43a819761a4966180f364b658bee7c71c
|
||||
type_checked_symbol_table: 68601235ddc6c200098d7374a78da4acbb29d3d5d1a6d67bdb7b5baa7ddfce4c
|
||||
unrolled_symbol_table: 68601235ddc6c200098d7374a78da4acbb29d3d5d1a6d67bdb7b5baa7ddfce4c
|
||||
initial_ast: 994bad0eab3a9fd89b319668c2e45551fc8ca2d0722e751ef8ece6eddd7d11bf
|
||||
unrolled_ast: 994bad0eab3a9fd89b319668c2e45551fc8ca2d0722e751ef8ece6eddd7d11bf
|
||||
ssa_ast: cf69c0c5a757a9387c0100f3cac9ed3292a1b4189a872f7d70cefec4b687f2ec
|
||||
flattened_ast: f83a1302e81bb2ad8737ee001d3e577106774175b87186f4237500db6a1e4e4d
|
||||
destructured_ast: c5f3b9d50a5b6bab1b5a992608653b865f619ec19e95f42fef43ac709f4b3134
|
||||
inlined_ast: c5f3b9d50a5b6bab1b5a992608653b865f619ec19e95f42fef43ac709f4b3134
|
||||
dce_ast: c5f3b9d50a5b6bab1b5a992608653b865f619ec19e95f42fef43ac709f4b3134
|
||||
bytecode: d5ca429014c67ec53c9ce4c200f06611379969892725237b5164737ea8100c12
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 1291a91a90aa118374f06ad4be54ee1f0eb4f46d124bf043fa34086a985f2cc9
|
||||
type_checked_symbol_table: 0ea6b45ef0b7c7b78bec95bdfcfa43cf88e4f9ae2a19adffefa2a14fecaa8beb
|
||||
unrolled_symbol_table: 0ea6b45ef0b7c7b78bec95bdfcfa43cf88e4f9ae2a19adffefa2a14fecaa8beb
|
||||
initial_ast: fd14a36fd901d44e7995cda468f05853f8ae30e892603836d74a1d8ee4fc7578
|
||||
unrolled_ast: fd14a36fd901d44e7995cda468f05853f8ae30e892603836d74a1d8ee4fc7578
|
||||
ssa_ast: 0d72b7e370373fb6537bca11164567195e0d5d2a8f5f3aa4cbc6f486e1578219
|
||||
flattened_ast: b5a945962957e668fcfd4ba6394f48aa7dbe5cc9d327a65d95f05e6daf43df82
|
||||
destructured_ast: 4710554eada5f260f55cd77620be4b73d0d16121408a5cbf13581db2380fe124
|
||||
inlined_ast: 4710554eada5f260f55cd77620be4b73d0d16121408a5cbf13581db2380fe124
|
||||
dce_ast: 4710554eada5f260f55cd77620be4b73d0d16121408a5cbf13581db2380fe124
|
||||
bytecode: a3539a0515c22f4ec653aa601063d7a414db833dc25273cee463985b052b72bc
|
||||
- initial_symbol_table: 4f8ab92e1b0589f9f72c264bded41a74ab81a95c0863bbb2128c2e455f8940ce
|
||||
type_checked_symbol_table: 80855e8466f2d8c141ade84f032cd8e08d31253bd9ed6d5961e22ed21fa60758
|
||||
unrolled_symbol_table: 80855e8466f2d8c141ade84f032cd8e08d31253bd9ed6d5961e22ed21fa60758
|
||||
initial_ast: 85c3840f1f944a2935fb3c72572498e35718479567668c2021b58c351770e687
|
||||
unrolled_ast: 85c3840f1f944a2935fb3c72572498e35718479567668c2021b58c351770e687
|
||||
ssa_ast: d0361696dcc37db64ddb4dd16c46da32544b40473ab527a7ead74006e606aa27
|
||||
flattened_ast: 62ed1887b901a2595b4a0501739273c9a1be99f7087d69dc0c3ea3e3ad7608a3
|
||||
destructured_ast: 1269eb8715c7b65336f707b4a034353214600e240b5771bc1c7ce20630cd8b08
|
||||
inlined_ast: 1269eb8715c7b65336f707b4a034353214600e240b5771bc1c7ce20630cd8b08
|
||||
dce_ast: 1269eb8715c7b65336f707b4a034353214600e240b5771bc1c7ce20630cd8b08
|
||||
bytecode: 96a3dd2c8b423fc1830c547bb318ef7379dd2b3d3ba030142fe344b51c0ecfc2
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 70e685d495d80ed119b5ab9580baa25c9d36cef0fac9777f4942df489e6f23cc
|
||||
type_checked_symbol_table: e96bfff8b85fa61bd3d77a04502acb5b62bbf03258b2c9a5cbb3a3dab3d25d5c
|
||||
unrolled_symbol_table: e96bfff8b85fa61bd3d77a04502acb5b62bbf03258b2c9a5cbb3a3dab3d25d5c
|
||||
initial_ast: 87bcf0e28ba7edc41f0b07a7bead17bbe5328ab2428c46c0482cb651865f13ff
|
||||
unrolled_ast: 87bcf0e28ba7edc41f0b07a7bead17bbe5328ab2428c46c0482cb651865f13ff
|
||||
ssa_ast: 679a4fc4f572152ce040d922439f27337246f275f5dba2e060d84f9597e382dc
|
||||
flattened_ast: 78d5e7f3320b38d0ad0200facfbc40603beeb1ef84bc3c7b11fb30dec5d17412
|
||||
destructured_ast: c175e4d6939f54aba8855253e07ecba75ae7c77ed9e224538cf7d18e322e6f29
|
||||
inlined_ast: 6528b6f4bcd689b7650732ab02c0494134975401be400310aa842e42667455c2
|
||||
dce_ast: 6528b6f4bcd689b7650732ab02c0494134975401be400310aa842e42667455c2
|
||||
- initial_symbol_table: ba3fc19ac12ac6857103131150087f2008db2ed17e29f81333e71448b7460bdc
|
||||
type_checked_symbol_table: e9456a96681c99f57e277529196368b924eb914dcc1e747246eceaa6fe3cda30
|
||||
unrolled_symbol_table: e9456a96681c99f57e277529196368b924eb914dcc1e747246eceaa6fe3cda30
|
||||
initial_ast: d7838abbe0ad26b7a8bc6eae9ab9c0f7be4d180426d060f86e4bb158b7f177a0
|
||||
unrolled_ast: d7838abbe0ad26b7a8bc6eae9ab9c0f7be4d180426d060f86e4bb158b7f177a0
|
||||
ssa_ast: d7d54b8076d9dfe9cf0d87015531ce37dcf3af5bc2849ba783ccbedef88dbfcb
|
||||
flattened_ast: 579cc01e705c2b6d9d1e7622c34a034e3328b8e625fbe0bf541b7bd54ae49d17
|
||||
destructured_ast: db35f913e14ba042c5c5010eecc9e0bbdf46c3e73ca91b302ea8578dc4f60b3e
|
||||
inlined_ast: ebb9563fb18a8a38343a1e264ba17b7b4285f36016a52bde85777fb66b8308e1
|
||||
dce_ast: ebb9563fb18a8a38343a1e264ba17b7b4285f36016a52bde85777fb66b8308e1
|
||||
bytecode: 6d2dea5677417b5359aa082a7ffd6afbbfbba7a3557f7f6011a88d3b93fc8d03
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 8f686b440e1d2cd543e5190759bbdc06182117b97640638f646f216f9f9439fb
|
||||
type_checked_symbol_table: c7af7e465a9243ea067a24ba08c5e6eb261c6529a3268956f2c1b3a57827a5fc
|
||||
unrolled_symbol_table: c7af7e465a9243ea067a24ba08c5e6eb261c6529a3268956f2c1b3a57827a5fc
|
||||
initial_ast: 40a51503f07d56acd1488ed53e376b2e05d1adee3b6a76080eb9ce35203e9865
|
||||
unrolled_ast: 40a51503f07d56acd1488ed53e376b2e05d1adee3b6a76080eb9ce35203e9865
|
||||
ssa_ast: a01a9ec88c7a9ccd9ef3d344ae637c3bca9e0f696cdacaf38cf81103f7a0d788
|
||||
flattened_ast: c35ebc38c080280a6a86ce383316dab7bd74a3c0b88c4c55450f3b6780eab4d6
|
||||
destructured_ast: f7d927407be3b507a14aaeb00ecc6535bb97b73e30ec86d64c5f11e49968608a
|
||||
inlined_ast: f7d927407be3b507a14aaeb00ecc6535bb97b73e30ec86d64c5f11e49968608a
|
||||
dce_ast: f7d927407be3b507a14aaeb00ecc6535bb97b73e30ec86d64c5f11e49968608a
|
||||
- initial_symbol_table: d3153d9d3c9bb2bda13d044f58b950de44094f4e2d76a2a8d8d013294ca2d846
|
||||
type_checked_symbol_table: eef34677156a9fa46022baf27398ad7cf7f378cd772990dadbb567939be5807c
|
||||
unrolled_symbol_table: eef34677156a9fa46022baf27398ad7cf7f378cd772990dadbb567939be5807c
|
||||
initial_ast: ea45d56006d7ddd3c6a7e98aa7f145343703aa3b60e24cedecee209592ea0558
|
||||
unrolled_ast: ea45d56006d7ddd3c6a7e98aa7f145343703aa3b60e24cedecee209592ea0558
|
||||
ssa_ast: ffe35f7b45090d1997fb2865d837e31ac9c385f89c819386bd245a5757d3e2fa
|
||||
flattened_ast: 28e3936f1ae645aa57cc20d946996c1b9a4e715ec8c50c3957d00280b517b4fb
|
||||
destructured_ast: 772c5ec8d0c490932cb4f1baa510284f76af446a220ff119441bb6bfb00133e5
|
||||
inlined_ast: 772c5ec8d0c490932cb4f1baa510284f76af446a220ff119441bb6bfb00133e5
|
||||
dce_ast: 772c5ec8d0c490932cb4f1baa510284f76af446a220ff119441bb6bfb00133e5
|
||||
bytecode: 0871c25bd990602b411e2492035ed37dfd4243251c0b6aed5d0937e00f91ec89
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: abf36ed55f5843ebc1f3242b1022888e489206da4e9fef98ea45206ca87aa9b1
|
||||
type_checked_symbol_table: 7ac4c7922f14871dfefe6f5ab9ffd85c440c495587b4a978e3bb6eb27fdc5dfc
|
||||
unrolled_symbol_table: 7ac4c7922f14871dfefe6f5ab9ffd85c440c495587b4a978e3bb6eb27fdc5dfc
|
||||
initial_ast: 955bf497b346f47653f924b4dadef81cb84f1bfa0a323b7e0a507dd754d67dbf
|
||||
unrolled_ast: 955bf497b346f47653f924b4dadef81cb84f1bfa0a323b7e0a507dd754d67dbf
|
||||
ssa_ast: e0936e2b57582db6d022915179725558a608ec2a9b76aeecdf4d80535664034e
|
||||
flattened_ast: 2c9c3edece96e2561ea166e8d2b1ddcf11fcbe67b6d7fbc515ab30a2b74e55c3
|
||||
destructured_ast: c8c22a39cade77232dbb2c13abd15c10161e4df6569239f866a06d4a17113e47
|
||||
inlined_ast: e4bad473d142300dd19a0aafb71359753d2e02db2d8f5ef44e7148b344f25128
|
||||
dce_ast: e4bad473d142300dd19a0aafb71359753d2e02db2d8f5ef44e7148b344f25128
|
||||
- initial_symbol_table: c6fc8262389c0b237ca6df4e821f4349b7cd99be8c74e2f8e701b65ef04d9dac
|
||||
type_checked_symbol_table: e0fc713c4d1f50fabbe07798887487cb12acf512fb318aa3c23c0ae8975bcb04
|
||||
unrolled_symbol_table: e0fc713c4d1f50fabbe07798887487cb12acf512fb318aa3c23c0ae8975bcb04
|
||||
initial_ast: ce204eee225f30e052b92f0e285d931e94ea5571ac661d83d82adf30139c72cf
|
||||
unrolled_ast: ce204eee225f30e052b92f0e285d931e94ea5571ac661d83d82adf30139c72cf
|
||||
ssa_ast: 03ca65a17d563c58c8649780aee2e497b6ef45e6f1df8e80f4a5ee6a28f43882
|
||||
flattened_ast: fa5ee74c7be755e17165cdd38b0865a5ecb94dad7cd8a81ddb26c9d0ed7ffd5f
|
||||
destructured_ast: c3759b57ebd0d4fc539d1b6f8838e51cc77272bfd23b09e2b39ccd6b22feddaa
|
||||
inlined_ast: fa6fc247bec284c9ecbc8e62406c5a499f0ee73917ca83023813a6e6c7aa3017
|
||||
dce_ast: fa6fc247bec284c9ecbc8e62406c5a499f0ee73917ca83023813a6e6c7aa3017
|
||||
bytecode: 3914a12d8c1225083e703e35499e8c4fccb9dde44d02f0b281c1538ba6f93156
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 70f82278604bffb112d1c69574fe103b6028d92a17355fa962c33ff578cc0dd4
|
||||
type_checked_symbol_table: 5d30bcdba029ab2b8623a67f3615905535822dd2e1e2c382b208b46a287f1378
|
||||
unrolled_symbol_table: 5d30bcdba029ab2b8623a67f3615905535822dd2e1e2c382b208b46a287f1378
|
||||
initial_ast: a97de2c42995479c99a0dff4eb94b6b49e95326f07bad36322f39d772749d2f3
|
||||
unrolled_ast: a97de2c42995479c99a0dff4eb94b6b49e95326f07bad36322f39d772749d2f3
|
||||
ssa_ast: de184802ff5f549b150cd8ad5b5d3cda5279559f5b758835b0ed0739166c30e7
|
||||
flattened_ast: d5ea0b2bb81b3471cc8db8ab1c7d39f42eb75d553e6dc9721a1f6ffcd20432f2
|
||||
destructured_ast: 9abafc1a32bfdaa41ed04e463f9ff7ba392cacf96902514ef9f13356519a4270
|
||||
inlined_ast: 9abafc1a32bfdaa41ed04e463f9ff7ba392cacf96902514ef9f13356519a4270
|
||||
dce_ast: 9abafc1a32bfdaa41ed04e463f9ff7ba392cacf96902514ef9f13356519a4270
|
||||
- initial_symbol_table: 55de67e7f0caf5fcb2a3871448a83fee766b22b96eeaa1d5d172d2456b55688b
|
||||
type_checked_symbol_table: 613bad49201700a62fe19d05bba61f39b48b2635ed657fee6e20475fa29c6ed8
|
||||
unrolled_symbol_table: 613bad49201700a62fe19d05bba61f39b48b2635ed657fee6e20475fa29c6ed8
|
||||
initial_ast: 51b578b772c900066283e01863cf3b96d894d50aa2d9323f830e8cd83a0b487b
|
||||
unrolled_ast: 51b578b772c900066283e01863cf3b96d894d50aa2d9323f830e8cd83a0b487b
|
||||
ssa_ast: aa32ba8a21c90c8070ada697e720e87ca3f858feabe71a36d5ad769f3ff275c4
|
||||
flattened_ast: c768aef56ba8c31205dd30930fbdc1b923ac541e070fd18ede0aba30f1514b01
|
||||
destructured_ast: f53c800f3654d52fdbf46067aa93ba6f0501c1565b2ed911239cfc1813ee1e73
|
||||
inlined_ast: f53c800f3654d52fdbf46067aa93ba6f0501c1565b2ed911239cfc1813ee1e73
|
||||
dce_ast: f53c800f3654d52fdbf46067aa93ba6f0501c1565b2ed911239cfc1813ee1e73
|
||||
bytecode: 5adcc7b9450eedbada20f55565a821769e58c3cacb624d7e45061693d167a079
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [ETYC0372007]: Expected one type from `[boolean; 8]`, but got `[boolean; 7]`\n --> compiler-test:5:16\n |\n 5 | return [a, a, a, a, a, a, a];\n | ^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `u8`, but got `u32`\n --> compiler-test:9:52\n |\n 9 | return [1u8, 2u8, 3u8, 4u8, 5u8, 6u8, 7u8, 8u32];\n | ^^^^\n"
|
||||
- "Error [ETYC0372003]: Expected type `[boolean; 8]` but type `[boolean; 7]` was found\n --> compiler-test:5:16\n |\n 5 | return [a, a, a, a, a, a, a];\n | ^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `u32` was found\n --> compiler-test:9:52\n |\n 9 | return [1u8, 2u8, 3u8, 4u8, 5u8, 6u8, 7u8, 8u32];\n | ^^^^\n"
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: cc524ab0524f4e93e969758157bb3dd1caaae1c740cffac0b4e35edd15de762d
|
||||
type_checked_symbol_table: 441877c82d8468247a7f62b202bba12cf0fb4f3f6a82d22c2ad8b82814c467a9
|
||||
unrolled_symbol_table: 441877c82d8468247a7f62b202bba12cf0fb4f3f6a82d22c2ad8b82814c467a9
|
||||
initial_ast: b535ad589ab03c8e87e686babd955478e13b0f9c12e9681ec83a33c8d0747b4b
|
||||
unrolled_ast: b535ad589ab03c8e87e686babd955478e13b0f9c12e9681ec83a33c8d0747b4b
|
||||
ssa_ast: 57ce7348c46c7c77089f3c5c3c41a5baac1ccf1e0993b97834ef03af80512a69
|
||||
flattened_ast: caecde473ba965b65b059d7bd0498181d3cedd12403295d6ac344f006788ee49
|
||||
destructured_ast: 2e131d8b41206e76acd1acc71b6f90f78dd2f1c358d775406c251d02dfb8bcb5
|
||||
inlined_ast: 2e131d8b41206e76acd1acc71b6f90f78dd2f1c358d775406c251d02dfb8bcb5
|
||||
dce_ast: 2e131d8b41206e76acd1acc71b6f90f78dd2f1c358d775406c251d02dfb8bcb5
|
||||
- initial_symbol_table: 2810f9059b0a96a9416ee2a7212debabcb4bc6802095bdff039065d3fda7f3c7
|
||||
type_checked_symbol_table: b6307badfe522266447d5503e92045f5935d26a0c13cbcc7d78f0da6b6128a0b
|
||||
unrolled_symbol_table: b6307badfe522266447d5503e92045f5935d26a0c13cbcc7d78f0da6b6128a0b
|
||||
initial_ast: c5174335068d386bf09f1613ddc2765ab788afbce0a83dc94c8197d792570324
|
||||
unrolled_ast: c5174335068d386bf09f1613ddc2765ab788afbce0a83dc94c8197d792570324
|
||||
ssa_ast: ec179cc367b277c201b59fc08a6063297f826e09867caf663f30629a0d6bc8e4
|
||||
flattened_ast: cdd4b046fda370d0630b92e41a7544214dd31b5b58c830f40ac93c5b4e33e542
|
||||
destructured_ast: 19737108a3b3f9a45517e31a0d273c74ae5cda9c8bc86480c96317e6cd33d478
|
||||
inlined_ast: 19737108a3b3f9a45517e31a0d273c74ae5cda9c8bc86480c96317e6cd33d478
|
||||
dce_ast: 19737108a3b3f9a45517e31a0d273c74ae5cda9c8bc86480c96317e6cd33d478
|
||||
bytecode: 53499e77217ba5d8d146384234cbed9abe5c47abcbfe547f7bff6fbef4194a56
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 7dbe7c24a1ebacb04fe3abf727465e3644f01f3ba6af3eb4cf67d31ec2d106f9
|
||||
type_checked_symbol_table: 03664c610b8f5c3fa99a9127998bc9f69839104486c05b2389258a7104c312d2
|
||||
unrolled_symbol_table: 03664c610b8f5c3fa99a9127998bc9f69839104486c05b2389258a7104c312d2
|
||||
initial_ast: f77c072a2483b8777d1e14d772c3a1699b80126d3cafcc65a28dcdab84874e89
|
||||
unrolled_ast: f77c072a2483b8777d1e14d772c3a1699b80126d3cafcc65a28dcdab84874e89
|
||||
ssa_ast: e866e3eabbc719b2f4f94f1be63911de4ded1c85563cd0c45be052ae4aafd35f
|
||||
flattened_ast: d522d3c288c1498ffd652fb2a4ad15c3062c284d8fdd7df38d213b1c950ca3e2
|
||||
destructured_ast: 56e9f0b79ea83395c7a20e15f534a8cb8398f1fde5a1467c56d2f845acd02ed2
|
||||
inlined_ast: 56e9f0b79ea83395c7a20e15f534a8cb8398f1fde5a1467c56d2f845acd02ed2
|
||||
dce_ast: 56e9f0b79ea83395c7a20e15f534a8cb8398f1fde5a1467c56d2f845acd02ed2
|
||||
- initial_symbol_table: a3b393d4d2e51b53c5987cd958d821983658c755d21235d09c43dbde9b8e9c41
|
||||
type_checked_symbol_table: 15c3df980bfbc43752b6c09a98536dfb3a0804f116c3e9bdf93423771fe50068
|
||||
unrolled_symbol_table: 15c3df980bfbc43752b6c09a98536dfb3a0804f116c3e9bdf93423771fe50068
|
||||
initial_ast: 01ba2ed0dbbaf22997296a20adcec7b7c560178815dc6e627f7f8094943e3478
|
||||
unrolled_ast: 01ba2ed0dbbaf22997296a20adcec7b7c560178815dc6e627f7f8094943e3478
|
||||
ssa_ast: bbbe8bb7d4113353990307e429133d9e85252740801d8004dcb2b796035db8f0
|
||||
flattened_ast: 48e6ffa711f1250106f70abd6e2f729c54e4e95ec8b54a4f4a0f4e280351de25
|
||||
destructured_ast: edd8a5eee97046c6e0ce96e43c20078827e04389bb74f703dbe8a6f4de367783
|
||||
inlined_ast: edd8a5eee97046c6e0ce96e43c20078827e04389bb74f703dbe8a6f4de367783
|
||||
dce_ast: edd8a5eee97046c6e0ce96e43c20078827e04389bb74f703dbe8a6f4de367783
|
||||
bytecode: 87676231f14ea25fc123a2569754b9ff0dca4a4f7cee0eb4ed6419174dd0af4c
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: bd10063c57991ab406a4d0ed78569254ff3296c4e22dec59f23b5f5683698704
|
||||
type_checked_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
unrolled_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
initial_ast: 4211fd2afa8b49f29654164ba4a1013c789c9e56bbbab81991246029c42b2b1e
|
||||
unrolled_ast: 4211fd2afa8b49f29654164ba4a1013c789c9e56bbbab81991246029c42b2b1e
|
||||
ssa_ast: b2cacb5e41cca31970c79a3b38aae2f1011e2524d3418d59dea48a504f427d00
|
||||
flattened_ast: 57ce47c3c696e3a756f07d9612c4f476cb9fb2c7605330f46d4b1160c527f65a
|
||||
destructured_ast: c29c89d3a0c19970df63e26418453b8709ff3fb6bbb3af4b74abb1a9f18b5539
|
||||
inlined_ast: c29c89d3a0c19970df63e26418453b8709ff3fb6bbb3af4b74abb1a9f18b5539
|
||||
dce_ast: c29c89d3a0c19970df63e26418453b8709ff3fb6bbb3af4b74abb1a9f18b5539
|
||||
- initial_symbol_table: 1b5c611464ecf9e3bdafa92a46c5b9d7ff2f75b57aba7e90eced6f363fb580a1
|
||||
type_checked_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
unrolled_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
initial_ast: eaad5ac882c9ab1f4f88a2460e59f856458cb83517dfef68a07dc5cf3d11c7e3
|
||||
unrolled_ast: eaad5ac882c9ab1f4f88a2460e59f856458cb83517dfef68a07dc5cf3d11c7e3
|
||||
ssa_ast: 690eacae3ba50c90ea847823283c225380fd162468c448ca176d206724f9b486
|
||||
flattened_ast: 2acb2f118de37e8c8bccdefa4c557b9aa29e9a1ccb3ec75ba5a37a8ebe771e32
|
||||
destructured_ast: 7188aa240e3316581a7e7e84d12a8ebc7cbbcdfcb373c0e69b4cf50a163f0455
|
||||
inlined_ast: 7188aa240e3316581a7e7e84d12a8ebc7cbbcdfcb373c0e69b4cf50a163f0455
|
||||
dce_ast: 7188aa240e3316581a7e7e84d12a8ebc7cbbcdfcb373c0e69b4cf50a163f0455
|
||||
bytecode: 134904b86b96581876c2ca0c6ead651dda0dc9f2fb6dc583400133410b7deede
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: bd10063c57991ab406a4d0ed78569254ff3296c4e22dec59f23b5f5683698704
|
||||
type_checked_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
unrolled_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
initial_ast: 0d8dda87869714e40756fd2f98510d272650aaa22fa3d52102e2d3a0f581bf6d
|
||||
unrolled_ast: 0d8dda87869714e40756fd2f98510d272650aaa22fa3d52102e2d3a0f581bf6d
|
||||
ssa_ast: 25b083a522a1f43a2644fb462797a2f4d9e575846652b2f970f02337c3dc7569
|
||||
flattened_ast: 77fba1f1b2ce5fcbe011e36806937612525ab106fb65575c667afcf051741656
|
||||
destructured_ast: af919e48fb51788ddae4a76961da635623877f7270fc2948bb96c6a4aebda245
|
||||
inlined_ast: af919e48fb51788ddae4a76961da635623877f7270fc2948bb96c6a4aebda245
|
||||
dce_ast: af919e48fb51788ddae4a76961da635623877f7270fc2948bb96c6a4aebda245
|
||||
- initial_symbol_table: 1b5c611464ecf9e3bdafa92a46c5b9d7ff2f75b57aba7e90eced6f363fb580a1
|
||||
type_checked_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
unrolled_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
initial_ast: 5f26db89efd720e9fd89f93107a5096ef7f600e769e44b01a6b43d86ed849de0
|
||||
unrolled_ast: 5f26db89efd720e9fd89f93107a5096ef7f600e769e44b01a6b43d86ed849de0
|
||||
ssa_ast: e5974a0e1add0fbde6f86104bed47aae9bb59b8b131b46c7f77489336dff21b0
|
||||
flattened_ast: 61bed3f773821b1b80eda03f5a05d5bfb12399db89bf9f93c248aa09b5b250f6
|
||||
destructured_ast: 00481fd379ca20887a4b45be2ef03ff42a27954cf22e2494882a390b9f42bce8
|
||||
inlined_ast: 00481fd379ca20887a4b45be2ef03ff42a27954cf22e2494882a390b9f42bce8
|
||||
dce_ast: 00481fd379ca20887a4b45be2ef03ff42a27954cf22e2494882a390b9f42bce8
|
||||
bytecode: 56a9fa48a00d1b38b6f60a93ef2168b2c0ce9c23ba3cb7bffa40debfc1b16180
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: bd10063c57991ab406a4d0ed78569254ff3296c4e22dec59f23b5f5683698704
|
||||
type_checked_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
unrolled_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
initial_ast: b5d6bd78a15f45ab391eab1ad69ea09a430e15cc57cf7247129d0a8647b729df
|
||||
unrolled_ast: b5d6bd78a15f45ab391eab1ad69ea09a430e15cc57cf7247129d0a8647b729df
|
||||
ssa_ast: 47dc208e70efa04694b2abcf8a43cf26bdffae50a3a0a095d50c54e4fac3802c
|
||||
flattened_ast: 98fafaee7aae3e3717cb2fd86e18b1e7c2bc05ba7665528365ede914b5904f40
|
||||
destructured_ast: b1c1205ee4abc7a755373da17529b3c538151a3ad7e33387a0e1305792de5cce
|
||||
inlined_ast: b1c1205ee4abc7a755373da17529b3c538151a3ad7e33387a0e1305792de5cce
|
||||
dce_ast: b1c1205ee4abc7a755373da17529b3c538151a3ad7e33387a0e1305792de5cce
|
||||
- initial_symbol_table: 1b5c611464ecf9e3bdafa92a46c5b9d7ff2f75b57aba7e90eced6f363fb580a1
|
||||
type_checked_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
unrolled_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
initial_ast: 62350ccf85cc0e5ebaa8fb5103845b87d70165e0bc3153bfaf2e42ef6b85505b
|
||||
unrolled_ast: 62350ccf85cc0e5ebaa8fb5103845b87d70165e0bc3153bfaf2e42ef6b85505b
|
||||
ssa_ast: 1b2d39677eea7198dd46956061d8bac6c36ed700e45be42354af9a7bc4548bd9
|
||||
flattened_ast: 198e38a41d0504a079c98e6a4898e2a94442d9ffdd767f0b04873125972f75f5
|
||||
destructured_ast: 41812b545fb9f9539b4721f3e42bf57df57bbc097869a9993ca48fc89af07d7b
|
||||
inlined_ast: 41812b545fb9f9539b4721f3e42bf57df57bbc097869a9993ca48fc89af07d7b
|
||||
dce_ast: 41812b545fb9f9539b4721f3e42bf57df57bbc097869a9993ca48fc89af07d7b
|
||||
bytecode: 2332d5b7ed9910dc65c885e1aeedbbde00e02d95a55caa300a9cb72456707034
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: bd10063c57991ab406a4d0ed78569254ff3296c4e22dec59f23b5f5683698704
|
||||
type_checked_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
unrolled_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
initial_ast: 9832f7af734c0240c484d0c2daffc26aa891f74f75f9bc082c2f36f5985240e6
|
||||
unrolled_ast: 9832f7af734c0240c484d0c2daffc26aa891f74f75f9bc082c2f36f5985240e6
|
||||
ssa_ast: 4a4ffea8c607062010c1174fc0dcd1b9297125099ae63821f9a7c89dc9eff8ab
|
||||
flattened_ast: f590a0089fbc846a060d737f2d6bd585cf423843ccd56b04d8768d48b8dc17e7
|
||||
destructured_ast: 881aece8c88d9509eabf565698cd54259ae40632db3bb4b8d28c7e4db181833a
|
||||
inlined_ast: 881aece8c88d9509eabf565698cd54259ae40632db3bb4b8d28c7e4db181833a
|
||||
dce_ast: 881aece8c88d9509eabf565698cd54259ae40632db3bb4b8d28c7e4db181833a
|
||||
- initial_symbol_table: 1b5c611464ecf9e3bdafa92a46c5b9d7ff2f75b57aba7e90eced6f363fb580a1
|
||||
type_checked_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
unrolled_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
initial_ast: 5fd20de6d0cdad3eabf5467f323426da3ccb6e1ea08a2a7fc95457ee7e10fa56
|
||||
unrolled_ast: 5fd20de6d0cdad3eabf5467f323426da3ccb6e1ea08a2a7fc95457ee7e10fa56
|
||||
ssa_ast: 5f72b32831de268d754e859875b8d55d2d9c41b93e8004b35e4a77bda3641dd9
|
||||
flattened_ast: 880b09f5d0a626bfcd3312e2cfd75889a3ad8bfad901110c3a9008397b696bb3
|
||||
destructured_ast: 595f46c5f74c3ebf5da3dac2142637a7073ef1f3af8771ed9c12004de481eb3d
|
||||
inlined_ast: 595f46c5f74c3ebf5da3dac2142637a7073ef1f3af8771ed9c12004de481eb3d
|
||||
dce_ast: 595f46c5f74c3ebf5da3dac2142637a7073ef1f3af8771ed9c12004de481eb3d
|
||||
bytecode: 990eee0b87d70df046bad969201ad8afabff10162eb70c00f837fde81fed4104
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: bd10063c57991ab406a4d0ed78569254ff3296c4e22dec59f23b5f5683698704
|
||||
type_checked_symbol_table: d2b055e782e24494e1a03542237e630d726006d340be60d2a57d061c2aff1205
|
||||
unrolled_symbol_table: d2b055e782e24494e1a03542237e630d726006d340be60d2a57d061c2aff1205
|
||||
initial_ast: c97a474d84294eeef08309b35ad687acc562fa138ab6ba66dbd099449c470d92
|
||||
unrolled_ast: c97a474d84294eeef08309b35ad687acc562fa138ab6ba66dbd099449c470d92
|
||||
ssa_ast: d5dc0dfaae664f6f6a6429fa26b5f93949d9eaf011650cc77eea4e44a7a7ee77
|
||||
flattened_ast: b62534ac3f8a00e1ab60be2f43416047f63be07b55e5fc1dc65e410fa5e17ece
|
||||
destructured_ast: 7a742b9a3f2a47241e09f3f0ba1fbf9beddb39dd03070578869e4733d176d5c4
|
||||
inlined_ast: 7a742b9a3f2a47241e09f3f0ba1fbf9beddb39dd03070578869e4733d176d5c4
|
||||
dce_ast: b58413720432c2e9194aba0ff77579cc75ad2496d65841a183a1ab7cd697f195
|
||||
- initial_symbol_table: 1b5c611464ecf9e3bdafa92a46c5b9d7ff2f75b57aba7e90eced6f363fb580a1
|
||||
type_checked_symbol_table: 784af104f55654a81e3c2546a1eab0fdbdd208681567d89e9b9286ab1a75cac3
|
||||
unrolled_symbol_table: 784af104f55654a81e3c2546a1eab0fdbdd208681567d89e9b9286ab1a75cac3
|
||||
initial_ast: 4d8dac42b745182842d0699c703b8cd4bb875da014b3d93f993779020f643e59
|
||||
unrolled_ast: 4d8dac42b745182842d0699c703b8cd4bb875da014b3d93f993779020f643e59
|
||||
ssa_ast: 198d0af4f4d9aeaab70de4df15b8a15e87078a19d164afeb612c4fac256c7908
|
||||
flattened_ast: 8e67e164404e6fcbc4918492660dc59572103060be8141be63a058139cfded43
|
||||
destructured_ast: 58d1e81d725b83b56d365add74a33f083d364f1b9842c639621ea95339605d70
|
||||
inlined_ast: 58d1e81d725b83b56d365add74a33f083d364f1b9842c639621ea95339605d70
|
||||
dce_ast: fbe283e571b7a63ca2d2ac2c0001e1ced041e7ee1866c92c8046138363400239
|
||||
bytecode: bb260232bbd0ccede368961a31abeef5edc7e00cab3348b4b8518d4e5798a6b5
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: bd10063c57991ab406a4d0ed78569254ff3296c4e22dec59f23b5f5683698704
|
||||
type_checked_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
unrolled_symbol_table: ebd01f7299929e2253c4f53ad0ae2f0f4b14cf1bc3e4087b59ba2c67c4f78b40
|
||||
initial_ast: 8289a856e0dd13b4b6d559b8640827fced50219833fe76b3892eb8974e1aa0db
|
||||
unrolled_ast: 8289a856e0dd13b4b6d559b8640827fced50219833fe76b3892eb8974e1aa0db
|
||||
ssa_ast: aead09e24ea21c7a93f2b0cce2a81dff5d2622280a77fac258b070d7b369eef2
|
||||
flattened_ast: 94fd586fed2536fa9a5b93b637fe7b84da4b1086d279ff093d06c84626ea310c
|
||||
destructured_ast: 7d71ea026bfda2662006a42d7269ba2342f7388c0275bf1e31ab26ee9455d937
|
||||
inlined_ast: 7d71ea026bfda2662006a42d7269ba2342f7388c0275bf1e31ab26ee9455d937
|
||||
dce_ast: 7d71ea026bfda2662006a42d7269ba2342f7388c0275bf1e31ab26ee9455d937
|
||||
- initial_symbol_table: 1b5c611464ecf9e3bdafa92a46c5b9d7ff2f75b57aba7e90eced6f363fb580a1
|
||||
type_checked_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
unrolled_symbol_table: 29a17f191dd193447c1182ec08351227f100183d7fbe41bdf4b113e0f304e33e
|
||||
initial_ast: a7a40fd49b89c3e4b8b427a81384d52bee87a6de9be4d323faaf6c56c201f05b
|
||||
unrolled_ast: a7a40fd49b89c3e4b8b427a81384d52bee87a6de9be4d323faaf6c56c201f05b
|
||||
ssa_ast: b4e000a08d956d72c31cdc7e4d41be3a0c7be7c174a625f4c59f8d0422834291
|
||||
flattened_ast: 46355d55070db6206d101b33c93a643a7fae8efe6501b8d2062ec22866e01f10
|
||||
destructured_ast: 920af3171d61da86d9ae1803e344bfbf48c0273f449de1c4db1dcbaf5f2cef75
|
||||
inlined_ast: 920af3171d61da86d9ae1803e344bfbf48c0273f449de1c4db1dcbaf5f2cef75
|
||||
dce_ast: 920af3171d61da86d9ae1803e344bfbf48c0273f449de1c4db1dcbaf5f2cef75
|
||||
bytecode: c3a0c03f4324a6dd6baea42e664ffad91868714739e03525dcbc968582007ceb
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: cc0ace51fc7bdb52fb3af1d348c2a02bc30392dc5b77e3d07c435275a71bbded
|
||||
type_checked_symbol_table: b6e95b2f1deb42b782c3fce0f39f36b830e9fdf5ffd9cdcae210da52fd427937
|
||||
unrolled_symbol_table: b6e95b2f1deb42b782c3fce0f39f36b830e9fdf5ffd9cdcae210da52fd427937
|
||||
initial_ast: 82f9d9a2c3127798eb8dabe92a46c7c5eb91158a6dcd6d2fba4bcd8ac85b39f4
|
||||
unrolled_ast: 82f9d9a2c3127798eb8dabe92a46c7c5eb91158a6dcd6d2fba4bcd8ac85b39f4
|
||||
ssa_ast: 09780e810d37a7b20498d017ef2c5a1f5ae6b17e3653815db7303f32771355dd
|
||||
flattened_ast: 6b73daf0fa5555e06fb3bd1ddd35f349acd0a6dc59793ec7cee3192845d3f0ec
|
||||
destructured_ast: 523cc1deae6e01659e061d875157d9d2168caa54cfec0becbe98886347a32082
|
||||
inlined_ast: 523cc1deae6e01659e061d875157d9d2168caa54cfec0becbe98886347a32082
|
||||
dce_ast: 523cc1deae6e01659e061d875157d9d2168caa54cfec0becbe98886347a32082
|
||||
- initial_symbol_table: e842df421595b3b67809502efd4090ad62f3a1c381caff3e87fdb0db1d8f05e3
|
||||
type_checked_symbol_table: 488dfeda4033ab38d660e18201b8374a0afdab04b361438010b4f781d34246b7
|
||||
unrolled_symbol_table: 488dfeda4033ab38d660e18201b8374a0afdab04b361438010b4f781d34246b7
|
||||
initial_ast: 6d7ed631427a4ab10f27d2452a1964ad467c76d926d7728a879ecc04dc1cf223
|
||||
unrolled_ast: 6d7ed631427a4ab10f27d2452a1964ad467c76d926d7728a879ecc04dc1cf223
|
||||
ssa_ast: 127fc107ad2d3bfd8d45ee0776aa87d5ceb98ea74021834e0a2be91b3aabc2ab
|
||||
flattened_ast: 384b9c3dc0e6dd88220902841f0b60485d5618eb8c294fad74fa50e695354778
|
||||
destructured_ast: 0df4d5d73bcbbc4eb62ed67c5b14d1b8838ccef0a38617f9bffae87e9e8f61d2
|
||||
inlined_ast: 0df4d5d73bcbbc4eb62ed67c5b14d1b8838ccef0a38617f9bffae87e9e8f61d2
|
||||
dce_ast: 0df4d5d73bcbbc4eb62ed67c5b14d1b8838ccef0a38617f9bffae87e9e8f61d2
|
||||
bytecode: 3c391009be59588562aa4a34d1b00508cd253c94d35a66741962352c76a92633
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0bed2aa2800ab9ab710aa8e64ee5f567bc7a420feaf6a6dc24c671465eec85c
|
||||
type_checked_symbol_table: 2c1513724ca91ce0ed7080a1eff4315e3317b9eae0c231ea5f1b3f1633e3f259
|
||||
unrolled_symbol_table: 2c1513724ca91ce0ed7080a1eff4315e3317b9eae0c231ea5f1b3f1633e3f259
|
||||
initial_ast: 9f47a2232ae221ef48e0d1f163c79ddf4b7082cbf305b1f4819a397dd2bc87c8
|
||||
unrolled_ast: 9f47a2232ae221ef48e0d1f163c79ddf4b7082cbf305b1f4819a397dd2bc87c8
|
||||
ssa_ast: e68b1ccbbdf9c74e701eda8754220a4ccd74da3fa92cea72dd617b324fcd0360
|
||||
flattened_ast: 604f03baf34c2d8f7c4a1bf20fff796f3fbb2dcaee1ae6b659203d0a2ca0fc06
|
||||
destructured_ast: c75a437a3a2368242dbd0855ef66cf83f42e62ff2b1beec56fd67c55bc1a9ae8
|
||||
inlined_ast: c75a437a3a2368242dbd0855ef66cf83f42e62ff2b1beec56fd67c55bc1a9ae8
|
||||
dce_ast: c75a437a3a2368242dbd0855ef66cf83f42e62ff2b1beec56fd67c55bc1a9ae8
|
||||
- initial_symbol_table: fe88d0b4607c83e6ad15970976a4b53d4805409c31cf4f130c800a94ee42c95a
|
||||
type_checked_symbol_table: b4995f1268d8d8bbcaadf5f2c28c1a198b7f858d1890f11684ab0c68bdbba5aa
|
||||
unrolled_symbol_table: b4995f1268d8d8bbcaadf5f2c28c1a198b7f858d1890f11684ab0c68bdbba5aa
|
||||
initial_ast: ba67a500726316de1c9fc21a11c793b2af8c1d356b129aa0e4daca8e97685ef6
|
||||
unrolled_ast: ba67a500726316de1c9fc21a11c793b2af8c1d356b129aa0e4daca8e97685ef6
|
||||
ssa_ast: d0458d630038e53c60b016d68897fbb8f7cbaacdcf55ae82a7b57499f2a14a8c
|
||||
flattened_ast: ec3e1d4aa7dbc4761eb4bd30e1e44705888b55b549dcdfc9b680dcb0c2353e5d
|
||||
destructured_ast: 6ebb454d42a584471202278aa170bb7a16a72ac1cc2d8da4045e081abe047b7b
|
||||
inlined_ast: 6ebb454d42a584471202278aa170bb7a16a72ac1cc2d8da4045e081abe047b7b
|
||||
dce_ast: 6ebb454d42a584471202278aa170bb7a16a72ac1cc2d8da4045e081abe047b7b
|
||||
bytecode: 3ff716b96c532801f4fa5310f4eedf8f96fe15bd7db3bf087e7b64a161153945
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -6,13 +6,13 @@ outputs:
|
||||
- initial_symbol_table: 7b7639da9364ec7e9fbdbeca060c73f5f0d338486b6d823b0b4704d23f9427ab
|
||||
type_checked_symbol_table: 0802a02c884f0c8c409af2c2e5832393edc51a289dd6eebfebfc4ce2de29ba65
|
||||
unrolled_symbol_table: 435885a17bd622f24f237a8d2eb4ee510a4977dbabd380530ae0d2e8cac26101
|
||||
initial_ast: f869a6367fce6da2877d7b93ebdc2237cace8c4fee4ed78b56f4e34915c33044
|
||||
unrolled_ast: 392c16f3801e0b877b2588423b77048e06c5e495fe3bfc22aa39a3d65f5def00
|
||||
ssa_ast: f5544e125cc31c03bbce4423308625e45c4564032b639d58bf773e5bfac4b877
|
||||
flattened_ast: 04f6155825ee60abad4578b5c1632f81f3f8cd4e3cf4f5cdbade157fb9a8e24d
|
||||
destructured_ast: a04fa1a2c7e74a77c5a7668db476c298e4415d6a4e9e45eb23ad4a1384f802a1
|
||||
inlined_ast: a04fa1a2c7e74a77c5a7668db476c298e4415d6a4e9e45eb23ad4a1384f802a1
|
||||
dce_ast: 1f1288f1f9f8b1d6d9e5344a4eb39f05524effb10517202346dd08c47d4e7fe3
|
||||
initial_ast: 38245c6dcf3dd2eefe622109ac7e464c771fb453600c0abbe56b09d35b53aebd
|
||||
unrolled_ast: a26bb8e37c66a077fba6f366ffc7e68d3c298f7f82bc3d6e72a4445ec9ecc23a
|
||||
ssa_ast: ab86608c012145f682109ec167f2beadd27b4285e712bf9d16096409c4f47fd4
|
||||
flattened_ast: fc788aaa793d64b66169199559b0630dba62116216c9c7b38530719ba9775e9f
|
||||
destructured_ast: 6882bbc3e61e5b5e088128719c3c03f20eb32bfd06312e68eedd05182b5260dc
|
||||
inlined_ast: 6882bbc3e61e5b5e088128719c3c03f20eb32bfd06312e68eedd05182b5260dc
|
||||
dce_ast: 6adf6b5a2b6be4dcc8ebf46d30acc4dc8082816c90679404869dc0f76a014981
|
||||
bytecode: acfb8fc365ba153cf8598a04dad8ff4ac65b9df6c6356cb077fcf9dafbead7e9
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 912affc970cbcb05b0ad9fb1ff1a5598cb6972f9b2a63906ae7754fab97e6455
|
||||
type_checked_symbol_table: 8fa2b239eaf62f85f56a7ba412d90304d5135a47f9c3efb24267fd811418c8f3
|
||||
unrolled_symbol_table: ba551492d8e477c0853c9c5935dd6c08ee4e9c5b12c72da782e0a1f21eff3f38
|
||||
initial_ast: a508084b0849c8fc8132a326646f60b7d322645f51bb7dfb2c073d92d171f2ba
|
||||
unrolled_ast: 8adac3668b7a9e3d711058042f008c7e6bde85a3c4a0d5095d31913fb144816c
|
||||
ssa_ast: ee38d89f9cad35f48c927e99cef9aad239f4f636c6a7a6d854c8c41ed0001b35
|
||||
flattened_ast: cb263db54e096e6b3eddb79df68c2e30a2d75f1623d9d318af73bc5773a85599
|
||||
destructured_ast: 13e294f147c100fdac2457fbee58edfca364ef8d83b79a36a5ac9afbeef487be
|
||||
inlined_ast: 7f34786ee8bea7c9f1a4c0367a32b2680e3d89c0f8b4fe5822f347cb06d17529
|
||||
dce_ast: 7f34786ee8bea7c9f1a4c0367a32b2680e3d89c0f8b4fe5822f347cb06d17529
|
||||
- initial_symbol_table: 83e7e0873dd72e3da1df2a1a82b891a510ec0016f0e37208c42daca6ecc114d9
|
||||
type_checked_symbol_table: 9cff521828b8695385727d732d8cbc0d877b6158f29582d8fe6716f43fc52dc9
|
||||
unrolled_symbol_table: 77955bf3d7987c7e7833c8a9843d4e7a6123324f6e84a1db8b8df31dabf1910f
|
||||
initial_ast: be00d02ab3c3b889fc1842c26280c35c1d2811e8ad97dfe9aae939cb6e17528d
|
||||
unrolled_ast: 492de3b239329a520383e6f09fc9988dedfecd6709006127af2d32f233a1c76e
|
||||
ssa_ast: 88f0d788cc578eb9255c096157fa8d3e801ba656314f39459a3413de844a52fe
|
||||
flattened_ast: 5e2bd3e32ab5add74daaf4f7d0287d4f987d3ea34a87c953ffc1a3207511e8f6
|
||||
destructured_ast: d49494485feecc89a2dc13fe39e0a904d17e79630f6dd2bc61c03a8fae22967a
|
||||
inlined_ast: 4e916f4e4287ff120cf4c99ab5c6c652e44bc083f1a994d8b9e7118fc3b6c26c
|
||||
dce_ast: 4e916f4e4287ff120cf4c99ab5c6c652e44bc083f1a994d8b9e7118fc3b6c26c
|
||||
bytecode: 1f274ff221668a27f086b94c9485486b9d5fe1374384f9092bb3198632da3b91
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: dd4d3c9b32a75f56f5f5a8615defef06166452c6ff63902a31f1b35e2534befa
|
||||
type_checked_symbol_table: 3a2728e2385287273d47e1b3764b59db6f32b28f25098c76dd961a93e392f903
|
||||
unrolled_symbol_table: 757176c89a70f2da4a98e31093f500866610db61c8a25876ce221c94482f0cf4
|
||||
initial_ast: bedecf1c3e96cea2f1d598482707105f1935749f6ceb754eaa4ef73a5b4cf4a6
|
||||
unrolled_ast: 2703ec84bd2a511a9c838d58b55361115494679ab0ce02d4ab2f13bca5cc7e59
|
||||
ssa_ast: 34477dd040cfef68db0318c4efa44d0930d3d68c86fb31af7748f45610578ea0
|
||||
flattened_ast: 8ed19ef157b656b55ca9d0fca5fc15e88d6c6485aae4a1af24eecb9fb93bb989
|
||||
destructured_ast: c6c05abc5c72981b6b63205176dbcdf7fba91d71bdfba104b2c6fd32e05b43af
|
||||
inlined_ast: c6c05abc5c72981b6b63205176dbcdf7fba91d71bdfba104b2c6fd32e05b43af
|
||||
dce_ast: c6c05abc5c72981b6b63205176dbcdf7fba91d71bdfba104b2c6fd32e05b43af
|
||||
- initial_symbol_table: 4a5d78e0b3e37a6b912a8277304e8152e36e3376df8239c851bafa147a3a7aed
|
||||
type_checked_symbol_table: 56d61d0bc95b11c83a9d8bdff97d5f3b96ffcd2ed64f3d031ae12fb3419cb8d3
|
||||
unrolled_symbol_table: 7687d1610a4caa85db7b4fbaca1b57e88a4cd634bb218ebb6907041391a421a1
|
||||
initial_ast: 812159a832e2cf564c38afc08d09e2bae9f3d1cf76fb833b5cc554aebc32c90a
|
||||
unrolled_ast: 13e11cafcf91d5b7d0cfe69930d22a09b1e95c6e42abd614c12c2341a943c3d5
|
||||
ssa_ast: 8dd73c84e71e192b7d1b72c9f920043f1a2a3045a6761ef2ba493bd1853962c6
|
||||
flattened_ast: 6f80c4f0886538291cbed18cfee5b7a295cf2d9ec8d98a62a34a1664e465c023
|
||||
destructured_ast: 1a5edd4f63b4678c5e2d0dd844b1255d269ba2e0562b02884069824f0a58a554
|
||||
inlined_ast: 1a5edd4f63b4678c5e2d0dd844b1255d269ba2e0562b02884069824f0a58a554
|
||||
dce_ast: 1a5edd4f63b4678c5e2d0dd844b1255d269ba2e0562b02884069824f0a58a554
|
||||
bytecode: a6350aaded46f7047061f7e68a8ae41eb8aa0d29f02560257ecdc582a6c684f9
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 822b957b21a3e7b9f957d8cec8c6b4256775555ea7b7a9192c9cef8a86d04c6d
|
||||
type_checked_symbol_table: ed876a3a594f4486a033fe1bfffeb5dc53865cac75f1cbf5b1933ff2c23ebffc
|
||||
unrolled_symbol_table: 8219fa95d2f59e8c9f928eb5566010a88a0e5752834503249c15d9f865f3e88e
|
||||
initial_ast: dc02876f1f1c866ba2e2c89ed4f574f4b5eaa240c66c03a4dc00f1486c92045e
|
||||
unrolled_ast: ae4aa74a621ad590bbab5d1d7a46aede0a7fbeaeacfe4578064807b0e2ff00de
|
||||
ssa_ast: 25f48814c969fd91f5be92e2972316076da6447e383e032f0bab1a80365d9b81
|
||||
flattened_ast: 7d9cb8fc635391ac72606a46655d098812f0f7e7e72bd767cd4931667d8f681f
|
||||
destructured_ast: ac91b42bc2f9b6caf9d40d5766ec82d8caeff5bf51fd7eadd647bee936e26c84
|
||||
inlined_ast: ac91b42bc2f9b6caf9d40d5766ec82d8caeff5bf51fd7eadd647bee936e26c84
|
||||
dce_ast: ac91b42bc2f9b6caf9d40d5766ec82d8caeff5bf51fd7eadd647bee936e26c84
|
||||
- initial_symbol_table: b0ff324bab016466fe1fca2bda97adeb161701ab4672d91b41146b5da9670c2d
|
||||
type_checked_symbol_table: caee45876db76ab86161fc873cb28207d70ea4729d392e855519ab1bf92d601b
|
||||
unrolled_symbol_table: 218eaa9124ad3e749032a408f978b28426b90f5c1528b00d057f44d389294c2f
|
||||
initial_ast: 6deebcd133753c70df38755447443e16cc528daee1b9832cd43abdb154276cba
|
||||
unrolled_ast: 480ca5e4a2b87dd0ef24c8eaa333c527b18e2f99aac30dbc10b07041cf1afef1
|
||||
ssa_ast: 6d2a5eea33565e9e6173cbd1ed3ab91e7aa1cad1868d6af5f6542ecabb0837a7
|
||||
flattened_ast: 63bec4c7a76657334050b28319b5e5ad76c2e712092680f06cb358ea968a45b2
|
||||
destructured_ast: 1285f38557972e881ec58ee8460f0a2cd36360182c3818ba60401af85252e724
|
||||
inlined_ast: 1285f38557972e881ec58ee8460f0a2cd36360182c3818ba60401af85252e724
|
||||
dce_ast: 1285f38557972e881ec58ee8460f0a2cd36360182c3818ba60401af85252e724
|
||||
bytecode: d9595550f8a3d55b350b4f46059fb01bf63308aa4b4416594c2eb20231f6483a
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 822b957b21a3e7b9f957d8cec8c6b4256775555ea7b7a9192c9cef8a86d04c6d
|
||||
type_checked_symbol_table: 39be341ba0bb3e62400704e748adfde2ff4038a64cfe7032e596d9f6b114943d
|
||||
unrolled_symbol_table: 72cb9d344fb88724b1ae07506f9be420baa0916634d2133c7e4e51368ec91115
|
||||
initial_ast: 4e6a530b5e57b925c3100aca1de7a314f1b10cfdb2f3b324137b412b11a0680f
|
||||
unrolled_ast: bd23e1a503f1d4738bf28afaff84d899295731fdb6e150c8c7889cd00d128724
|
||||
ssa_ast: 7dc4c694fdcab5660f5014c29c938ff9e028cbcfbfe1b52a32ef73e6a78e358f
|
||||
flattened_ast: 84ea11a0ba0fba401dd2a5d2b5eb2f06af38d22c37a597da8f5e200f03f999de
|
||||
destructured_ast: 6aac0197cbbfefe82dbfb4bbc58a5ae1606db42e4e16e0f63731e743c77f2aab
|
||||
inlined_ast: 6aac0197cbbfefe82dbfb4bbc58a5ae1606db42e4e16e0f63731e743c77f2aab
|
||||
dce_ast: bbf2c294afe079c354aae650d7debbb627673fc8fa16323fc9911d9ce42188c2
|
||||
- initial_symbol_table: b0ff324bab016466fe1fca2bda97adeb161701ab4672d91b41146b5da9670c2d
|
||||
type_checked_symbol_table: cae5172f09f56d0792b62803e7936f1431912008a8f94d3c81cf8e9fbad07686
|
||||
unrolled_symbol_table: be52d8f75e0af71b844cf4e0792f4f3fbf719719dcfcc498695f9f74462498f9
|
||||
initial_ast: 163b4dae689a449686c0502351d2551d84266e67e9fb1615e4d9111980318b98
|
||||
unrolled_ast: 3a1ad696a74a677470784b58c86892473569dc3ca24b5e8af369578d5b4c9e2c
|
||||
ssa_ast: e72a98e3883f0413743a99d7fc497dbb4a0d3043dc799efad7e4e2c123f31798
|
||||
flattened_ast: cdba644ab0c19a4179af132ca31cd1954d568a43d4dd2c46607a8f3a6acd7b74
|
||||
destructured_ast: 106d309f035b5a9f27d68857465438181cced1fe2aeb55bb88b3bd78020b2d45
|
||||
inlined_ast: 106d309f035b5a9f27d68857465438181cced1fe2aeb55bb88b3bd78020b2d45
|
||||
dce_ast: 2850d94546108c234b8a53ad5509225fbb5f31143125812fdbffa5ddf6874f30
|
||||
bytecode: a5ef8b434b2a8b1939f1d042fd5706c996e0f1905bf2395a0f140cff779ce48a
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
unrolled_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
initial_ast: b7b026fdc76bc646438c7134cc216e93eeb6593283f94e8592588b004646a63a
|
||||
unrolled_ast: b7b026fdc76bc646438c7134cc216e93eeb6593283f94e8592588b004646a63a
|
||||
ssa_ast: 145154af44f56079cb822b3dfa1cd9a6d7f72efcf8b3300a529b09ecedfdc946
|
||||
flattened_ast: 30dd3ee6580d79964697ca4b962e6e9f66131d836279735aeaf18f006a402f15
|
||||
destructured_ast: 86162df5219575a7eaf9991af4951fbed57cb3a7f7f41f82df0b959cfff7e9a6
|
||||
inlined_ast: 86162df5219575a7eaf9991af4951fbed57cb3a7f7f41f82df0b959cfff7e9a6
|
||||
dce_ast: 24a42b30618d362a44f7610f2f7b38c6f345bcd96fb12c8b87d77e34bf3434bf
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
unrolled_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
initial_ast: 9873ff758c10d6da0f990191e58448d7ce86eefdefcc552dadfa22704ae4b67c
|
||||
unrolled_ast: 9873ff758c10d6da0f990191e58448d7ce86eefdefcc552dadfa22704ae4b67c
|
||||
ssa_ast: cdeeb803bc2b12522f2212a8afbe77347365e3cbab96c0cc187153348724df30
|
||||
flattened_ast: 282834fdda271bfb3da0d2d7793c3a228291423b3841c0ee6647b5feeb20f3f5
|
||||
destructured_ast: 5923d26ca892984ea767bfcab7f8691ddd551b7063bee6718673a56d987738bc
|
||||
inlined_ast: 5923d26ca892984ea767bfcab7f8691ddd551b7063bee6718673a56d987738bc
|
||||
dce_ast: dd064cca623862213f1556626d81e10f592a335a1f7388059f821fd6353a6632
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 47da8363d5a8d5de413b8fd97ec5cc722461f4128183f5effd20b39e456ba8da
|
||||
unrolled_symbol_table: 47da8363d5a8d5de413b8fd97ec5cc722461f4128183f5effd20b39e456ba8da
|
||||
initial_ast: f747c85d426a6f221df4e986114f385793a998b01658dcfb1d8923a3b4f2467d
|
||||
unrolled_ast: f747c85d426a6f221df4e986114f385793a998b01658dcfb1d8923a3b4f2467d
|
||||
ssa_ast: 84c40875de4d1b0bff4b34ece8578a0ee21f5fc4c66b7ed523e2a67511e9ee95
|
||||
flattened_ast: f8829dd0753f26c4b43c068c3bf4816c7f620ee44f03033e3b41bcd429fe64d9
|
||||
destructured_ast: dfea2c4f3f96efa850d56eaa630b36ba40c37ecf4f32f12bb6b8dcf38f616fd2
|
||||
inlined_ast: dfea2c4f3f96efa850d56eaa630b36ba40c37ecf4f32f12bb6b8dcf38f616fd2
|
||||
dce_ast: 91bfa913fb0b9cedf1d6f838c280b0ec0fd529bf0714dad61c12adec113c6e9f
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 4dd7167568691e168581afd4519fb6792ec2912eaa964dfa639d601d18afbe67
|
||||
unrolled_symbol_table: 4dd7167568691e168581afd4519fb6792ec2912eaa964dfa639d601d18afbe67
|
||||
initial_ast: 45954f2ded7ad4317c19985fc254d9dc70b01a8209b2c13dd211c1067adcb888
|
||||
unrolled_ast: 45954f2ded7ad4317c19985fc254d9dc70b01a8209b2c13dd211c1067adcb888
|
||||
ssa_ast: 91a085fe2fc9ad762873f67650da380c08934df9f9276be12fb407a194d6f684
|
||||
flattened_ast: 6d1599503d379d65c671296302ee6d64c127a1a161bf69c9a1b841436488b982
|
||||
destructured_ast: ffc1da3ede363d5fd8581998a698d85794bc19d79026943e34232563ca90e58b
|
||||
inlined_ast: ffc1da3ede363d5fd8581998a698d85794bc19d79026943e34232563ca90e58b
|
||||
dce_ast: 2273846d1d88dba8ce2b524e7b6dbaf0e093ded9354d8ef217111e87293651b9
|
||||
bytecode: 89209e8d86f847dbf47309d0092ee98ff4c7e72f93c06aa16b185b87931b4163
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: 3db607879622f0c71960e1d84c4b4fbb927c44571214265145d280f852804004
|
||||
unrolled_ast: 3db607879622f0c71960e1d84c4b4fbb927c44571214265145d280f852804004
|
||||
ssa_ast: 72ffef92f324ea7cc693b3672b5314ba39b97f1fe6541442b30cf2343d4a6437
|
||||
flattened_ast: 21e6052fb8b18b785cf7031a1c2127502f09596a717b0ad55d30ccea49458944
|
||||
destructured_ast: cf585b6ef2f89d5e5b99fa7fd04d44971e2c918439249ccf90c7bfc5282977bd
|
||||
inlined_ast: cf585b6ef2f89d5e5b99fa7fd04d44971e2c918439249ccf90c7bfc5282977bd
|
||||
dce_ast: e735ac63858c5afeb8681586c77f727210493258ef7448e9b4b9c223db6ffecf
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: 1c163f034fd1e1185cdc76efb2e337dc3d46a4b12d55497245f209399c064a24
|
||||
unrolled_ast: 1c163f034fd1e1185cdc76efb2e337dc3d46a4b12d55497245f209399c064a24
|
||||
ssa_ast: 4e0df0b799fafd9e6fc57904ef02e0b026a17042cb6fbd3c19231d20124696cd
|
||||
flattened_ast: 5bf3de768dd0d1772bb76aeaf703ab13f72e5e372a3e49a91ba37019df6eb613
|
||||
destructured_ast: 3b5e2a7639bd0ee09f32d1a8ecf7a98345b173333fe419bdfc5cb3a26287a1fe
|
||||
inlined_ast: 3b5e2a7639bd0ee09f32d1a8ecf7a98345b173333fe419bdfc5cb3a26287a1fe
|
||||
dce_ast: 6611276029e033b62fc0192539ae527a042085a066404dd3923267d6a28b2a2c
|
||||
bytecode: 44723f1147fbb09b330db772453005ab5dae98a53925a9dc45b66daa51584290
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
unrolled_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
initial_ast: 460ea8330881454e8f6f674ae5a550cf439a283d1e6e6abee86bde30c0caa2b9
|
||||
unrolled_ast: 460ea8330881454e8f6f674ae5a550cf439a283d1e6e6abee86bde30c0caa2b9
|
||||
ssa_ast: dfa3c08d62add7479c43e4c3cfb69835c7d84574081aa03eec56e143752ec287
|
||||
flattened_ast: 46abd94be0fd2d28b46a30f7ab9bbb331995c2d48f49ed668352584169c1a03c
|
||||
destructured_ast: 042fac35ee6d70f8c057956f71b39a8b0fd3abf7c23951499f0aecc82edba820
|
||||
inlined_ast: 042fac35ee6d70f8c057956f71b39a8b0fd3abf7c23951499f0aecc82edba820
|
||||
dce_ast: 7e6b98bf461ec4ac39f59e0b90a1ceef3cb594f862bf27f940dc6252a4f52a4d
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
unrolled_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
initial_ast: a3dd97bc31b1dc64c7608e1fc5ad68b8d0d3f781e49c207928f5d425f1fd1bf9
|
||||
unrolled_ast: a3dd97bc31b1dc64c7608e1fc5ad68b8d0d3f781e49c207928f5d425f1fd1bf9
|
||||
ssa_ast: ed3fd32fe2f8d8f419bdbf1abf78c6f1af1e0ee9ee74188e48886205b7a9744a
|
||||
flattened_ast: 1296938ea71288a8b64f116c48377f091f366a4a01cf9f20a9aadd3676d89a84
|
||||
destructured_ast: aaf2797e71fc28e403368fbceb36062a0b1352e9d7ac6caeecb1d250f0e9e84c
|
||||
inlined_ast: aaf2797e71fc28e403368fbceb36062a0b1352e9d7ac6caeecb1d250f0e9e84c
|
||||
dce_ast: f22471183488a6b6d96935c302e8b542b24e5e7ea3c947b0c8f01c52687bc37e
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
unrolled_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
initial_ast: 6c0f9dc3bb4e835938f237e4407f8d57625279d070fb22948d3623eb76e809e2
|
||||
unrolled_ast: 6c0f9dc3bb4e835938f237e4407f8d57625279d070fb22948d3623eb76e809e2
|
||||
ssa_ast: 986e7a389a85e1a23780788c60d2428354fc87420702030c633090d5f89cfc4a
|
||||
flattened_ast: f5ebdca1b7ed3a0051912cd91cf1873b7924c6b6f12716839a370e7d83f37540
|
||||
destructured_ast: 4766402255bd612f9c0f52aa0777e1983b38f4910a1dd887dcf2b12953f94b54
|
||||
inlined_ast: 4766402255bd612f9c0f52aa0777e1983b38f4910a1dd887dcf2b12953f94b54
|
||||
dce_ast: 1d15336684105eebf785cff516d1b3adb68d82b54eac90967ad7277b03681569
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
unrolled_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
initial_ast: 61fef7bc7d35be574e5f9353c089561c113afe14c755051cdfac56879b67b6f8
|
||||
unrolled_ast: 61fef7bc7d35be574e5f9353c089561c113afe14c755051cdfac56879b67b6f8
|
||||
ssa_ast: 5de3029f4a7bb61031f1852bcd6163cf8e40e10352746016f33aad682f810e5d
|
||||
flattened_ast: dd29a1fa78efcb5fa7e428276e9285105ffef017e43d8d4a3eee6a47d3604fab
|
||||
destructured_ast: 420edf1819b67e9e9e25822608379793a3aa7a9c85e858695c0349a6dbc34881
|
||||
inlined_ast: 420edf1819b67e9e9e25822608379793a3aa7a9c85e858695c0349a6dbc34881
|
||||
dce_ast: 3cd075a82acacaf50339ddc532e27e0504d7c337ae6468998c2d8e82f20bfe40
|
||||
bytecode: 1ee04c880a78442953925baa8e3c60e416d77c926da80774db6961188aaba65a
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: 98ddd2422e93175e48599d66d22e496696e247b6e93ca27643a68ef8e40658aa
|
||||
unrolled_ast: 98ddd2422e93175e48599d66d22e496696e247b6e93ca27643a68ef8e40658aa
|
||||
ssa_ast: 22775f0b31594e29213b12e2e0f3172e1b0bea5d661df31829432303dc298c56
|
||||
flattened_ast: cf14147ebb268afad497c1cb3ac4bd0f35b95016764d829d1706d480aa876e2e
|
||||
destructured_ast: 625983387f3e21f38f9fb53acd8fdf2d95aafa3687e69b74b69e0e530dbc701e
|
||||
inlined_ast: 625983387f3e21f38f9fb53acd8fdf2d95aafa3687e69b74b69e0e530dbc701e
|
||||
dce_ast: 784b4d080a8a985a89903901c96015e86ec543b7de015d028edb18c4098196e3
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: 69ba7af7318b356010c470baa89403e4b3bf78c69678f4bdb8ff2a8795b622ed
|
||||
unrolled_ast: 69ba7af7318b356010c470baa89403e4b3bf78c69678f4bdb8ff2a8795b622ed
|
||||
ssa_ast: e7c54cfae2b8380df7a81f6cc3da47ea623b350766897ed1070e6ca9888bc4ad
|
||||
flattened_ast: 11c06e77fb2d9c279653af9fe561ebdb18afc0d7d12209a6093716aae15e90f5
|
||||
destructured_ast: 0e3d7a62e620506342a715698e35dcc1711298adb8c49c88386bf0e16992f5d4
|
||||
inlined_ast: 0e3d7a62e620506342a715698e35dcc1711298adb8c49c88386bf0e16992f5d4
|
||||
dce_ast: a99474055784ba90aa18abb8f629f9e782426703805aa8221dad832b2fa4aa4b
|
||||
bytecode: 6e17954a1a55bf11bcac1b381fc6a82ee849f92a9af06d755ee3d6e3cd3b748d
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: cde267005ab63bbf7732222cdf11cba82760283e305d151eac86294c3ddeca5e
|
||||
type_checked_symbol_table: 70b1f7d016f3e65d2902d20fab38f69924278f04173bdbd4d112e98f751fe32d
|
||||
unrolled_symbol_table: 70b1f7d016f3e65d2902d20fab38f69924278f04173bdbd4d112e98f751fe32d
|
||||
initial_ast: 8f6a835f79ffed646dcebae351d92a74721acb099caaf68e5c32c9e73bab8244
|
||||
unrolled_ast: 8f6a835f79ffed646dcebae351d92a74721acb099caaf68e5c32c9e73bab8244
|
||||
ssa_ast: e67087d3178e9114b14fd0552ecef96215eb34bb4593bc4fb5741312dbec5d62
|
||||
flattened_ast: 19c9e325c532bd1b92b6d5b0188095a97f07ed73f56f1d67e092e143be41bad0
|
||||
destructured_ast: 012e565494427971704c3b7a37ed036f9f9e60e588774cbbfe6a99f71428193d
|
||||
inlined_ast: 012e565494427971704c3b7a37ed036f9f9e60e588774cbbfe6a99f71428193d
|
||||
dce_ast: bfb362ea40b226c16e2986acfc87d0d4920dc5525b72d4efb99d5e337ba671a7
|
||||
- initial_symbol_table: 35faa74f7e63d6091fd26297a05671a6c5f428a70d5a37eb6e66a0b3600114d5
|
||||
type_checked_symbol_table: 95144067dd9f17706ebab908322cdd2ba6e86ca14fa23e543205a1ffa98dd4ad
|
||||
unrolled_symbol_table: 95144067dd9f17706ebab908322cdd2ba6e86ca14fa23e543205a1ffa98dd4ad
|
||||
initial_ast: f405095809db6c091f111abe5150dd9006a07cd0f132f06b27a2a8b508358e18
|
||||
unrolled_ast: f405095809db6c091f111abe5150dd9006a07cd0f132f06b27a2a8b508358e18
|
||||
ssa_ast: 18e01f5084ba96a39dc25e18c44d911be333b8e9580dfd595f1de026582e9c19
|
||||
flattened_ast: fa21a9ca89789634065434f5ebc78410950a531176db8a832c7cc67d5a8f54a5
|
||||
destructured_ast: 1bc4d9e39e98ef64605bb826914d34a4396b47a08fc6fa8160d4441355e64893
|
||||
inlined_ast: 1bc4d9e39e98ef64605bb826914d34a4396b47a08fc6fa8160d4441355e64893
|
||||
dce_ast: 0d3f409259a87700f5d103681faecd747c6aeb3f4f1d614dfa45ea2910b65f02
|
||||
bytecode: 16448534dab09040c482f623815abdd0bd2e330d2cb99bc095142027c80e9bf0
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
unrolled_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
initial_ast: 57bcb27b58c7d0b70180172d992c871cbc6aee47be0ddb0d3a3f91dbe678dc0f
|
||||
unrolled_ast: 57bcb27b58c7d0b70180172d992c871cbc6aee47be0ddb0d3a3f91dbe678dc0f
|
||||
ssa_ast: ee8e358331cf25d7d25bb5d706233ac96b5b80dee7457e68810bf47c60026a4a
|
||||
flattened_ast: 87a56ab8ac00f0e8bdb8d8494ecb58d42b45796beba014eadfde080a0fab9d8c
|
||||
destructured_ast: 6e44a0c1b3a69287f654188c3f715c23cd573eaa4dd59a70bbff052f01da847c
|
||||
inlined_ast: 6e44a0c1b3a69287f654188c3f715c23cd573eaa4dd59a70bbff052f01da847c
|
||||
dce_ast: e3404d1c783bf66373dd843923fc942faf9cac3d03baf1233feaa46f5e7f5759
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
unrolled_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
initial_ast: d875d33ca0e9999c43abfd6ee599f810781eaa64ed0cdcc85f4cef1a26679326
|
||||
unrolled_ast: d875d33ca0e9999c43abfd6ee599f810781eaa64ed0cdcc85f4cef1a26679326
|
||||
ssa_ast: 8962273edb5e52fe057895069340389490eefe632f26e8481ef5db34acdf594c
|
||||
flattened_ast: e37166f0aab409ccd348b334cea9c25f9536aceda73a28657e1725b42205a503
|
||||
destructured_ast: 6f7c0d49e5649e8771085066cd2293410c398c17e64ff8d62c8f2cd681d5fbe7
|
||||
inlined_ast: 6f7c0d49e5649e8771085066cd2293410c398c17e64ff8d62c8f2cd681d5fbe7
|
||||
dce_ast: bac68877a43e59546969a53a31ce99653130b5ab829ae7c191757101952c0410
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 47da8363d5a8d5de413b8fd97ec5cc722461f4128183f5effd20b39e456ba8da
|
||||
unrolled_symbol_table: 47da8363d5a8d5de413b8fd97ec5cc722461f4128183f5effd20b39e456ba8da
|
||||
initial_ast: 74f08503234bda32dd34626a908d14e3777fc5b4e0f12af6162391c8a6c35ed9
|
||||
unrolled_ast: 74f08503234bda32dd34626a908d14e3777fc5b4e0f12af6162391c8a6c35ed9
|
||||
ssa_ast: f692c10e6efe7578040ab936b270aa6364d781d6ce8a7e948c8008947189f058
|
||||
flattened_ast: 5fe4900679ef6116d3c76279468cf1e6be51745d4482163c09dfac395048af38
|
||||
destructured_ast: a3682426505c4e2f5520872495a7d71558b4913a437a8ede15b052476e46ffa3
|
||||
inlined_ast: a3682426505c4e2f5520872495a7d71558b4913a437a8ede15b052476e46ffa3
|
||||
dce_ast: 288ae7c57fd373fa6a91d70d69ce66e1949673b05cf25b6966c7f3ae237ba482
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 4dd7167568691e168581afd4519fb6792ec2912eaa964dfa639d601d18afbe67
|
||||
unrolled_symbol_table: 4dd7167568691e168581afd4519fb6792ec2912eaa964dfa639d601d18afbe67
|
||||
initial_ast: 8a57c8bea6a6632fefc0df055235587cec77e606c7c1b942b6fd1efb48caf84f
|
||||
unrolled_ast: 8a57c8bea6a6632fefc0df055235587cec77e606c7c1b942b6fd1efb48caf84f
|
||||
ssa_ast: efb291de0328446a42e590c8bd4918694ebe459516fe86329fd747dbfc998472
|
||||
flattened_ast: a86616f6774a6e83edcd9b7574fbdbb691252a32df6918b73011059366d36dbe
|
||||
destructured_ast: a6f5575da143e202778ba9de1f33e51cac92ce5e5a395479431b9a3b2d8422c7
|
||||
inlined_ast: a6f5575da143e202778ba9de1f33e51cac92ce5e5a395479431b9a3b2d8422c7
|
||||
dce_ast: 3bb158d2ef5fe7a8d387c35dbe4b7069f49fd474ed9a793eb1ce1fce2d1e75bf
|
||||
bytecode: cbaea392a3a5a598090b5c75eebfc840f9fd1f4dd9460704bd82c17acfedcedf
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: 18341096c46d4bb34fc5a1fe9c8e998d2b3432d08778da83ba06b2a27b850f05
|
||||
unrolled_ast: 18341096c46d4bb34fc5a1fe9c8e998d2b3432d08778da83ba06b2a27b850f05
|
||||
ssa_ast: c004cac5970ac37e0b37118894581767dc751c69f8d029ef0109c49d86d55ae6
|
||||
flattened_ast: 0f34abd184289a97400a9567806c5e40c76fbd413883a07c4cdc905675b2514f
|
||||
destructured_ast: 918d7c959ba64e044ef58747404f2e6d3b015c73bd2e719dae9fc108c299023d
|
||||
inlined_ast: 918d7c959ba64e044ef58747404f2e6d3b015c73bd2e719dae9fc108c299023d
|
||||
dce_ast: 4c7ef42125dfd42ece2d0f73126564d62c0eef0ac46677ffe519946fe3083e9e
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: e3bf36328e9bafe4e3b81ae0ceb5bd6dc73cc9ca51727d14501a5673d25afa53
|
||||
unrolled_ast: e3bf36328e9bafe4e3b81ae0ceb5bd6dc73cc9ca51727d14501a5673d25afa53
|
||||
ssa_ast: da0e22cfd7aae96b559fc2e2b41a6992c7bf4c277d67545c335a1586d4de7c7b
|
||||
flattened_ast: 566dd8c1f54b3e74efa7e577902dd03f601f79d826b7dcf0c63872a94b59e560
|
||||
destructured_ast: f5b521fa1d75e961db1d41251288d968c27e40266402ebc69dbffa3a80d13861
|
||||
inlined_ast: f5b521fa1d75e961db1d41251288d968c27e40266402ebc69dbffa3a80d13861
|
||||
dce_ast: 7579e9d7d7bb4299281afb520d80f1e28309ea773c68ff5f981da57338d82ef0
|
||||
bytecode: 5d5cbe495e958d3762c2656dc336bd9fd903b5e0b8b51684f3556ca4b5281344
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
unrolled_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
initial_ast: 68bb06001de552615a0b7b5b3ee5fae93708ba6ff70e44583a1bfda3ba199ae6
|
||||
unrolled_ast: 68bb06001de552615a0b7b5b3ee5fae93708ba6ff70e44583a1bfda3ba199ae6
|
||||
ssa_ast: aa4adb677fdae56b905dbb7909e1137c33e3f74c54c93d6b00d74ec3b48c0c79
|
||||
flattened_ast: 953b1ea5c54f3a094472b166900505a1becb4dc3f1177ae758b5f03a70f27c9f
|
||||
destructured_ast: 8776cb451aa358368cbd9e9c31171912a3473d6168e0051fd5670573fa6eaa92
|
||||
inlined_ast: 8776cb451aa358368cbd9e9c31171912a3473d6168e0051fd5670573fa6eaa92
|
||||
dce_ast: 6b7def707702f771bb41ee11637d5f312355c5f8fdb505c224c5ae19179c391e
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
unrolled_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
initial_ast: 54d5789b9203beae85c2a109a1cb48db19e732fc5a1c4ebd961404b548cbfec6
|
||||
unrolled_ast: 54d5789b9203beae85c2a109a1cb48db19e732fc5a1c4ebd961404b548cbfec6
|
||||
ssa_ast: 19f9e1226c418bfee16fb4db866978220a04685453abc1ea78b4c1ce9b8fcc6a
|
||||
flattened_ast: 86050d5626e8e03a046b9c6e98ed1abe7ed1fcdceb928ff2bd536642b5cf46be
|
||||
destructured_ast: 2e1906abbf3c7ae55a4059dc421c68c854135a22723e6560bbd6c5824137180c
|
||||
inlined_ast: 2e1906abbf3c7ae55a4059dc421c68c854135a22723e6560bbd6c5824137180c
|
||||
dce_ast: 0462c15d429b8c65c4375284d9496131c4441e67282fee93a9f0b9a581c9fc87
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
unrolled_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
initial_ast: 68a1fd1e8be83dae28a13bbda215132980c67ad9c43c4bebd326daaed1997dde
|
||||
unrolled_ast: 68a1fd1e8be83dae28a13bbda215132980c67ad9c43c4bebd326daaed1997dde
|
||||
ssa_ast: 14a82a46a284ee90ec9844ba5cdb92b0420e81c7fd3c25c039f8df75adc237a0
|
||||
flattened_ast: e350051b81782f8e75d40b2705bd44884670721c87fe0aa03e37882c4cacb8dd
|
||||
destructured_ast: bdaa24f9cb255da6e36af3cc57abb5eca1ee356acb81eb4fdf989d4ee3724249
|
||||
inlined_ast: bdaa24f9cb255da6e36af3cc57abb5eca1ee356acb81eb4fdf989d4ee3724249
|
||||
dce_ast: 5696e4442b647539936aa7f3dc1040d3bceb53fc0a7642a9c5d337334a8bad3a
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
unrolled_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
initial_ast: f761e8138c6766dd7d8a1707de6ccec23c5c377812b477ebec3d295bc2f79a02
|
||||
unrolled_ast: f761e8138c6766dd7d8a1707de6ccec23c5c377812b477ebec3d295bc2f79a02
|
||||
ssa_ast: d9145a2183c23ebb95bd6518bff3b3f012f2e6da03e1d7e9cd3579f15720e7a6
|
||||
flattened_ast: ce87bef92fda0939fbd0d1ba19647df9cc91e17e51df18a8975371b56a6ed23e
|
||||
destructured_ast: 1f3e64a523f29f00fa59c82fe910d5005031e8ebd21c789d51734c5d8e13aed5
|
||||
inlined_ast: 1f3e64a523f29f00fa59c82fe910d5005031e8ebd21c789d51734c5d8e13aed5
|
||||
dce_ast: cffb2c5eeb571350d21a5dd1d3a42bf9e8c81b11107852f549745c115aaeb604
|
||||
bytecode: 928ec4195678229549fe7ec5b3291d7c72afb95787099dbfca6118539bcc2fd0
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: 7208d860e989aa19a317d3e24d27684548ac1f7703903d55992c32cb50c2e750
|
||||
unrolled_ast: 7208d860e989aa19a317d3e24d27684548ac1f7703903d55992c32cb50c2e750
|
||||
ssa_ast: 8e5149fef71d09bea755195620170d58167a261068400912491d6f35f1bf405c
|
||||
flattened_ast: fc53d090a7d9f21dda6c4e09628066b9d0abf3ae3c065dd2ec0e4eff3534cc0a
|
||||
destructured_ast: 0a34681f9061ab87ee6ddc44c6308b008209f4cea02fbc917a6c6d87c094e0d6
|
||||
inlined_ast: 0a34681f9061ab87ee6ddc44c6308b008209f4cea02fbc917a6c6d87c094e0d6
|
||||
dce_ast: f10d9c586f0e0e397f8cb611c260efaa9b1b6d73079e15d1d4ee183add784a1e
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: 8e44992dd5fe4fe9e1e522e695ca70d239f3eeccc3728b150ed9364421be09c4
|
||||
unrolled_ast: 8e44992dd5fe4fe9e1e522e695ca70d239f3eeccc3728b150ed9364421be09c4
|
||||
ssa_ast: 6acbe24af7ad5a0c469dd53118362a8882c8d59a5f766af6782531108c47326c
|
||||
flattened_ast: 9373e82b218ce1b7cd4f5276cfaf3295f93b3d104ae073c6b04e225018bb57fe
|
||||
destructured_ast: e85f838f76070991ca098bdba4c1dce1f7918403840321920525250fa5ee4073
|
||||
inlined_ast: e85f838f76070991ca098bdba4c1dce1f7918403840321920525250fa5ee4073
|
||||
dce_ast: b4e7468676095289b2e6048f8644f63f87391e9670df3b27a60eba3089b4e3ef
|
||||
bytecode: c87c15be54d6c1ca80ab86ca735443a949fd9e3bdf7534136ec4c9bb5443fa77
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: cde267005ab63bbf7732222cdf11cba82760283e305d151eac86294c3ddeca5e
|
||||
type_checked_symbol_table: 70b1f7d016f3e65d2902d20fab38f69924278f04173bdbd4d112e98f751fe32d
|
||||
unrolled_symbol_table: 70b1f7d016f3e65d2902d20fab38f69924278f04173bdbd4d112e98f751fe32d
|
||||
initial_ast: bc78490fbc83c2f2d015180751edc1fc4be822197bc92ff5a9be265b411536e3
|
||||
unrolled_ast: bc78490fbc83c2f2d015180751edc1fc4be822197bc92ff5a9be265b411536e3
|
||||
ssa_ast: 57cb4afedfec2088d578000543d904b2025d709450f1e08e602924443306905b
|
||||
flattened_ast: 24313c71d15e9f1d87f795ef7997ea2ea73ba6221aba38ff5db282429be5d2d5
|
||||
destructured_ast: 1e2ba4e7c954b226892c2b6812b84817665d7f2df09dff5dca0ed6f7b293b6ac
|
||||
inlined_ast: 1e2ba4e7c954b226892c2b6812b84817665d7f2df09dff5dca0ed6f7b293b6ac
|
||||
dce_ast: 90aa29eab4ae69a0fb8da5baa1beaf1166ba47ec9102a84c34b5b36e2f09ce93
|
||||
- initial_symbol_table: 35faa74f7e63d6091fd26297a05671a6c5f428a70d5a37eb6e66a0b3600114d5
|
||||
type_checked_symbol_table: 95144067dd9f17706ebab908322cdd2ba6e86ca14fa23e543205a1ffa98dd4ad
|
||||
unrolled_symbol_table: 95144067dd9f17706ebab908322cdd2ba6e86ca14fa23e543205a1ffa98dd4ad
|
||||
initial_ast: e24ee1bcabcc08b4b186df3883e05bae4f6452569f613294a6ee7aaa5b51a67c
|
||||
unrolled_ast: e24ee1bcabcc08b4b186df3883e05bae4f6452569f613294a6ee7aaa5b51a67c
|
||||
ssa_ast: 42bb275bb8f30f844e720e95ff44f8c2d8b2edc12ea4d29245ab4b13068b480f
|
||||
flattened_ast: 018dc16ea828956c4831a0867627751a833bef0e4b474918db2bc17b3658b1d8
|
||||
destructured_ast: 821596ca67920e30b4904b190cd9387029414909381747860fdd7575b671533a
|
||||
inlined_ast: 821596ca67920e30b4904b190cd9387029414909381747860fdd7575b671533a
|
||||
dce_ast: 82b0310905bf404ce4d12c69f1955ec06b6e7d09e957b532f73fd9191aeb4fcb
|
||||
bytecode: 39f2fd495ce761fe3a8fb011b05bfe34e50db91dbd7f9a5bec40a8aa8187f0b1
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
unrolled_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
initial_ast: 96ff59c3c0e00e8d085c4edb229959626848c043bed735bd652fa1acf2bc1ea3
|
||||
unrolled_ast: 96ff59c3c0e00e8d085c4edb229959626848c043bed735bd652fa1acf2bc1ea3
|
||||
ssa_ast: 7ddc48ad11ccf8ce35d555fc66a7192f31aae51120f6eb325c23e1b817ceefe5
|
||||
flattened_ast: d677a42a55111c1169e496978a6e2c215410cc93b741ed788254933821057a2c
|
||||
destructured_ast: 7b4739c7f9260af5462bb06cfe84eee3308427673cb440a86dd623a846419813
|
||||
inlined_ast: 7b4739c7f9260af5462bb06cfe84eee3308427673cb440a86dd623a846419813
|
||||
dce_ast: e3404d1c783bf66373dd843923fc942faf9cac3d03baf1233feaa46f5e7f5759
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
unrolled_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
initial_ast: 9beb01be0526c1dd87cf1ee4b518e380b933b4cc5ef32b489971808788443824
|
||||
unrolled_ast: 9beb01be0526c1dd87cf1ee4b518e380b933b4cc5ef32b489971808788443824
|
||||
ssa_ast: 4e4e56c9d3161547b75edb1da1569cf4ade698b7634827fcb92a4786ef2ec53c
|
||||
flattened_ast: fb6e4dc3d16ceb4f97857e76e70172e39a43ac271445606b764fad9356532b7c
|
||||
destructured_ast: 38629200e0a8a18e6678b4bfd323af0ffec8fd9c9d58b40b6b0c81ae693ad574
|
||||
inlined_ast: 38629200e0a8a18e6678b4bfd323af0ffec8fd9c9d58b40b6b0c81ae693ad574
|
||||
dce_ast: bac68877a43e59546969a53a31ce99653130b5ab829ae7c191757101952c0410
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 9869faf372dd2871a22d7fb0c12cbcf66ac8c196d19f2ef93ce82e5595d4f9de
|
||||
unrolled_symbol_table: 9869faf372dd2871a22d7fb0c12cbcf66ac8c196d19f2ef93ce82e5595d4f9de
|
||||
initial_ast: 567c803bc7821a3783dde19821846bb9223cd458cb1fa362666817cca070b7fc
|
||||
unrolled_ast: 567c803bc7821a3783dde19821846bb9223cd458cb1fa362666817cca070b7fc
|
||||
ssa_ast: 4d19494544098b10ae0c5540f00eb356f70acb711fd155d945931714d65377e8
|
||||
flattened_ast: 8eedddcff00ebbdfaa296163c48c54a771b847e1c9cc717d9ef02a8ab4d50949
|
||||
destructured_ast: e5840052cce5d247d7a408cacfe535cba2e7dba844438e551e2d26324c194687
|
||||
inlined_ast: e5840052cce5d247d7a408cacfe535cba2e7dba844438e551e2d26324c194687
|
||||
dce_ast: d7191a0b4a59a076fdcda26e2140a5c200d259c5fae325336100bd83ed43111d
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 319b3f28310fb0c1b8191943507da58e87f0b6366b36a1294819522c6a949595
|
||||
unrolled_symbol_table: 319b3f28310fb0c1b8191943507da58e87f0b6366b36a1294819522c6a949595
|
||||
initial_ast: 27bc5906a51928b0733372051121207550866d123c2242209e13c65d8f6e9281
|
||||
unrolled_ast: 27bc5906a51928b0733372051121207550866d123c2242209e13c65d8f6e9281
|
||||
ssa_ast: 593af3220f044892fc107b07de09853e37d3b66cb1a93657a40565fcfd6f4ca7
|
||||
flattened_ast: f2cd64af1a30688d84cdaade0e9c6eb231ecdd0d2f7be1de83e3fd49e0a3d981
|
||||
destructured_ast: 0f195735c43c1c026d5e5cbfd852eef6bcd5802ad49c0c41cf44682879ad0e67
|
||||
inlined_ast: 0f195735c43c1c026d5e5cbfd852eef6bcd5802ad49c0c41cf44682879ad0e67
|
||||
dce_ast: 59f7ee2d326e132dd3913ea2baff62b9a5c48e2744ea1ef51380e3787996762f
|
||||
bytecode: 1a32babe51dec0ff82a035139fa96069e6b0f7b9e7ec8f08f0802bd076deffc9
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: bc7e06366a8bb64c9766ba527b90306013d265e483549aab271c5e7fbe5ac0ff
|
||||
unrolled_ast: bc7e06366a8bb64c9766ba527b90306013d265e483549aab271c5e7fbe5ac0ff
|
||||
ssa_ast: 289bd77e7a9245c8d8dcbd89c528ff0b06151f8e878db4684c44f53560ca1edc
|
||||
flattened_ast: 311cc01ba9ea1770e99694309af47b04eb5aab964766f1c125b3ee441e8f3c3a
|
||||
destructured_ast: 0e3b7e1a59eb18a844fe53947c06b64208a8df3c217384568c8aff3e01635b69
|
||||
inlined_ast: 0e3b7e1a59eb18a844fe53947c06b64208a8df3c217384568c8aff3e01635b69
|
||||
dce_ast: b721d175e39abc3a87d5c390e5c984ad43fb734dfbfb5f1224acd41b232c9635
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: 8e5af978a77e15bbbf47f9025c5ad93b11577ef9b82a1b20835d7b476000074a
|
||||
unrolled_ast: 8e5af978a77e15bbbf47f9025c5ad93b11577ef9b82a1b20835d7b476000074a
|
||||
ssa_ast: e937decfcaff95c515d583feb0a34bf731c67bcbda8630d0582b1401d2f6c894
|
||||
flattened_ast: b1edf1cc607cb5008e0bfb45fd1c335b31877b4701f3b9cdbe1f8dafc2dd7e06
|
||||
destructured_ast: 8fb196364453dd517d282ecec4cbf3214d001ec642a084b62b75214b17469cfc
|
||||
inlined_ast: 8fb196364453dd517d282ecec4cbf3214d001ec642a084b62b75214b17469cfc
|
||||
dce_ast: 91b7c373ab7d91ceaed92088c802966d231a1c58c82cf3ae0ec21fa48bb66b69
|
||||
bytecode: 834629ba3e42f71f47ce3499d777661c415ac89ad9d797c54ec4267202d48690
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
unrolled_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
initial_ast: 75d87ef7e9712449d8e7caa2c13cdab57d357d794efab10436f7ff58a5b66531
|
||||
unrolled_ast: 75d87ef7e9712449d8e7caa2c13cdab57d357d794efab10436f7ff58a5b66531
|
||||
ssa_ast: ea5c9d8b322bc27cd74b43d781e1495bfed6b29d8bb33c0fd2b1dfe82b39710d
|
||||
flattened_ast: 96d30c81c7d2459cddd0f5366c8dfbad3cb48ef7f205e6e90dba715aee5d7cfb
|
||||
destructured_ast: a7fed27c8ed7d2dfc360c7c23c672f75c9095aae799d41d66233a8916d0f9095
|
||||
inlined_ast: a7fed27c8ed7d2dfc360c7c23c672f75c9095aae799d41d66233a8916d0f9095
|
||||
dce_ast: 6b7def707702f771bb41ee11637d5f312355c5f8fdb505c224c5ae19179c391e
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
unrolled_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
initial_ast: 5f33c08cdb5e22d7c1205004378e2f12c9c1995ca6e2e5a4d26e3998f508c95b
|
||||
unrolled_ast: 5f33c08cdb5e22d7c1205004378e2f12c9c1995ca6e2e5a4d26e3998f508c95b
|
||||
ssa_ast: 8bbbff498274b89e30b9f1198241543378e0d6196b8b03035e2af4aafd054a7d
|
||||
flattened_ast: e8ce32f070f276be670a8f16e75875b64f602ccdde870e32f9379f065bf3bca8
|
||||
destructured_ast: ecbd683e2fe643bf66884f87e51189ebb546e9911b6fdee878bfb2e6af1e6851
|
||||
inlined_ast: ecbd683e2fe643bf66884f87e51189ebb546e9911b6fdee878bfb2e6af1e6851
|
||||
dce_ast: 0462c15d429b8c65c4375284d9496131c4441e67282fee93a9f0b9a581c9fc87
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
unrolled_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
initial_ast: 4e6ae6d7d69089bf39d1411947dcd07dcd77b36b9d7675b26624b33b8aad3998
|
||||
unrolled_ast: 4e6ae6d7d69089bf39d1411947dcd07dcd77b36b9d7675b26624b33b8aad3998
|
||||
ssa_ast: fe754d72777d034fd79dd49917fc091fd7c756ecf5e37ede3eac696788f4b105
|
||||
flattened_ast: bcf86ca31cc46a5f9e49a87580f1e6c77ae49bc122b3d2b219e5842e4d34f41d
|
||||
destructured_ast: e36e7e3b8eefd9cf7524a797db761b855b22b0aba8d69c98e142e35f1f905581
|
||||
inlined_ast: e36e7e3b8eefd9cf7524a797db761b855b22b0aba8d69c98e142e35f1f905581
|
||||
dce_ast: 8672100a0935f435cc70ca91943669bcea43473de4193e4939b5b7d715100e77
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
unrolled_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
initial_ast: 16cc9b0724e9b9710a1fb2b2a102bf195cdf67ef04faff80eb44a98684d53287
|
||||
unrolled_ast: 16cc9b0724e9b9710a1fb2b2a102bf195cdf67ef04faff80eb44a98684d53287
|
||||
ssa_ast: fdcb2dd71b3081a87535865597a60e3611c6d06099cb5f1437f87e8a854b860b
|
||||
flattened_ast: 9622685fa672d5e99ecf1274e696cc0a24994bc508bb1cdaf49286344ff1e526
|
||||
destructured_ast: bc838823e9e86bb974a1f6078a49b60ba274812bca1058d5b276a6829f98fb1e
|
||||
inlined_ast: bc838823e9e86bb974a1f6078a49b60ba274812bca1058d5b276a6829f98fb1e
|
||||
dce_ast: c66a2e365c334442bd39de0096260a8f6d5dad071e3681fc5c24821f73978eb7
|
||||
bytecode: c702ea63bc91bf1aff738a0101761c3201a54f29324dfb4fbcfc7cef05017050
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: 43b97c42f8267843e2549269149197b281c28f02dd994852b0aca53e58f349fe
|
||||
unrolled_ast: 43b97c42f8267843e2549269149197b281c28f02dd994852b0aca53e58f349fe
|
||||
ssa_ast: 5198158375b12d51d1cbd773a49ff338f93ef8cdcf9bbae6a899ad01c60fbae3
|
||||
flattened_ast: 89fecf16de71804f935b862bbfd8e9142a3bb2ee6b4c94c29df356213cc06f26
|
||||
destructured_ast: dbb93c5e620a12f5c7c18593e54127b8dd8c9b8af0bca96212d710dcf103adf9
|
||||
inlined_ast: dbb93c5e620a12f5c7c18593e54127b8dd8c9b8af0bca96212d710dcf103adf9
|
||||
dce_ast: a7ce2b848dc5d17b6e817d4b82eb677840279daa6f895df069ef9d4ead20b755
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: f41b5d1390511e0b7498f813fba346f400ef66bf636f0d1e28dbb55869a80153
|
||||
unrolled_ast: f41b5d1390511e0b7498f813fba346f400ef66bf636f0d1e28dbb55869a80153
|
||||
ssa_ast: cbb8a516a4b76218ff24a3c56e42a435b0b8acb6ea33e2cb074a787ef51b22ab
|
||||
flattened_ast: 87ba6241b5819ea21eb90f7eb502bd1674196560d3343f39c59119c8b380a402
|
||||
destructured_ast: e4612e20aa9f9dbb9128f4423910188ba27e66b21eed6afe615e6bb1574a500d
|
||||
inlined_ast: e4612e20aa9f9dbb9128f4423910188ba27e66b21eed6afe615e6bb1574a500d
|
||||
dce_ast: dea0015bae3270eed36e9d7e9a1988ad1924df3eff4728499da344346f5fb439
|
||||
bytecode: a0a563d61716d3c6b3a75384d04fe6227332979ff3fb5d04a672e1db4e6fa8cb
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: cde267005ab63bbf7732222cdf11cba82760283e305d151eac86294c3ddeca5e
|
||||
type_checked_symbol_table: 70b1f7d016f3e65d2902d20fab38f69924278f04173bdbd4d112e98f751fe32d
|
||||
unrolled_symbol_table: 70b1f7d016f3e65d2902d20fab38f69924278f04173bdbd4d112e98f751fe32d
|
||||
initial_ast: 5f6fd488370ddabf60688e7a82ae1edba905b24baa66ad5958d1f940716222c7
|
||||
unrolled_ast: 5f6fd488370ddabf60688e7a82ae1edba905b24baa66ad5958d1f940716222c7
|
||||
ssa_ast: 144bf560eb807b71a9109791513c5b41a7f57bbf832fd80934342a8663c53264
|
||||
flattened_ast: 22a1c4e4990606cf97de0707dffa2a960ef8474b9aad394894ad4866bd090164
|
||||
destructured_ast: bff5a1c579c33f9e23d036f72562c65eef800d3afb530d6904776116a2c42ca2
|
||||
inlined_ast: bff5a1c579c33f9e23d036f72562c65eef800d3afb530d6904776116a2c42ca2
|
||||
dce_ast: 4e944a4d10877da57ae151e42e345fa76ec8636053ef3a2eadea1b9ae1867dd2
|
||||
- initial_symbol_table: 35faa74f7e63d6091fd26297a05671a6c5f428a70d5a37eb6e66a0b3600114d5
|
||||
type_checked_symbol_table: 95144067dd9f17706ebab908322cdd2ba6e86ca14fa23e543205a1ffa98dd4ad
|
||||
unrolled_symbol_table: 95144067dd9f17706ebab908322cdd2ba6e86ca14fa23e543205a1ffa98dd4ad
|
||||
initial_ast: d60a209f48b0a4b33519f098daa79b8b28be280323adeae4c0a616bcc5d62110
|
||||
unrolled_ast: d60a209f48b0a4b33519f098daa79b8b28be280323adeae4c0a616bcc5d62110
|
||||
ssa_ast: 30b3e677012b1457ef425207307f185d8c6197ee1d5f6ccf368b74ed85b5048d
|
||||
flattened_ast: 0f86fd9e319aefdb84bc8c75a61a1fa3be1f3df572b7eeced37a4e26b86ffb92
|
||||
destructured_ast: 77819eeb958302ce40bf40378fef4754d014a35cfbd966b8ea0bdd315fd0c0e2
|
||||
inlined_ast: 77819eeb958302ce40bf40378fef4754d014a35cfbd966b8ea0bdd315fd0c0e2
|
||||
dce_ast: 81b680f52e95ccb1c95e0342a4d2265504bce5056e28435d4dc99e3491ec4775
|
||||
bytecode: 6d1cfc85db8ba9546a0cce9391c99dc153031ab35a86b38ad443df534242c519
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
unrolled_symbol_table: b404533efadcaeef30740a21ad3082dca23435518e2bb64a39f224582270427d
|
||||
initial_ast: 8450e1f26989fb3d6919e1dd456ec7d1628409d343dc47dfe65d7e1b56d3b125
|
||||
unrolled_ast: 8450e1f26989fb3d6919e1dd456ec7d1628409d343dc47dfe65d7e1b56d3b125
|
||||
ssa_ast: 97e701a6958ad004fb3c9b3c42fabc813e992039f72ff0205ab5f02fab283db7
|
||||
flattened_ast: d6530d6cff222f1ca37c4297eb3e53f416b392056d0fd4dca56054d6187fce92
|
||||
destructured_ast: d9221537570ccbded673cc8b5b19eca9cfde46d41710ddaf563f47230bc94fe5
|
||||
inlined_ast: d9221537570ccbded673cc8b5b19eca9cfde46d41710ddaf563f47230bc94fe5
|
||||
dce_ast: e3404d1c783bf66373dd843923fc942faf9cac3d03baf1233feaa46f5e7f5759
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
unrolled_symbol_table: d52a860b0d3e8ebb88c7ff710fb3fd66e426ecc5047b8e52c7d7d32f66e63f78
|
||||
initial_ast: f970f8bfc18a141d78c7ba2bc154e7b98d109fb79d49d68c732c30f2eaec094c
|
||||
unrolled_ast: f970f8bfc18a141d78c7ba2bc154e7b98d109fb79d49d68c732c30f2eaec094c
|
||||
ssa_ast: 115f168e8b8eae9d237a56538e7efd216e73df68014ac8a1b34dc01f3ac4d666
|
||||
flattened_ast: 59e98dfa468eaa53d6519c3cf7a21d5a47e1b284aae3d210e294345b59319b8d
|
||||
destructured_ast: 2905c4ece34f216cd525b1c880d22c135f47b9449994893e308f7a813851087d
|
||||
inlined_ast: 2905c4ece34f216cd525b1c880d22c135f47b9449994893e308f7a813851087d
|
||||
dce_ast: bac68877a43e59546969a53a31ce99653130b5ab829ae7c191757101952c0410
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 47da8363d5a8d5de413b8fd97ec5cc722461f4128183f5effd20b39e456ba8da
|
||||
unrolled_symbol_table: 47da8363d5a8d5de413b8fd97ec5cc722461f4128183f5effd20b39e456ba8da
|
||||
initial_ast: 0a6f7adb02b761eed00f9f22f4283ae86e2aea6292eb755145976d04c6342c1f
|
||||
unrolled_ast: 0a6f7adb02b761eed00f9f22f4283ae86e2aea6292eb755145976d04c6342c1f
|
||||
ssa_ast: c85ad90dae7b9cd3f6c2d5aedb9b2404d6bc6d163d6e45b6551f791060462ea6
|
||||
flattened_ast: 0593ddd585a759c30cc44e5957cfac6ba55c23237bb2a0b6f29ecf84f634c0c0
|
||||
destructured_ast: 0c8a4cd277d1cda294a2e4a7a5212c81112101d069eb75250a8b48faf709567b
|
||||
inlined_ast: 0c8a4cd277d1cda294a2e4a7a5212c81112101d069eb75250a8b48faf709567b
|
||||
dce_ast: f6c481997c07d2f22662be92d8ca6fd5213ca4a05913cdab15772d9586196b1a
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 4dd7167568691e168581afd4519fb6792ec2912eaa964dfa639d601d18afbe67
|
||||
unrolled_symbol_table: 4dd7167568691e168581afd4519fb6792ec2912eaa964dfa639d601d18afbe67
|
||||
initial_ast: c6cc94a0fd64829de7efde5303a166bcdd30e6303a81a0bedb3e957a35b273d7
|
||||
unrolled_ast: c6cc94a0fd64829de7efde5303a166bcdd30e6303a81a0bedb3e957a35b273d7
|
||||
ssa_ast: 3342bb8d705f2e0f1be18350663f586a9b21cf42ee48fb1fcd14e4f07d818b79
|
||||
flattened_ast: 429470fd2cb83f493269e462f979d3c236df515488b51088657e3bf7c20b0df5
|
||||
destructured_ast: 59ebef3d5188e447ae61794169567d30d9aa8f089dae5f49964818613a52a098
|
||||
inlined_ast: 59ebef3d5188e447ae61794169567d30d9aa8f089dae5f49964818613a52a098
|
||||
dce_ast: 3c91eda2d8f8935ef0c1e94d3f26d46f456b44a3568c5f410d2ed30df98dc406
|
||||
bytecode: d6282c666e51c8c3f3ce541b16d07701dc4d0900acf44bf392cc235ed79a2484
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: f0f996bd026e52be88eda1f06611a250f07beb461598af45364338b71c6be67e
|
||||
type_checked_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
unrolled_symbol_table: ff73715654c51dd2d9fea914a60b8e6cae327c41c9b70edd77e8bc4e12e811e9
|
||||
initial_ast: cd85e14fa8d115408d3adba483f5a8ce4eed4eee9200f64c7f770175dd4743ec
|
||||
unrolled_ast: cd85e14fa8d115408d3adba483f5a8ce4eed4eee9200f64c7f770175dd4743ec
|
||||
ssa_ast: 72071bf01977d6409019f3ea58bd6e7af3a75c8f2f5ecac57ed76d993bae0f0d
|
||||
flattened_ast: 09723d23b72843c74c9116806e50116bdb2a51dd97396faed0fcb212c0bb4cd4
|
||||
destructured_ast: 267c124cb66b7910e36f9eedbeea1f45c1d5524e4222bc81b94026892a8cb1f2
|
||||
inlined_ast: 267c124cb66b7910e36f9eedbeea1f45c1d5524e4222bc81b94026892a8cb1f2
|
||||
dce_ast: 6d9bca3d769f863cb916c41731fef0e247f3c85fa217be14ea7eff3eb3aeee3f
|
||||
- initial_symbol_table: 50685756468b80481a31a2082a3df618d0e2ac34d08f6954df2f2b82de7d11b1
|
||||
type_checked_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
unrolled_symbol_table: 00b97f407ed6f4025b85376bc8d0b25e1d3a8430a6ab420e1e183a5c1b6e430d
|
||||
initial_ast: fb08394f4d3809df07ea2bd43d1a2d603a5b60bd5ec0ebea53924e2e477932b3
|
||||
unrolled_ast: fb08394f4d3809df07ea2bd43d1a2d603a5b60bd5ec0ebea53924e2e477932b3
|
||||
ssa_ast: 7459d8925c091bdd6d6114d393ec10fd1b244dfa08cd35c2770cccb3dd14d74b
|
||||
flattened_ast: 2c7a7d7a588435725614843424b7c52c5ce25e02c20a84af98b9c6312a6bf7c7
|
||||
destructured_ast: e33b97e520f7e1f94c024641d11365b706c815c4bc3af2f4c5ddd4d15abd7a1e
|
||||
inlined_ast: e33b97e520f7e1f94c024641d11365b706c815c4bc3af2f4c5ddd4d15abd7a1e
|
||||
dce_ast: 2ca3e75ed482aa6b570ff3a7ac124f10f3d243f9eba535c10759c4c36ce79070
|
||||
bytecode: 229ed43ca637238faed92dd4732941e7c471f274c74ecfe4c2a77beca892bb62
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
unrolled_symbol_table: 9276817b440938ef8b32982f5bbfa1161c9d01d5f02c8440c3dc0ddbc30ba758
|
||||
initial_ast: 0e14221fbe48218c4354e80885d3e327ca213b22c42320310b21173fb02de160
|
||||
unrolled_ast: 0e14221fbe48218c4354e80885d3e327ca213b22c42320310b21173fb02de160
|
||||
ssa_ast: 092906f44c79f50a839a589dc6b4370e0539e990c1ad241dbf285dc6a8f14506
|
||||
flattened_ast: 8fb7766f1d6f9bd5c789f61e44207eab1ddb04d3725ed514a31cefd774ab5371
|
||||
destructured_ast: ac9eca13004ba22274600b6d7dd107e4b7d5fde4d1917c7c760c21c4d48cbd33
|
||||
inlined_ast: ac9eca13004ba22274600b6d7dd107e4b7d5fde4d1917c7c760c21c4d48cbd33
|
||||
dce_ast: 6b7def707702f771bb41ee11637d5f312355c5f8fdb505c224c5ae19179c391e
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
unrolled_symbol_table: 98151b61965a5ad83116770d19d69a429dbe167b4d4554ba1da8adddb45c6d11
|
||||
initial_ast: 3e30a24d3bdbc75b54c300a8e99fc4e1d513af6c597b1291c9dfb7e67da8c297
|
||||
unrolled_ast: 3e30a24d3bdbc75b54c300a8e99fc4e1d513af6c597b1291c9dfb7e67da8c297
|
||||
ssa_ast: 9be7ed8b9da16a2c38800e35ebcfc92d33e7ffe72f68ee3b19bc46ec2c162dfd
|
||||
flattened_ast: 8e8a6533cfd710c1e78601156991d3105b67d8a3998cf9e3986d35a92e7faedc
|
||||
destructured_ast: 3d07ad984a3a1b8968fa045b62b6ebb7e8f7ecd654c1b59060147ec1b6c9598f
|
||||
inlined_ast: 3d07ad984a3a1b8968fa045b62b6ebb7e8f7ecd654c1b59060147ec1b6c9598f
|
||||
dce_ast: 0462c15d429b8c65c4375284d9496131c4441e67282fee93a9f0b9a581c9fc87
|
||||
bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
@ -3,16 +3,16 @@ namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 0f5d36005197cb2fccb650b60da08e392ad4e36923fd4feb47db3a6fbb7a11de
|
||||
type_checked_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
unrolled_symbol_table: b67f708cc4a8ce4a48b40eefd2c35bfdfc54b558566f9ffee5c211dfd489ef66
|
||||
initial_ast: ae59244f2bd676657c0aad37e442ef03934174281adf3a27bd914077f69208c1
|
||||
unrolled_ast: ae59244f2bd676657c0aad37e442ef03934174281adf3a27bd914077f69208c1
|
||||
ssa_ast: 42cf5290655ca612270cf71a323f93c8f772e5829f8351b80ffd5e61f88ab7ac
|
||||
flattened_ast: aa9b328501b8b3e39aeb00afba3d3eb4d63bc4ebb0473f0a02318c34b7c0b658
|
||||
destructured_ast: 88c731b22a1998ca5be0319e603e7c91cb65fc47a8c29dbbb61d55c76028363c
|
||||
inlined_ast: 88c731b22a1998ca5be0319e603e7c91cb65fc47a8c29dbbb61d55c76028363c
|
||||
dce_ast: 01f971e7e390bfeab22fe4d123184cc813bcdcc6ebdc71f1830a63cafcb2aba6
|
||||
- initial_symbol_table: a32d8e2614c0c938f3045c99a5ae1a9435cd34da9c543bb2fd3b10e6128d9837
|
||||
type_checked_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
unrolled_symbol_table: 8afab6b4e6604768c1db1398838c274386d1b3d4b526967bd16c3d2222866519
|
||||
initial_ast: 6b68c65600169f8c8cee0a021d375084f0ddeb6149fae46b9573c699766c5ab3
|
||||
unrolled_ast: 6b68c65600169f8c8cee0a021d375084f0ddeb6149fae46b9573c699766c5ab3
|
||||
ssa_ast: ee19175861e7e4461f9fa8cca8cae7fadf14c65c7b01a8b8be6954204dafcc8d
|
||||
flattened_ast: 10cd22a4a10187d6e06d8c06634296f3645b14a042df3f9ea0ace3f4a6b74231
|
||||
destructured_ast: c91853dca89651fb270296c523104264a444cd1e60770ce61f814f049d24cd41
|
||||
inlined_ast: c91853dca89651fb270296c523104264a444cd1e60770ce61f814f049d24cd41
|
||||
dce_ast: 745d5f7d5e373f50f54aeeeb329f068083761fdae2946b3edc490a04f0c4fd99
|
||||
bytecode: 7da691d67f81116d91fb60593fa7fbac92c7409ecb5728174beee3fc612716a0
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user