Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(brillig_gen): Pass correct size of complex types input for brillig foreign calls #1922

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,10 @@ impl<'block> BrilligBlock<'block> {
let typ = dfg[value_id].get_type();
match typ {
Type::Numeric(_) => RegisterOrMemory::RegisterIndex(register_index),
Type::Array(_, size) => {
RegisterOrMemory::HeapArray(HeapArray { pointer: register_index, size })
}
Type::Array(..) => RegisterOrMemory::HeapArray(HeapArray {
pointer: register_index,
size: compute_size_of_type(&typ),
}),
_ => {
unreachable!("type not supported for conversion into brillig register")
}
Expand Down
2 changes: 1 addition & 1 deletion crates/noirc_frontend/src/parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fn function_definition(allow_self: bool) -> impl NoirParser<NoirFunction> {
})
}

/// function_modifiers: 'unconstrained'? 'open'? 'internal'?
/// function_modifiers: 'unconstrained'? 'open'? 'internal'?
///
/// returns (is_unconstrained, is_open, is_internal) for whether each keyword was present
fn function_modifiers() -> impl NoirParser<(bool, bool, bool)> {
Expand Down