-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into gd/issue_1412
* master: chore: rename `ssa_refactor` module to `ssa` (#2129) chore: Use `--show-output` flag on execution rather than compilation (#2116) fix(globals): Accurately filter literals for resolving globals (#2126) feat: Optimize away constant calls to black box functions (#1981) fix: Rename `Option::value` to `Option::_value` (#2127) feat: replace boolean `AND`s with multiplication (#1954) chore: create a `const` to hold the panic message (#2122) feat: Add support for bitshifts by distances known at runtime (#2072) feat: Add additional `BinaryOp` simplifications (#2124) fix: flattening pass no longer overwrites previously mapped condition values (#2117) chore(noirc_driver): Unify crate preparation (#2119)
- Loading branch information
Showing
68 changed files
with
710 additions
and
411 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
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
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
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: 6 additions & 0 deletions
6
crates/nargo_cli/tests/test_data/bit_shifts_runtime/Nargo.toml
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "bit_shifts_runtime" | ||
authors = [""] | ||
compiler_version = "0.1" | ||
|
||
[dependencies] |
2 changes: 2 additions & 0 deletions
2
crates/nargo_cli/tests/test_data/bit_shifts_runtime/Prover.toml
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
x = 64 | ||
y = 1 |
9 changes: 9 additions & 0 deletions
9
crates/nargo_cli/tests/test_data/bit_shifts_runtime/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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
fn main(x: u64, y: u64) { | ||
// runtime shifts on comptime values | ||
assert(64 << y == 128); | ||
assert(64 >> y == 32); | ||
|
||
// runtime shifts on runtime values | ||
assert(x << y == 128); | ||
assert(x >> y == 32); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "regression_2099" | ||
authors = [""] | ||
compiler_version = "0.9.0" | ||
|
||
[dependencies] |
37 changes: 37 additions & 0 deletions
37
crates/nargo_cli/tests/test_data/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use dep::std::ec::tecurve::affine::Curve as AffineCurve; | ||
use dep::std::ec::tecurve::affine::Point as Gaffine; | ||
use dep::std::ec::tecurve::curvegroup::Curve; | ||
use dep::std::ec::tecurve::curvegroup::Point as G; | ||
|
||
use dep::std::ec::swcurve::affine::Point as SWGaffine; | ||
use dep::std::ec::swcurve::curvegroup::Point as SWG; | ||
|
||
use dep::std::ec::montcurve::affine::Point as MGaffine; | ||
use dep::std::ec::montcurve::curvegroup::Point as MG; | ||
|
||
fn main() { | ||
// Define Baby Jubjub (ERC-2494) parameters in affine representation | ||
let bjj_affine = AffineCurve::new(168700, 168696, Gaffine::new(995203441582195749578291179787384436505546430278305826713579947235728471134,5472060717959818805561601436314318772137091100104008585924551046643952123905)); | ||
|
||
// Test addition | ||
let p1_affine = Gaffine::new(17777552123799933955779906779655732241715742912184938656739573121738514868268, 2626589144620713026669568689430873010625803728049924121243784502389097019475); | ||
let p2_affine = Gaffine::new(16540640123574156134436876038791482806971768689494387082833631921987005038935, 20819045374670962167435360035096875258406992893633759881276124905556507972311); | ||
let _p3_affine = bjj_affine.add(p1_affine, p2_affine); | ||
|
||
// Test SWCurve equivalents of the above | ||
// First the affine representation | ||
let bjj_swcurve_affine = bjj_affine.into_swcurve(); | ||
|
||
let p1_swcurve_affine = bjj_affine.map_into_swcurve(p1_affine); | ||
let p2_swcurve_affine = bjj_affine.map_into_swcurve(p2_affine); | ||
|
||
let _p3_swcurve_affine_from_add = bjj_swcurve_affine.add( | ||
p1_swcurve_affine, | ||
p2_swcurve_affine | ||
); | ||
|
||
// Check that these points are on the curve | ||
assert( | ||
bjj_swcurve_affine.contains(p1_swcurve_affine) | ||
); | ||
} |
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.