Merge pull request #2263 from AleoHQ/feat/record-visibility

[Feature] Visibilities for record members.
This commit is contained in:
d0cd 2023-02-14 16:38:54 -08:00 committed by GitHub
commit 067dadb12b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 474 additions and 212 deletions

1
Cargo.lock generated
View File

@ -1205,6 +1205,7 @@ dependencies = [
"leo-span",
"leo-test-framework",
"rand",
"regex",
"serde",
"serde_yaml",
"sha2",

View File

@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum Mode {
None,
Const,
Constant,
Private,
Public,
}
@ -32,7 +32,7 @@ impl fmt::Display for Mode {
match self {
None => write!(f, ""),
Const => write!(f, "const"),
Constant => write!(f, "constant"),
Private => write!(f, "private"),
Public => write!(f, "public"),
}

View File

@ -14,19 +14,24 @@
// 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::{Identifier, Type};
use leo_span::Symbol;
use crate::{Identifier, Mode, Node, Type};
use leo_span::{Span, Symbol};
use serde::{Deserialize, Serialize};
use std::fmt;
/// A member of a struct definition, e.g `foobar: u8`.
/// A member of a structured data type, e.g `foobar: u8` or `private baz: bool` .
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Member {
/// The mode of the member.
pub mode: Mode,
/// The identifier of the member.
pub identifier: Identifier,
/// The type of the member.
pub type_: Type,
/// The span of the member.
pub span: Span,
}
impl Member {
@ -38,6 +43,11 @@ impl Member {
impl fmt::Display for Member {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}: {}", self.identifier, self.type_)
match self.mode {
Mode::None => write!(f, "{}: {}", self.identifier, self.type_),
_ => write!(f, "{} {} {}", self.mode, self.identifier, self.type_),
}
}
}
crate::simple_node_impl!(Member);

View File

@ -54,6 +54,9 @@ workspace = true
default-features = false
features = [ "aleo-cli", "circuit", "console", "parallel" ]
[dev-dependencies.regex]
version = "1.7.1"
[dev-dependencies.serde]
version = "1.0.152"
features = [ "derive" ]

View File

@ -18,6 +18,8 @@ mod utilities;
use utilities::{buffer_if_err, compile_and_process, parse_program, BufferEmitter};
use utilities::{get_cwd_option, setup_build_directory, Aleo, Network};
use crate::utilities::{hash_asts, hash_content};
use leo_errors::emitter::Handler;
use leo_span::symbol::create_session_if_not_set_then;
use leo_test_framework::{
@ -28,8 +30,8 @@ use leo_test_framework::{
use snarkvm::console;
use snarkvm::prelude::*;
use crate::utilities::{hash_asts, hash_content};
use leo_test_framework::test::TestExpectationMode;
use regex::Regex;
use serde::{Deserialize, Serialize};
use serde_yaml::Value;
use std::collections::BTreeMap;
@ -129,7 +131,20 @@ fn run_test(test: Test, handler: &Handler, err_buf: &BufferEmitter) -> Result<Va
) {
Ok((response, _, _, _)) => format!(
"[{}]",
response.outputs().iter().map(|output| output.to_string()).join(", ")
response
.outputs()
.iter()
.map(|output| {
match output {
// Remove the `_nonce` from the record string.
console::program::Value::Record(record) => {
let pattern = Regex::new(r"_nonce: \d+group.public").unwrap();
pattern.replace(&record.to_string(), "").to_string()
}
_ => output.to_string(),
}
})
.join(", ")
),
Err(err) => format!("SnarkVMError({err})"),
};

View File

@ -223,19 +223,26 @@ impl ParserContext<'_> {
}
/// Parses `IDENT: TYPE`.
pub(super) fn parse_typed_ident(&mut self) -> Result<(Identifier, Type)> {
pub(super) fn parse_typed_ident(&mut self) -> Result<(Identifier, Type, Span)> {
let name = self.expect_identifier()?;
self.expect(&Token::Colon)?;
let type_ = self.parse_type()?.0;
let (type_, span) = self.parse_type()?;
Ok((name, type_))
Ok((name, type_, name.span + span))
}
/// Returns a [`Member`] AST node if the next tokens represent a struct member variable.
fn parse_member_variable_declaration(&mut self) -> Result<Member> {
let (identifier, type_) = self.parse_typed_ident()?;
let mode = self.parse_mode()?;
Ok(Member { identifier, type_ })
let (identifier, type_, span) = self.parse_typed_ident()?;
Ok(Member {
mode,
identifier,
type_,
span,
})
}
/// Parses a struct or record definition, e.g., `struct Foo { ... }` or `record Foo { ... }`.
@ -278,6 +285,7 @@ impl ParserContext<'_> {
))
}
// TODO: Return a span associated with the mode.
/// Returns a [`ParamMode`] AST node if the next tokens represent a function parameter mode.
pub(super) fn parse_mode(&mut self) -> Result<Mode> {
let private = self.eat(&Token::Private).then_some(self.prev_token.span);
@ -293,8 +301,8 @@ impl ParserContext<'_> {
(None, None, None, None) => Ok(Mode::None),
(Some(_), None, None, None) => Ok(Mode::Private),
(None, Some(_), None, None) => Ok(Mode::Public),
(None, None, Some(_), None) => Ok(Mode::Const),
(None, None, None, Some(_)) => Ok(Mode::Const),
(None, None, Some(_), None) => Ok(Mode::Constant),
(None, None, None, Some(_)) => Ok(Mode::Constant),
_ => {
let mut spans = [private, public, constant, const_].into_iter().flatten();

View File

@ -150,10 +150,15 @@ impl<'a> CodeGenerator<'a> {
// Construct and append the record variables.
for var in record.members.iter() {
let mode = match var.mode {
Mode::Constant => "constant",
Mode::Public => "public",
Mode::None | Mode::Private => "private",
};
writeln!(
output_string,
" {} as {}.private;", // todo: CAUTION private record variables only.
var.identifier, var.type_,
" {} as {}.{mode};", // todo: CAUTION private record variables only.
var.identifier, var.type_
)
.expect("failed to write to string");
}

View File

@ -517,7 +517,7 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
}
// Check struct member types.
struct_.members.iter().for_each(|Member { identifier, type_ }| {
struct_.members.iter().for_each(|Member { identifier, type_, .. }| {
// Lookup struct variable name.
if let Some(actual) = input
.members

View File

@ -94,11 +94,18 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
// Check for conflicting struct/record member names.
let mut used = HashSet::new();
// TODO: Better span to target duplicate member.
if !input.members.iter().all(|Member { identifier, type_ }| {
// Check that the member types are defined.
self.assert_type_is_defined(type_, identifier.span);
used.insert(identifier.name)
}) {
if !input.members.iter().all(
|Member {
identifier,
type_,
span,
..
}| {
// Check that the member types are defined.
self.assert_type_is_defined(type_, *span);
used.insert(identifier.name)
},
) {
self.emit_err(if input.is_record {
TypeCheckerError::duplicate_record_variable(input.name(), input.span())
} else {
@ -108,32 +115,37 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
// For records, enforce presence of `owner: Address` and `gates: u64` members.
if input.is_record {
let check_has_field = |need, expected_ty: Type| match input
.members
.iter()
.find_map(|Member { identifier, type_ }| (identifier.name == need).then_some((identifier, type_)))
{
Some((_, actual_ty)) if expected_ty.eq_flat(actual_ty) => {} // All good, found + right type!
Some((field, _)) => {
self.emit_err(TypeCheckerError::record_var_wrong_type(
field,
expected_ty,
input.span(),
));
}
None => {
self.emit_err(TypeCheckerError::required_record_variable(
need,
expected_ty,
input.span(),
));
}
};
let check_has_field =
|need, expected_ty: Type| match input.members.iter().find_map(|Member { identifier, type_, .. }| {
(identifier.name == need).then_some((identifier, type_))
}) {
Some((_, actual_ty)) if expected_ty.eq_flat(actual_ty) => {} // All good, found + right type!
Some((field, _)) => {
self.emit_err(TypeCheckerError::record_var_wrong_type(
field,
expected_ty,
input.span(),
));
}
None => {
self.emit_err(TypeCheckerError::required_record_variable(
need,
expected_ty,
input.span(),
));
}
};
check_has_field(sym::owner, Type::Address);
check_has_field(sym::gates, Type::Integer(IntegerType::U64));
}
for Member { identifier, type_ } in input.members.iter() {
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(
@ -148,6 +160,10 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
if let Type::Identifier(member_type) = type_ {
self.struct_graph.add_edge(input.identifier.name, member_type.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));
}
}
}
@ -219,7 +235,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
// Note that this unwrap is safe since we assign to `self.variant` above.
match self.variant.unwrap() {
// If the function is a transition function, then check that the parameter mode is not a constant.
Variant::Transition if input_var.mode() == Mode::Const => self.emit_err(
Variant::Transition 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.
@ -277,7 +293,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
}
// Check that the mode of the output is valid.
// For functions, only public and private outputs are allowed
if function_output.mode == Mode::Const {
if function_output.mode == Mode::Constant {
self.emit_err(TypeCheckerError::cannot_have_constant_output_mode(function_output.span));
}
}
@ -334,7 +350,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
self.emit_err(TypeCheckerError::finalize_cannot_take_tuple_as_input(input_var.span()))
}
// Check that the input parameter is not constant or private.
if input_var.mode() == Mode::Const || input_var.mode() == Mode::Private {
if input_var.mode() == Mode::Constant || input_var.mode() == Mode::Private {
self.emit_err(TypeCheckerError::finalize_input_mode_must_be_public(input_var.span()));
}
// Check for conflicting variable names.
@ -361,7 +377,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
}
// Check that the mode of the output is valid.
// Note that a finalize block can have only public outputs.
if matches!(output_type.mode(), Mode::Const | Mode::Private) {
if matches!(output_type.mode(), Mode::Constant | Mode::Private) {
self.emit_err(TypeCheckerError::finalize_output_mode_must_be_public(
output_type.span(),
));

View File

@ -72,7 +72,7 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
let var_type = if let Some(var) = self.symbol_table.borrow_mut().lookup_variable(var_name.name) {
match &var.declaration {
VariableType::Const => self.emit_err(TypeCheckerError::cannot_assign_to_const_var(var_name, var.span)),
VariableType::Input(Mode::Const) => {
VariableType::Input(Mode::Constant) => {
self.emit_err(TypeCheckerError::cannot_assign_to_const_input(var_name, var.span))
}
_ => {}

View File

@ -559,4 +559,11 @@ create_messages!(
},
help: None,
}
@formatted
struct_cannot_have_member_mode {
args: (),
msg: format!("A struct cannot have a member with mode `constant`, `private`, or `public`."),
help: None,
}
);

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: fd71e8fd519abdaf6d5abe40e167766800e80d7f9bb2523b13e2fa318598f9ef
unrolled_ast: fd71e8fd519abdaf6d5abe40e167766800e80d7f9bb2523b13e2fa318598f9ef
ssa_ast: d257cbd300cbeb2ad9d4246839296ce9a33751827bb7c2fddab7d07fdf077dd5
flattened_ast: 80ffd6de6e7429119f5098f8f0d8290fcfc1b5c3aa00f86a9153cb1471547af6
inlined_ast: 80ffd6de6e7429119f5098f8f0d8290fcfc1b5c3aa00f86a9153cb1471547af6
- initial_ast: 75a36838e40b40528abbeb2a752b51db98a9eb6537aa3ec5d812a0e0ce3c64b9
unrolled_ast: 75a36838e40b40528abbeb2a752b51db98a9eb6537aa3ec5d812a0e0ce3c64b9
ssa_ast: 0c66a00da3384b853fd83ecb3747abf1101af0c39849fd75af793a68537f714d
flattened_ast: 7a2b73a748d86babab5ca7a4f9e513cfd028dcbadc7df8baeb7774ffb54c1b43
inlined_ast: 7a2b73a748d86babab5ca7a4f9e513cfd028dcbadc7df8baeb7774ffb54c1b43
bytecode: fdc5659b97d4dbfea710ca848dcffa29bcd4da3a7a54739fb916e5292284a1a4

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 4a8dc50cee056a918b491cba6cb3099695e1a76119b5aba7a31a820eb8a87d35
unrolled_ast: 4a8dc50cee056a918b491cba6cb3099695e1a76119b5aba7a31a820eb8a87d35
ssa_ast: 7237101f0bbd24e60a7b15718981024268b4db6d751b739cafb18c133b639713
flattened_ast: 7ae62df655e7b0450817324f4e45f680ec4e19978e2629c9be2b4f93aa0bd519
inlined_ast: 7ae62df655e7b0450817324f4e45f680ec4e19978e2629c9be2b4f93aa0bd519
- initial_ast: 91862d403b538c1100f31dc5979ffee097a3c71173315bda9b00e2b2fbd246cb
unrolled_ast: 91862d403b538c1100f31dc5979ffee097a3c71173315bda9b00e2b2fbd246cb
ssa_ast: 869edce87a429184f914c6ff72592de2e8dc1395f8b413237857c4111a796d39
flattened_ast: a2b862ac405e65f5dd9258cff25237c23ea457bfa8b5c449da49248d326f28d0
inlined_ast: a2b862ac405e65f5dd9258cff25237c23ea457bfa8b5c449da49248d326f28d0
bytecode: 65dcc91a4e07d98f73a0eb5b43d945f85859694417bd643b3ebba0d40494d001

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: eda5b3638cf36c8454468ab8eef2a6d0ebc61bb1a66b1cba1ae4f8315753e204
unrolled_ast: eda5b3638cf36c8454468ab8eef2a6d0ebc61bb1a66b1cba1ae4f8315753e204
ssa_ast: 3cc52869ffc8473ac37b723f6d1e996b06e7aa9c659f19720d15d0624ea59bf9
flattened_ast: c75e5f5d43494ea1c16ab46cddd1080bb0b56cc0ada1bc6b769fe2f4e5018e9e
inlined_ast: c75e5f5d43494ea1c16ab46cddd1080bb0b56cc0ada1bc6b769fe2f4e5018e9e
- initial_ast: 3264d91e7918b4576be9b02519ad678de98bd28789f866076a2db87f8bf6de13
unrolled_ast: 3264d91e7918b4576be9b02519ad678de98bd28789f866076a2db87f8bf6de13
ssa_ast: bc7b8721cbfb437ea6eb609ec335e9e22ddabb3f9240488801f9f193cf14b403
flattened_ast: b237061bd9ae5a830947d80f051bbee4e7ced839dee6a1fb28f868aa3c7a4537
inlined_ast: b237061bd9ae5a830947d80f051bbee4e7ced839dee6a1fb28f868aa3c7a4537
bytecode: 629677c0e48a743b2fc341de20c6b14ccc59d74c6ae08c317bdf597e0cc2f749

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 26911d8bca0e30e7bffd6abdde2ceef7485781af40e0707f1fb79d4461a7b9cd
unrolled_ast: 26911d8bca0e30e7bffd6abdde2ceef7485781af40e0707f1fb79d4461a7b9cd
ssa_ast: 44075583b8ebb223476e90b1b7bff6b1d6a65978ff2caae4ee2eb76f7c9aac6c
flattened_ast: 4ed800dd53990580a2a318e46932e29df53fce35a9f228750fc8bce335e3576e
inlined_ast: 4ed800dd53990580a2a318e46932e29df53fce35a9f228750fc8bce335e3576e
- initial_ast: f7ace4c6722a161a5d16489b3e0fa4734bae59f500fbe619bcade17e3cb559e7
unrolled_ast: f7ace4c6722a161a5d16489b3e0fa4734bae59f500fbe619bcade17e3cb559e7
ssa_ast: 649adcba3bd743536eab0aaf9d81ca0b72911c7b9b5d83f23c73a481102c36e0
flattened_ast: 133fcd28e2d6767664071a0af992bc9601e481ac2ea9f17faf624f144c43bc4b
inlined_ast: 133fcd28e2d6767664071a0af992bc9601e481ac2ea9f17faf624f144c43bc4b
bytecode: a120b1e1d98948faf72473e55ec5ee1ea7ead4b7b5e4e79560053918dc1ff81b

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: c7ff62b1364b62c4350b33ceb0525ee7007cb3f969641d2eecc393efc6e5e5e4
unrolled_ast: c7ff62b1364b62c4350b33ceb0525ee7007cb3f969641d2eecc393efc6e5e5e4
ssa_ast: ca140fdf0902378ff3e3cc7160c8d4e843171bcaa9ae2389c478a2c73b983345
flattened_ast: 9be84865a93e187128e8c2fc1149abeb52f62b6704925ba25b49c02b16433418
inlined_ast: 9be84865a93e187128e8c2fc1149abeb52f62b6704925ba25b49c02b16433418
- initial_ast: fae17dce96224c854538e0acdd1d2ccfd1755aec4e48913d67febd5155025f32
unrolled_ast: fae17dce96224c854538e0acdd1d2ccfd1755aec4e48913d67febd5155025f32
ssa_ast: c5ef5cf3a66b8fd09c4fb651bec9feec382af6aa025ca54f2514fcba1b781d30
flattened_ast: 3dab7bf9e471da6c3f524c510c64c6b5a8850ea4e4b644f3a5513c9d5fcf622a
inlined_ast: 3dab7bf9e471da6c3f524c510c64c6b5a8850ea4e4b644f3a5513c9d5fcf622a
bytecode: 0098070069139200be104771fcb1807e52b331b50bab0dc82d3a16d451e4db97

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 8c19f3a015926d3333017cb8d3311be2550d83e09c06c3c58176bd3c21716252
unrolled_ast: 8c19f3a015926d3333017cb8d3311be2550d83e09c06c3c58176bd3c21716252
ssa_ast: 992bfc5526a3849095f173452bc0046a0523c965fa367d6242e982613d0b23d2
flattened_ast: 178ad0e9092cd550d97360a8b8cef5f98e1c66c084a7df1e7ba930b12d83bb57
inlined_ast: 178ad0e9092cd550d97360a8b8cef5f98e1c66c084a7df1e7ba930b12d83bb57
- initial_ast: c4a71c6a0f72897bfd540fc6bbf6d440d1f827746cecabd5094a9eba1ba249c0
unrolled_ast: c4a71c6a0f72897bfd540fc6bbf6d440d1f827746cecabd5094a9eba1ba249c0
ssa_ast: 7118572de7aef8ba01b0211cfa1e40d92c5d856256f91e5ffddd5621b935e2b8
flattened_ast: de6afb7703d3e89ab7a00c33683a690bdc401e58278bd27164b623088835570d
inlined_ast: de6afb7703d3e89ab7a00c33683a690bdc401e58278bd27164b623088835570d
bytecode: b9875b017a81226905d6fec1324bf41bc859bb4fca832de6b5309224ca343511

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 809cb6c8d6b69d3866a1b15c1d4caed220b0f63fdd83373b347ffd0dabbf873b
unrolled_ast: 809cb6c8d6b69d3866a1b15c1d4caed220b0f63fdd83373b347ffd0dabbf873b
ssa_ast: bceed5c819391bf5b52644c9acd3ad48485ad8c549f6e41592db3457664851c7
flattened_ast: 556b4b4c66f55375093c41eaf4e524e2b333b423672c538db60fd18a249068ad
inlined_ast: 556b4b4c66f55375093c41eaf4e524e2b333b423672c538db60fd18a249068ad
- initial_ast: 4fe2842db5a366b9cc40a7d61e5f601471ab00369d754eeb06c63063b166eb0b
unrolled_ast: 4fe2842db5a366b9cc40a7d61e5f601471ab00369d754eeb06c63063b166eb0b
ssa_ast: 907da2b9128857218e5c3a6f94e66f6fea60002fb84edfc152737a02cf7dacd1
flattened_ast: 75c3f273bfeb27f285138e30b1cbc97f1b45d310dd8bd59278bea1c44ae66f6b
inlined_ast: 75c3f273bfeb27f285138e30b1cbc97f1b45d310dd8bd59278bea1c44ae66f6b
bytecode: 976c0daf1133bb687c763b552cf546d3c02ad6f2ba23def2a1aec0e56e5aff64

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: b3f5b26e60cf731201f24d6a0d24983196996478f878dadca2aa6b0bc9ec25fc
unrolled_ast: b3f5b26e60cf731201f24d6a0d24983196996478f878dadca2aa6b0bc9ec25fc
ssa_ast: 9d8bc97ef40df6abb744d278769607e6f22c86ccf03767dc36e1589fbf1c7e76
flattened_ast: eb1efd8a8e0fa18452cbb0aa136995b9823d3b53fe8e579c49b31f721d65cf53
inlined_ast: eb1efd8a8e0fa18452cbb0aa136995b9823d3b53fe8e579c49b31f721d65cf53
- initial_ast: d70daf2abc3e9a8ba4424c3c370c2037c973e05c2048ed0dc1d7ff72f14bc60a
unrolled_ast: d70daf2abc3e9a8ba4424c3c370c2037c973e05c2048ed0dc1d7ff72f14bc60a
ssa_ast: 782104fd26bd70f18b2a7baedd9594ffa0c7879e0a8e9fdfd8e66f03b51102c6
flattened_ast: 8e4b0058f7016f503300ac68760852dff28900eaa79215926464b924665ebcb6
inlined_ast: 8e4b0058f7016f503300ac68760852dff28900eaa79215926464b924665ebcb6
bytecode: d8c824aec550f73676651160b81bf3e546b5958ec8520629f779b9156b033032

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: df336b5d77ece6762c2c118cb15cc6f25a6f108b66df81d8986ff2ba69d45461
unrolled_ast: df336b5d77ece6762c2c118cb15cc6f25a6f108b66df81d8986ff2ba69d45461
ssa_ast: ab2119a0fea501f0cbe04cdf465230625ee6f447ee9e7fe110b64aa6fc3c6192
flattened_ast: 97b6619ac108948a86250e9498148db33ae70756677e6ed23474e8268f9c061c
inlined_ast: 97b6619ac108948a86250e9498148db33ae70756677e6ed23474e8268f9c061c
- initial_ast: 8a14b07c6c839a99d03dd0500335bda9fd2b8deec52b42edaf4ddf3aa3735037
unrolled_ast: 8a14b07c6c839a99d03dd0500335bda9fd2b8deec52b42edaf4ddf3aa3735037
ssa_ast: ea512a03053a33e37bb817d6c4592043329e98e1f9a115fd101d74ccd239e2c2
flattened_ast: 68fd19aa7e43e46b9ffa4f23e518e0b3d818b9ad10f8521c3be324241fb36521
inlined_ast: 68fd19aa7e43e46b9ffa4f23e518e0b3d818b9ad10f8521c3be324241fb36521
bytecode: 45f6f395a7abca14ca5a1e3d5dc3fb2ac5ea3946740553ca5aee7a5822a235ec

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 8e58cb6efd83104f693ef4a01ff24d7c9975357b2c01a3f5bf332d55738e90cf
unrolled_ast: 8e58cb6efd83104f693ef4a01ff24d7c9975357b2c01a3f5bf332d55738e90cf
ssa_ast: 44567392e4c23c50c0e6be993952ce738f3b6315ebb825f8ffe292937b3a30ba
flattened_ast: ab0f2b3350a96338d70af7d1e3e27ea74273c95b83591e365724250a3633a406
inlined_ast: ab0f2b3350a96338d70af7d1e3e27ea74273c95b83591e365724250a3633a406
- initial_ast: 5b68dd17af0f5bab6f5cc67f2b47a35760041ef9ff4df7ea8f010559bae5781a
unrolled_ast: 5b68dd17af0f5bab6f5cc67f2b47a35760041ef9ff4df7ea8f010559bae5781a
ssa_ast: ef60c984ccfa580d1285dbbfe0d43553f1fd22b2d3a23f677e41a6d9943135ba
flattened_ast: e2383f7bb4b70472e366c8285f017807b15eb2bffb747ff31cfcf4078318f186
inlined_ast: e2383f7bb4b70472e366c8285f017807b15eb2bffb747ff31cfcf4078318f186
bytecode: b82322298b5a498c7a2a308c597a5e5d546becd9ff6d05d0c571247e09f1cb7d

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: e7b840ff0656282ab0864e77d5e3f4a3053e98c131ccf0934f1815477c00214f
unrolled_ast: e7b840ff0656282ab0864e77d5e3f4a3053e98c131ccf0934f1815477c00214f
ssa_ast: c06874c153b1936f3caaa78f246738326ece3b38597f6507d11acf05f1d70375
flattened_ast: f776dd25cd7be3d76ca22588625d64ef4df262e70aa069a3664e5045000f8bac
inlined_ast: f776dd25cd7be3d76ca22588625d64ef4df262e70aa069a3664e5045000f8bac
- initial_ast: 9c2d420ea86a2611aed31072a96be5973fe931cb5208834dbbaaa85832dad479
unrolled_ast: 9c2d420ea86a2611aed31072a96be5973fe931cb5208834dbbaaa85832dad479
ssa_ast: c1b75e3e3caf0094fc3a3a955dfbfbd844d86a9da4ffbad5646cf2d079c8fc49
flattened_ast: 42ab17eace07ba9fa174e1dd7f509045476ae4e3dab1393fe302973880bc4da8
inlined_ast: 42ab17eace07ba9fa174e1dd7f509045476ae4e3dab1393fe302973880bc4da8
bytecode: 849a917a861f86e0a277f0a92a018a81f6f6d69762816e29e585452dd805a1c1

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: fb480abe75542e3b109f037b1ffd53ea64bb92b21f2b33f8297e2d6f24dc1fc0
unrolled_ast: fb480abe75542e3b109f037b1ffd53ea64bb92b21f2b33f8297e2d6f24dc1fc0
ssa_ast: e213f529b4ff45bebaac280ee485c8bdc3af09463c349368ab236a26cf0a9370
flattened_ast: bfaa00a0b6158f6798f5aa5852a07aa9f437d80a9b0e4e811a192fe111111084
inlined_ast: bfaa00a0b6158f6798f5aa5852a07aa9f437d80a9b0e4e811a192fe111111084
- initial_ast: 417887bbb9a8fddcc52848e4517ffd59dcaaf35512e1166df3838f0a15f7ac74
unrolled_ast: 417887bbb9a8fddcc52848e4517ffd59dcaaf35512e1166df3838f0a15f7ac74
ssa_ast: 95bf4aa7a18c4e152ae24292bcba2cef5c3fc2c7bea6cdc80d146f3e31ebe984
flattened_ast: a698ca5479fd0b3b6e7a4d55f9f0c06c1390f920145357a2e3e46e8b453f5ad5
inlined_ast: a698ca5479fd0b3b6e7a4d55f9f0c06c1390f920145357a2e3e46e8b453f5ad5
bytecode: 8d921ede85807f033431e06b604875bb1f6712fb96957faa5a805fe02fe24245

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 654954e49f42b92d7405fb08be0dcd80810abbdd366623ed6bb36ba99ddbaa58
unrolled_ast: 654954e49f42b92d7405fb08be0dcd80810abbdd366623ed6bb36ba99ddbaa58
ssa_ast: 45cca036e205fdb706c442f8d507038e0ec813cfa4de443b8c69c8485d5256e9
flattened_ast: 8a8a44500158d7b38ccf354a7d14c4292c3cc302889489d0fe3761c1917befed
inlined_ast: 8a8a44500158d7b38ccf354a7d14c4292c3cc302889489d0fe3761c1917befed
- initial_ast: 6e57e1c0c5d4df7eaf414939293c79c156c77f9ee78064dd35572f0d54ec2b85
unrolled_ast: 6e57e1c0c5d4df7eaf414939293c79c156c77f9ee78064dd35572f0d54ec2b85
ssa_ast: 4c6468604104edfe6a6d2a5f4d80c557b001bc60b1e4098f80eda119afdbb292
flattened_ast: bb26f3622ed2fa2f301ac07069ae281a5e5bea1d52fec8cdb03b03131ad0b4f6
inlined_ast: bb26f3622ed2fa2f301ac07069ae281a5e5bea1d52fec8cdb03b03131ad0b4f6
bytecode: 1da5a78fcb6f77bd197de7dce1e7e94e7a9d30a6ec26703a645b25ab7c65cc08

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: d9f4c437725505b182331f81158f4d4fe868ac4c51bc09e7adb207668875c1d3
unrolled_ast: d9f4c437725505b182331f81158f4d4fe868ac4c51bc09e7adb207668875c1d3
ssa_ast: 52bde71da7f559a45cb7dff0b9ec4634cbca56d1d02dad9ade11cd733590d5e1
flattened_ast: 47f2df48295953cd15343288c0ce7de1394e82e6c34734992397df74c1b2138a
inlined_ast: 419b798e293216e127d3a3ed8775e39a5ab0c6cb2b0bfbcd69bbeffed7d0f113
- initial_ast: 4635467db62681996e855b4233873bf65abd26ae9659332c67a1d28dfdcd3a88
unrolled_ast: 4635467db62681996e855b4233873bf65abd26ae9659332c67a1d28dfdcd3a88
ssa_ast: 478e60c54d2fcb05625042228bb467278257e7392d846fd49ccd5c43fcbcbd5e
flattened_ast: 12157cdc9233e60a00d749cc033465d3aeafa625fb769223717e0e87c5cdf9d6
inlined_ast: 11c63116821757047efeec64483fbc8b22edff09ddc745d80670bf02895dd62e
bytecode: d84ad59c8407d4d733886e7442e47de32cc3025f6e411d2cce0816ce30f0b488

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: ef14a0a65f3e5450826ec37f7e2369f0f2b8d3314ed00da3ec900d4a51ed4eb9
unrolled_ast: ef14a0a65f3e5450826ec37f7e2369f0f2b8d3314ed00da3ec900d4a51ed4eb9
ssa_ast: 608b9c426b08b8b97dcf7f6a14c7dd0ebca594a7e17f79580cd1274757c4dd3c
flattened_ast: 7df8d7e0db134613ff120ee03cffc2fef159cf8204273668222e41d2b0efd2d1
inlined_ast: 7df8d7e0db134613ff120ee03cffc2fef159cf8204273668222e41d2b0efd2d1
- initial_ast: 1466ddb8b93b0839823f5bbcd2f36d10f6bcdd9bb2b379f2522705e9d12b9269
unrolled_ast: 1466ddb8b93b0839823f5bbcd2f36d10f6bcdd9bb2b379f2522705e9d12b9269
ssa_ast: 4b0d37e1a94183ddfd5ed2fc4e299319dfa92833a6fe44e4c3072f138fbdcb89
flattened_ast: 86ba35dae4811e723d31c96db49d7bd74d7b412d131045fde4c69aa29775a0a8
inlined_ast: 86ba35dae4811e723d31c96db49d7bd74d7b412d131045fde4c69aa29775a0a8
bytecode: 2a939858f2f71f1bbe25bd039899cdb71254e56acc203eb6d60dbb5c191a4224

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 374f33d7c3329a997d7740cbbc7e79d2c52b4ab70f14c72e1e77e01789e4932c
unrolled_ast: 374f33d7c3329a997d7740cbbc7e79d2c52b4ab70f14c72e1e77e01789e4932c
ssa_ast: a4166d418cadd9c9994b6d882f94cabbc80d302439c3e738c19d8603e3e56af4
flattened_ast: bf07e16742127065efb1989aef9582c08c8a6251057c5ae8e422901aaf46a3fa
inlined_ast: bf07e16742127065efb1989aef9582c08c8a6251057c5ae8e422901aaf46a3fa
- initial_ast: 1d67938a04428cdc95cf4e513c4ba1789f9a48ede3c780212403923927ee38d7
unrolled_ast: 1d67938a04428cdc95cf4e513c4ba1789f9a48ede3c780212403923927ee38d7
ssa_ast: fcb491ed70f47943f57a15be8c8c2b8750b4ca5408dee5d3e0ce57cc4ef5879e
flattened_ast: 812e7afbfb2c8ca1d31815b42a59337fc6e6eeb98acebf794fe7539013ad1fb9
inlined_ast: 812e7afbfb2c8ca1d31815b42a59337fc6e6eeb98acebf794fe7539013ad1fb9
bytecode: 27556a268723e0d8ffc4210290babab1ad098d9c8a77ad2dc84195d98059deac

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: a1949ce7cd298b1eae7d1e68bd82735cb5430fbf3d98c846a742af495162c674
unrolled_ast: a1949ce7cd298b1eae7d1e68bd82735cb5430fbf3d98c846a742af495162c674
ssa_ast: 7af2a8837e274f8fad34cc663a822d4d901d71cda15268baf9b2b3131fad1b0e
flattened_ast: 66bc317eaff6320b4eb9eb8bdfad3dec14040cbeb81c9c73f3f7632ae699408e
inlined_ast: 66bc317eaff6320b4eb9eb8bdfad3dec14040cbeb81c9c73f3f7632ae699408e
- initial_ast: f2e92898c37a090de2d3761e2275789fb830f34c012632e5f64aa6a3f0ef99d4
unrolled_ast: f2e92898c37a090de2d3761e2275789fb830f34c012632e5f64aa6a3f0ef99d4
ssa_ast: 1a3a76269ca94c73013e99da1a17e64a0d8a04b1c7b166c1807f867a4a5af7f2
flattened_ast: 59b5dbde723c99720b27b663fbe81a7e01804ded9cc1b8a7defe220315360b9a
inlined_ast: 59b5dbde723c99720b27b663fbe81a7e01804ded9cc1b8a7defe220315360b9a
bytecode: 56875e297f05e4c60762445a3ac97b57e4a0f12d69180bb7207ef62f950b0b25

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: bde5dc5690f0be194a47c5bf9f39c11fc4ce1e2fa04d15970cdb60ead041395b
unrolled_ast: bde5dc5690f0be194a47c5bf9f39c11fc4ce1e2fa04d15970cdb60ead041395b
ssa_ast: 4a1a21498e62feefd9db31a254c1015703dc89dec4a32c39f1ab851279fb2ddc
flattened_ast: cfbbdf28d0919efc98023b650c0fa88cd90b0b17ba62fe7b7f12b20cad4c8bab
inlined_ast: cfbbdf28d0919efc98023b650c0fa88cd90b0b17ba62fe7b7f12b20cad4c8bab
- initial_ast: b1f55a3fca7009125740595eb1d8a6c5e3266c45f6c9d54d1eb7693a5f95adb3
unrolled_ast: b1f55a3fca7009125740595eb1d8a6c5e3266c45f6c9d54d1eb7693a5f95adb3
ssa_ast: 70eeac70fcfbbda44e87ab2ddcf47e3fac9ed9cfab8c1873b1873c4bd4ab502d
flattened_ast: 34f60217fff78d0c47fdc7ac7c64994fd0c0234193cb5ff71a28bdf6ed645ab2
inlined_ast: 34f60217fff78d0c47fdc7ac7c64994fd0c0234193cb5ff71a28bdf6ed645ab2
bytecode: f5572172f6812e0eb6e906c230138c76d1344fd15522b8b2ee98156d6c92ca0a

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: cfd6c3d188c189e78d8ac46b0160e71ca1ca626e64e111aa30adf8c9c4c8e402
unrolled_ast: cfd6c3d188c189e78d8ac46b0160e71ca1ca626e64e111aa30adf8c9c4c8e402
ssa_ast: 1b6f7468d4f5c9f1c516dcf17357e4d4758a6ce65e6f46e36ee1246dd81c04f7
flattened_ast: 7459fc1c17dd58cb8e94205bfa5e9d7aea727670e719a9eb8e9f4ce09d104b25
inlined_ast: 7459fc1c17dd58cb8e94205bfa5e9d7aea727670e719a9eb8e9f4ce09d104b25
- initial_ast: 706d6b698209729ccc81f63bfe77a4baf572bfbda4d4165b51ed2fd1bbf34442
unrolled_ast: 706d6b698209729ccc81f63bfe77a4baf572bfbda4d4165b51ed2fd1bbf34442
ssa_ast: 06ce227a097baf4d7c73465d58710ab217a1ce7c8d49c8e9ca644627e607703a
flattened_ast: 2f2798034c971938c91ed4422def44932cb6f657c62a56b79de431ca1f542fc2
inlined_ast: 2f2798034c971938c91ed4422def44932cb6f657c62a56b79de431ca1f542fc2
bytecode: e6c7836da70dcac19600a14bc49655ff3aff5f254ca77a24b39564a3987cdb7f

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 0db80a5b166ba3b28b3b4fdaca2a4dce7a8e7546241c1458035dea67db3a1822
unrolled_ast: 0db80a5b166ba3b28b3b4fdaca2a4dce7a8e7546241c1458035dea67db3a1822
ssa_ast: 1394f793dc345fabc539dee98b1a04fa204ba1e9c5085ecb326fff9888823924
flattened_ast: b89a0a81efaa8172de5f8c11439070e34a4632f48c32ff8e51ec9884cf63efa3
inlined_ast: b89a0a81efaa8172de5f8c11439070e34a4632f48c32ff8e51ec9884cf63efa3
- initial_ast: cf7a7278ef02fbcfa0603273d5825332019f67877899c8dc562a17bf8790c643
unrolled_ast: cf7a7278ef02fbcfa0603273d5825332019f67877899c8dc562a17bf8790c643
ssa_ast: 1e7c8f70f3646b470331e6bfce7e78aefb6787d836ac0b4c803da6bfc2a663f2
flattened_ast: f30de25047270867282abb37cff6b8cfae594aace06bf5232a3f6ee85efd285c
inlined_ast: f30de25047270867282abb37cff6b8cfae594aace06bf5232a3f6ee85efd285c
bytecode: 1cfa6fc08a9f2902f0fef6da253abd33115459891219263928dbaa69b44be3cf

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 16999e9e38bd07cf0fe8b361446117160feb1d175c65b5be9acf1a8a366d9d7f
unrolled_ast: 16999e9e38bd07cf0fe8b361446117160feb1d175c65b5be9acf1a8a366d9d7f
ssa_ast: 49a5a813bbc4c0db3c90366470c4fdfba258380874db5095ee4f813724e2ebe9
flattened_ast: 10b6b65555c9eeb4b68cc2218ea09b54df73d573bc718ecd31bdf4db88fbd817
inlined_ast: 10b6b65555c9eeb4b68cc2218ea09b54df73d573bc718ecd31bdf4db88fbd817
- initial_ast: 23af37ee231c4b81af570d1ff71b4c2f11256e11db24f5420eb3c5d3d15b329b
unrolled_ast: 23af37ee231c4b81af570d1ff71b4c2f11256e11db24f5420eb3c5d3d15b329b
ssa_ast: 7135732cf1571bef8c264508a669541e93cde9427609b7e0b64d68da96edbe56
flattened_ast: 535ef22a4910d23377bc8b6900ad0441acc67e5e0561bd2c5cfde735f11ee538
inlined_ast: 535ef22a4910d23377bc8b6900ad0441acc67e5e0561bd2c5cfde735f11ee538
bytecode: 1cfa6fc08a9f2902f0fef6da253abd33115459891219263928dbaa69b44be3cf

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 4e4896ad3bc1dba9d358f5bd1d0eba339cefce9cdf61288e17b6825b64a19fc0
unrolled_ast: 4e4896ad3bc1dba9d358f5bd1d0eba339cefce9cdf61288e17b6825b64a19fc0
ssa_ast: 7e301a4d63bf9a1c708a7c2e080ca9da7ac83c7f91149a338ce400e15d79403c
flattened_ast: 1774826b8df005b3456d8980136852fdc4123221976e25fac43d348413274bb2
inlined_ast: 1774826b8df005b3456d8980136852fdc4123221976e25fac43d348413274bb2
- initial_ast: ed3c0f97815c5fe5d7abc8d1f9d14494a1903df4cc4b2dda019701b070014029
unrolled_ast: ed3c0f97815c5fe5d7abc8d1f9d14494a1903df4cc4b2dda019701b070014029
ssa_ast: f04164d6cd378ad432f465937a1d60ae598b9ced22bb16e10d9034bbd13dc041
flattened_ast: 5fbfafad3c52d217ca677bc41cd8a63bfa6748cedb54cc0853a400419d66a4ad
inlined_ast: 5fbfafad3c52d217ca677bc41cd8a63bfa6748cedb54cc0853a400419d66a4ad
bytecode: 6c9eb1193b8d4f71dd8b701ae0f297d12212933b670ab59c89f0a20ab982f08a

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 73f31314f7616936ceaee9860262cd16628ead8bf7ddc261379ae7911e03e23e
unrolled_ast: 73f31314f7616936ceaee9860262cd16628ead8bf7ddc261379ae7911e03e23e
ssa_ast: 6a542d5d9fab2a4bbc6ec3a3e5f81c1fdf1fe696947386752a627250db9ea159
flattened_ast: 48bc3f7e1d967c33d0ceb5f4d2d071fd0fb09db8ed04913facf6a16c6975af28
inlined_ast: 48bc3f7e1d967c33d0ceb5f4d2d071fd0fb09db8ed04913facf6a16c6975af28
- initial_ast: 2752eaa8193dc950ae07dbd8277c03fb924546879912afdc7c4709eb92155a1d
unrolled_ast: 2752eaa8193dc950ae07dbd8277c03fb924546879912afdc7c4709eb92155a1d
ssa_ast: 03392a93fef2cf4ac477a5850335d8a37939903c92ea49e58974ac0573dd447a
flattened_ast: ea4f399821484f56da2ed384f7530428dcf91f5dfd227c83a785d6a50f33167f
inlined_ast: ea4f399821484f56da2ed384f7530428dcf91f5dfd227c83a785d6a50f33167f
bytecode: e6c7836da70dcac19600a14bc49655ff3aff5f254ca77a24b39564a3987cdb7f

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: a330dc6e12e8ea179686ec4ffd59b207247eae12d335790e446681705d80f105
unrolled_ast: a330dc6e12e8ea179686ec4ffd59b207247eae12d335790e446681705d80f105
ssa_ast: 1ef8cc1fcc044b5b3b4daf6b80bcf21a795ac02dc50d1f6e1b36e8780d8c0e34
flattened_ast: fcf72e21d754747d727fc7edbdd8ee8cb1c6db1bc9b22985bc0173d2ffa3fc5c
inlined_ast: fcf72e21d754747d727fc7edbdd8ee8cb1c6db1bc9b22985bc0173d2ffa3fc5c
- initial_ast: 20ad25142425e428387351b1eae95763cd2bafc2aea81270944cca08c058ece4
unrolled_ast: 20ad25142425e428387351b1eae95763cd2bafc2aea81270944cca08c058ece4
ssa_ast: a87e55fe349912264137c0ac31434a9b0623c8701997d6930ab6e3e04f67bbe3
flattened_ast: 265092b725660652360db1d5995f28356d800d264a512511dbc70d31068e4e77
inlined_ast: 265092b725660652360db1d5995f28356d800d264a512511dbc70d31068e4e77
bytecode: 29844f1ea8a798be999d7a958052e759df9664aa3efb0d17a92534caa532ce89

View File

@ -0,0 +1,10 @@
---
namespace: Compile
expectation: Pass
outputs:
- initial_ast: e48fe7856ecd5c90b2e8d425feb01da0f0876cca5385a8d1757beb5cbbb63564
unrolled_ast: e48fe7856ecd5c90b2e8d425feb01da0f0876cca5385a8d1757beb5cbbb63564
ssa_ast: f32921e1ad3a516b4b01cf14c25416dac730e600fdc85c7d35328a4e5e74d62c
flattened_ast: 365d9ac45a96dfdb3fd84bd8d01e0e0ace194c61fb9acf901756cea7c7be402b
inlined_ast: 365d9ac45a96dfdb3fd84bd8d01e0e0ace194c61fb9acf901756cea7c7be402b
bytecode: 8df822f8d2b35654339ce482dcd912e372b04fc50f2d2f2b2329dadf694d583b

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 7818747ae39ad9c3d3e38f33ef04779e9a1263a6237daa44b7fb2659554c0d95
unrolled_ast: 7818747ae39ad9c3d3e38f33ef04779e9a1263a6237daa44b7fb2659554c0d95
ssa_ast: a104cc64f516736f3ce574106897b78f60a848422c837e4df90c86923ef86a28
flattened_ast: be9e8e22f34e3fdabc73fe56a8c161ed6b84c797194fe83d11f886308215dfc8
inlined_ast: be9e8e22f34e3fdabc73fe56a8c161ed6b84c797194fe83d11f886308215dfc8
- initial_ast: 6c87104b35fbd525d352c879f285ce7d30a033fdfe0435581bc46623d53e73e3
unrolled_ast: 6c87104b35fbd525d352c879f285ce7d30a033fdfe0435581bc46623d53e73e3
ssa_ast: 3cc12ecd92429711ea09cf422cfff3fde75f1a7a82ee2030c3f4c3edfe89470b
flattened_ast: b4f2c136d487f91c2dda45751013486f4794cc0cb09f035690fbb90c8280887a
inlined_ast: b4f2c136d487f91c2dda45751013486f4794cc0cb09f035690fbb90c8280887a
bytecode: 8ee7f077a54a80ac5ce5d1cc894c81c880730a3d60857397dc6028d0d8423125

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: dd331d498c91fa4895e531ff78e9dfd5fafafb67edce153d7aefa6f246dca9b9
unrolled_ast: dd331d498c91fa4895e531ff78e9dfd5fafafb67edce153d7aefa6f246dca9b9
ssa_ast: 4cfa347ec55602a04cdf079ff561c05e5d5b9105bd1b77bb3d58ef75549bcf4a
flattened_ast: 4ac1527e7f607e0021cc91b53a1045a7da9100b4a4308b4656a9d3142ee1aee8
inlined_ast: 4ac1527e7f607e0021cc91b53a1045a7da9100b4a4308b4656a9d3142ee1aee8
- initial_ast: a7d896315080ee6e939040920eef2f75a08398b34d429a1498ad3b19727fbd2f
unrolled_ast: a7d896315080ee6e939040920eef2f75a08398b34d429a1498ad3b19727fbd2f
ssa_ast: 9852fac1c5ef926342f722803e64c91c4790bb0f6ca2cb10931eee74394812ed
flattened_ast: e7929287517e450c5b52d6eaee807cb44052565f84a9f2cc2a62159c43d446a6
inlined_ast: e7929287517e450c5b52d6eaee807cb44052565f84a9f2cc2a62159c43d446a6
bytecode: a8874b5e3d3a000703943de2f132677372f9a275003bccf176c4ebfdf1b86466

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: 1637364caa1b5af80b377e1f61ed60a96154f89c5aaf6a3f9434a19dd1d4ad7d
unrolled_ast: 1637364caa1b5af80b377e1f61ed60a96154f89c5aaf6a3f9434a19dd1d4ad7d
ssa_ast: d614bad2a7c9cd413f125c6e14414d0ef7af2c2f7f7b4900297505c644680fee
flattened_ast: db15a99e033ef6ff98aa896a09367cc324b633da0e8dfa8410a4158818310072
inlined_ast: db15a99e033ef6ff98aa896a09367cc324b633da0e8dfa8410a4158818310072
- initial_ast: 32c309a2edd67f48fa05b04cbf1ae8df61d119934366b541fe744798e656aa0f
unrolled_ast: 32c309a2edd67f48fa05b04cbf1ae8df61d119934366b541fe744798e656aa0f
ssa_ast: 00d8da3a1986c7a67b690906656abbaf0c7768b821c0ccb4e02906d1bf2607ee
flattened_ast: 57b516a75d42d3e7c50990a8e3c30f049d4143c283502431ac4f175d269d1c9d
inlined_ast: 57b516a75d42d3e7c50990a8e3c30f049d4143c283502431ac4f175d269d1c9d
bytecode: 6cc7359d48deaf0b2c03bdd35b80693511afe0033aeafeceb7065267697f022a

View File

@ -2,9 +2,9 @@
namespace: Compile
expectation: Pass
outputs:
- initial_ast: ca0df5eeaf225ccc6d56c12c0b8cf2f86176245cbd5caa2844dcf18f4fa3ff7c
unrolled_ast: ca0df5eeaf225ccc6d56c12c0b8cf2f86176245cbd5caa2844dcf18f4fa3ff7c
ssa_ast: 538d8c68d07639040c30cc3a954a0ffddd8d8d02e9a8e896baf989877593497f
flattened_ast: bfd2540607e813ffcaef69617df1dc66265badc3c016d878d3b8ef4a9d366ca3
inlined_ast: bfd2540607e813ffcaef69617df1dc66265badc3c016d878d3b8ef4a9d366ca3
- initial_ast: 25621b5d7c7dc7e495926cb6829c9c0c107c21a1fa2c41aa060aa8167790cd39
unrolled_ast: 25621b5d7c7dc7e495926cb6829c9c0c107c21a1fa2c41aa060aa8167790cd39
ssa_ast: 34298c4f8445e82269661f7580b198f38aee1e0afbc12a232c3494b05c98841f
flattened_ast: 694d088023b2aba6c0d6e8a8ccfae89b6c1f0bb1ef17058b95a521d95c5bbef5
inlined_ast: 694d088023b2aba6c0d6e8a8ccfae89b6c1f0bb1ef17058b95a521d95c5bbef5
bytecode: 035a98875b76db42e72bba26b053403c2c629c47683376fe1a33f3a61b3ad53f

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372067]: A struct cannot have a member with mode `constant`, `private`, or `public`.\n --> compiler-test:5:18\n |\n 5 | constant a: u8,\n | ^^^^^\nError [ETYC0372067]: A struct cannot have a member with mode `constant`, `private`, or `public`.\n --> compiler-test:6:17\n |\n 6 | private bar: bool,\n | ^^^^^^^^^\nError [ETYC0372067]: A struct cannot have a member with mode `constant`, `private`, or `public`.\n --> compiler-test:7:16\n |\n 7 | public bax: u16,\n | ^^^^^^^^\n"

View File

@ -2,4 +2,4 @@
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372017]: The type `Bar` is not found in the current scope.\n --> compiler-test:6:9\n |\n 6 | bar: Bar,\n | ^^^\n"
- "Error [ETYC0372017]: The type `Bar` is not found in the current scope.\n --> compiler-test:6:9\n |\n 6 | bar: Bar,\n | ^^^^^^^^\n"

View File

@ -2,11 +2,11 @@
namespace: Execute
expectation: Pass
outputs:
- initial_ast: 4f771e398a6a7dd30e05b1a2733a4c3d41654e3f5a116a02ed7a862bd3267a06
unrolled_ast: 4f771e398a6a7dd30e05b1a2733a4c3d41654e3f5a116a02ed7a862bd3267a06
ssa_ast: 82daba4fefc51c3e851850edd804ac76ced396d25f82c68e808d3953028fa780
flattened_ast: 14521ee56079b67838d1dd0d9b26e464fc6bfd5e6cc649621c0210a8b2b34ed2
inlined_ast: 0fd1095d0790c80c3114d8e45b6409f1810eb5b6e05224dbc5843092150e6520
- initial_ast: fe735d4b87fc695a7a68a059af8d769a3b1d257a924c08e7490f61575d843230
unrolled_ast: fe735d4b87fc695a7a68a059af8d769a3b1d257a924c08e7490f61575d843230
ssa_ast: 24bb584afbee563be7c24228473fd4e0d83cb76197f66b4c4a9ddb9c1c2c5c2e
flattened_ast: 4352bd983b2778643e78bb8efc4b2ab9a728dc52f9bff605875d82b82b72a0fb
inlined_ast: 87236ec1e5020ccdaec371ece97cac3d3c5873649ea7b8ac5df8390e46ff7405
bytecode: 1887edbf4dd13f3913bebb36b012a4513cb26d8a8570d99bd0ac542f4bdb1c73
results:
bar:

View File

@ -0,0 +1,16 @@
---
namespace: Execute
expectation: Pass
outputs:
- initial_ast: e192c70186fda9dc009e023b648bf336b7ebdfed0ec157fdaa7990776a3cbd89
unrolled_ast: e192c70186fda9dc009e023b648bf336b7ebdfed0ec157fdaa7990776a3cbd89
ssa_ast: 558e95d5d2b7baa877a0ad1278dfda0df761be90c58721fe3210fe4a89469a73
flattened_ast: 23880e52eb60934d5bbf37d7a404435ff54f12eba673787df7c844dc37035f80
inlined_ast: 23880e52eb60934d5bbf37d7a404435ff54f12eba673787df7c844dc37035f80
bytecode: b55cd72cd9c6baa36e8f078fecd2460b0eae72f69d75f730d9edc6c5eef121b4
results:
mint:
- input: "[aleo14lskz87tkqwwkyt2z44h64ave5gcwqs6yyfdztus37nupxsj8ypsmqsqcs, 0u64]"
output: "[{\n owner: aleo14lskz87tkqwwkyt2z44h64ave5gcwqs6yyfdztus37nupxsj8ypsmqsqcs.private,\n gates: 0u64.public,\n amount: 0u64.private,\n flag: true.constant,\n \n}]"
- input: "[aleo12keuztkg4cjzxx7hwwmrnnv85dkeqf8pjm877lf6f6lupma2pqrqcl2d8q, 1u64]"
output: "[{\n owner: aleo12keuztkg4cjzxx7hwwmrnnv85dkeqf8pjm877lf6f6lupma2pqrqcl2d8q.private,\n gates: 0u64.public,\n amount: 1u64.private,\n flag: true.constant,\n \n}]"

View File

@ -16,7 +16,7 @@ outputs:
input:
- Internal:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":50,\\\"hi\\\":51}\"}"
mode: Const
mode: Constant
type_:
Integer: U32
span:

View File

@ -16,7 +16,7 @@ outputs:
input:
- Internal:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":47,\\\"hi\\\":48}\"}"
mode: Const
mode: Constant
type_:
Integer: U8
span:
@ -48,7 +48,7 @@ outputs:
input:
- Internal:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":92,\\\"hi\\\":93}\"}"
mode: Const
mode: Constant
type_:
Integer: U64
span:

View File

@ -16,7 +16,7 @@ outputs:
input:
- Internal:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":129,\\\"hi\\\":130}\"}"
mode: Const
mode: Constant
type_:
Integer: U32
span:

View File

@ -5,7 +5,7 @@ outputs:
- sections:
- name: main
definitions:
- mode: Const
- mode: Constant
type_: Boolean
name: "{\"name\":\"a\",\"span\":\"{\\\"lo\\\":15,\\\"hi\\\":16}\"}"
value:
@ -18,7 +18,7 @@ outputs:
span:
lo: 18
hi: 22
- mode: Const
- mode: Constant
type_:
Integer: U8
name: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":38,\\\"hi\\\":39}\"}"
@ -33,7 +33,7 @@ outputs:
span:
lo: 41
hi: 43
- mode: Const
- mode: Constant
type_: Field
name: "{\"name\":\"c\",\"span\":\"{\\\"lo\\\":60,\\\"hi\\\":61}\"}"
value:
@ -46,7 +46,7 @@ outputs:
span:
lo: 63
hi: 68
- mode: Const
- mode: Constant
type_: Group
name: "{\"name\":\"d\",\"span\":\"{\\\"lo\\\":85,\\\"hi\\\":86}\"}"
value:
@ -71,7 +71,7 @@ outputs:
span:
lo: 88
hi: 93
- mode: Const
- mode: Constant
type_: Address
name: "{\"name\":\"e\",\"span\":\"{\\\"lo\\\":115,\\\"hi\\\":116}\"}"
value:
@ -84,7 +84,7 @@ outputs:
span:
lo: 118
hi: 125
- mode: Const
- mode: Constant
type_:
Integer: I8
name: "{\"name\":\"f\",\"span\":\"{\\\"lo\\\":199,\\\"hi\\\":200}\"}"

View File

@ -5,7 +5,7 @@ outputs:
- sections:
- name: main
definitions:
- mode: Const
- mode: Constant
type_: Boolean
name: "{\"name\":\"a\",\"span\":\"{\\\"lo\\\":18,\\\"hi\\\":19}\"}"
value:
@ -18,7 +18,7 @@ outputs:
span:
lo: 21
hi: 25
- mode: Const
- mode: Constant
type_:
Integer: U8
name: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":44,\\\"hi\\\":45}\"}"
@ -33,7 +33,7 @@ outputs:
span:
lo: 47
hi: 49
- mode: Const
- mode: Constant
type_: Field
name: "{\"name\":\"c\",\"span\":\"{\\\"lo\\\":69,\\\"hi\\\":70}\"}"
value:
@ -46,7 +46,7 @@ outputs:
span:
lo: 72
hi: 77
- mode: Const
- mode: Constant
type_: Group
name: "{\"name\":\"d\",\"span\":\"{\\\"lo\\\":97,\\\"hi\\\":98}\"}"
value:
@ -71,7 +71,7 @@ outputs:
span:
lo: 100
hi: 105
- mode: Const
- mode: Constant
type_: Address
name: "{\"name\":\"e\",\"span\":\"{\\\"lo\\\":130,\\\"hi\\\":131}\"}"
value:
@ -84,7 +84,7 @@ outputs:
span:
lo: 133
hi: 140
- mode: Const
- mode: Constant
type_:
Integer: I8
name: "{\"name\":\"f\",\"span\":\"{\\\"lo\\\":217,\\\"hi\\\":218}\"}"

View File

@ -0,0 +1,34 @@
---
namespace: Parse
expectation: Pass
outputs:
- imports: {}
program_scopes:
"{\"name\":\"test\",\"network\":\"\\\"{\\\\\\\"name\\\\\\\":\\\\\\\"aleo\\\\\\\",\\\\\\\"span\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"lo\\\\\\\\\\\\\\\":15,\\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\\":19}\\\\\\\"}\\\"\"}":
program_id: "{\"name\":\"test\",\"network\":\"\\\"{\\\\\\\"name\\\\\\\":\\\\\\\"aleo\\\\\\\",\\\\\\\"span\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"lo\\\\\\\\\\\\\\\":15,\\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\\":19}\\\\\\\"}\\\"\"}"
structs:
token:
identifier: "{\"name\":\"token\",\"span\":\"{\\\"lo\\\":33,\\\"hi\\\":38}\"}"
members:
- mode: Private
identifier: "{\"name\":\"owner\",\"span\":\"{\\\"lo\\\":57,\\\"hi\\\":62}\"}"
type_: Address
span:
lo: 57
hi: 71
- mode: Private
identifier: "{\"name\":\"gates\",\"span\":\"{\\\"lo\\\":89,\\\"hi\\\":94}\"}"
type_:
Integer: U64
span:
lo: 89
hi: 99
is_record: true
span:
lo: 26
hi: 106
mappings: {}
functions: {}
span:
lo: 2
hi: 108

View File

@ -0,0 +1,40 @@
---
namespace: Parse
expectation: Pass
outputs:
- imports: {}
program_scopes:
"{\"name\":\"test\",\"network\":\"\\\"{\\\\\\\"name\\\\\\\":\\\\\\\"aleo\\\\\\\",\\\\\\\"span\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"lo\\\\\\\\\\\\\\\":15,\\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\\":19}\\\\\\\"}\\\"\"}":
program_id: "{\"name\":\"test\",\"network\":\"\\\"{\\\\\\\"name\\\\\\\":\\\\\\\"aleo\\\\\\\",\\\\\\\"span\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"lo\\\\\\\\\\\\\\\":15,\\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\\":19}\\\\\\\"}\\\"\"}"
structs:
foo:
identifier: "{\"name\":\"foo\",\"span\":\"{\\\"lo\\\":33,\\\"hi\\\":36}\"}"
members:
- mode: Public
identifier: "{\"name\":\"baz\",\"span\":\"{\\\"lo\\\":54,\\\"hi\\\":57}\"}"
type_: Address
span:
lo: 54
hi: 66
- mode: Private
identifier: "{\"name\":\"floo\",\"span\":\"{\\\"lo\\\":84,\\\"hi\\\":88}\"}"
type_:
Integer: U64
span:
lo: 84
hi: 93
- mode: None
identifier: "{\"name\":\"data\",\"span\":\"{\\\"lo\\\":103,\\\"hi\\\":107}\"}"
type_: Boolean
span:
lo: 103
hi: 113
is_record: false
span:
lo: 26
hi: 120
mappings: {}
functions: {}
span:
lo: 2
hi: 122

View File

@ -0,0 +1,21 @@
/*
namespace: Compile
expectation: Pass
*/
program test.aleo {
record Token {
// The token amount.
private amount: u64,
// The Aleo balance (in gates).
public gates: u64,
// The token owner.
private owner: address,
// A constant value.
constant flag: bool,
}
transition main(a: u8, b:u8) -> u8 {
return a + b;
}
}

View File

@ -0,0 +1,17 @@
/*
namespace: Compile
expectation: Fail
*/
program test.aleo {
struct Foo {
constant a: u8,
private bar: bool,
public bax: u16,
baz: u32,
}
transition main(a: u8) -> u8 {
return a + 1u8;
}
}

View File

@ -0,0 +1,31 @@
/*
namespace: Execute
expectation: Pass
cases:
mint:
- input: ["aleo14lskz87tkqwwkyt2z44h64ave5gcwqs6yyfdztus37nupxsj8ypsmqsqcs", "0u64"]
- input: ["aleo12keuztkg4cjzxx7hwwmrnnv85dkeqf8pjm877lf6f6lupma2pqrqcl2d8q", "1u64"]
*/
program test.aleo {
record Token {
// The token owner.
private owner: address,
// The Aleo balance (in gates).
public gates: u64,
// The token amount.
amount: u64,
// The flag.
constant flag: bool,
}
transition mint(owner: address, amount: u64) -> Token {
return Token {
owner,
gates: 0u64,
amount: amount,
flag: true,
};
}
}

View File

@ -0,0 +1,11 @@
/*
namespace: Parse
expectation: Pass
*/
program test.aleo {
record token {
private owner: address,
private gates: u64,
}
}

View File

@ -0,0 +1,12 @@
/*
namespace: Parse
expectation: Pass
*/
program test.aleo {
struct foo {
public baz: address,
private floo: u64,
data: bool,
}
}