-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replicate noir-lang/noir#4946
- Loading branch information
1 parent
646d45a
commit c5742b6
Showing
112 changed files
with
133 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/benchmarks/bench_eddsa_poseidon/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use dep::std::eddsa::{eddsa_poseidon_verify}; | ||
use std::eddsa::{eddsa_poseidon_verify}; | ||
|
||
fn main( | ||
msg: pub Field, | ||
|
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/benchmarks/bench_poseidon_hash/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/benchmarks/bench_poseidon_hash_100/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use dep::std::hash; | ||
use std::hash; | ||
|
||
global SIZE = 100; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/benchmarks/bench_poseidon_hash_30/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use dep::std::hash; | ||
use std::hash; | ||
|
||
global SIZE = 30; | ||
|
||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/benchmarks/bench_sha256/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main(input: [u8; 2]) -> pub [u8; 32] { | ||
std::hash::sha256(input) | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/benchmarks/bench_sha256_100/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
global SIZE = 100; | ||
|
||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/benchmarks/bench_sha256_30/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
global SIZE = 30; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/compile_failure/array_length_defaulting/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
fn main() { | ||
let x = dep::std::unsafe::zeroed(); | ||
let x = std::unsafe::zeroed(); | ||
foo(x); | ||
} | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/compile_failure/assert_constant_fail/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use dep::std::assert_constant; | ||
use std::assert_constant; | ||
|
||
fn main(x: Field) { | ||
foo(5, x); | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_failure/negate_unsigned/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main() { | ||
let var = -1 as u8; | ||
|
2 changes: 0 additions & 2 deletions
2
noir/noir-repo/test_programs/compile_failure/restricted_bit_sizes/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
use dep::std::assert_constant; | ||
|
||
fn main() -> pub u63 { | ||
5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
.../noir-repo/test_programs/compile_success_empty/conditional_regression_to_bits/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main() { | ||
//Regression for to_le_bits() constant evaluation | ||
|
16 changes: 8 additions & 8 deletions
16
noir/noir-repo/test_programs/compile_success_empty/ec_baby_jubjub/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/intrinsic_die/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/method_call_regression/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main() { | ||
// s: Struct<?, ()> | ||
|
16 changes: 8 additions & 8 deletions
16
noir/noir-repo/test_programs/compile_success_empty/regression_2099/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/regression_3635/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main() { | ||
let x: u8 = 0x61; | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/str_as_bytes/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
fn main() { | ||
let a = "hello"; | ||
let b = a.as_bytes(); | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/trait_default_implementation/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
trait MyDefault { | ||
fn my_default(x: Field, y: Field) -> Self; | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/trait_override_implementation/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
trait MyDefault { | ||
fn my_default(x: Field, y: Field) -> Self; | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/compile_success_empty/traits/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
trait MyDefault { | ||
fn my_default(x: Field, y: Field) -> Self; | ||
|
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/compile_success_empty/vectors/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_failure/div_by_zero_constants/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main() { | ||
let a: Field = 3 / 0; | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_failure/div_by_zero_numerator_witness/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main(x: Field) { | ||
let a: Field = x / 0; | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_failure/div_by_zero_witness/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
noir/noir-repo/test_programs/execution_failure/hashmap_load_factor/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/4_sub/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/5_over/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
// Test unsafe integer arithmetic | ||
// Test odd bits integer | ||
fn main(mut x: u32, y: u32) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/6_array/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/aes128_encrypt/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
unconstrained fn decode_ascii(ascii: u8) -> u8 { | ||
if ascii < 58 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/blake3/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
fn main(x: [u8; 5], result: [u8; 32]) { | ||
let digest = std::hash::blake3(x); | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/brillig_blake2s/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
// Tests a very simple program. | ||
// | ||
// The features being tested is blake2s in brillig | ||
|
1 change: 0 additions & 1 deletion
1
noir/noir-repo/test_programs/execution_success/brillig_blake3/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use dep::std; | ||
|
||
unconstrained fn main(x: [u8; 5], result: [u8; 32]) { | ||
let digest = std::hash::blake3(x); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.