Pi Lanningham
fc948f0029
Add the same optimization to dependent functions
...
I originally didn't add this because I thought this was mutually
recursive functions, which I couldn't picture how that would work;
I refactored all this logic into modify_self_calls, which maybe needs a
better name now.
Perf gain on some stdlib tests (line concat tests) is 93%!!
2023-08-07 19:00:39 -04:00
Pi Lanningham
c45caaefc8
Rudimentary implementation
...
Adds an identify_recursive_static_params; doesn't handle all shadowing cases yet
2023-08-07 19:00:39 -04:00
Pi Lanningham
09f889b121
Add codegen for recursive statics case
...
We also flip the recursive_statics fields to recursive_nonstatics; This makes the codegen a little easier. It also has a hacky way to hard code in some recursive statics for testing
2023-08-07 19:00:39 -04:00
Pi Lanningham
586a2d7972
Add recursive_static_params to AIR
...
Any methods to a recursive function that are unchanged and forwarded
don't need to be applied each time we recurse; instead, you can
define a containing lambda, reducing the number of applications
dramatically when recursing
2023-08-07 19:00:39 -04:00
microproofs
1d9878c5ee
fix: code gen tests now up to date using trace
...
fix: Formatter should take ErrorTerm and return "fail"
fix: fail with no reason should just return ErrorTerm
2023-08-07 12:02:44 -04:00
microproofs
29599879b2
one minor tail fix in clause pattern
2023-08-07 12:02:44 -04:00
microproofs
6a1b2db698
use retain instead of position
2023-08-07 12:02:44 -04:00
microproofs
7bf22fa58b
fix multivalidator issue
2023-08-07 12:02:44 -04:00
microproofs
281a8363c0
fixes to tuples and usage of discard.
...
Also a fix to tail and its type in when list pattern matches
2023-08-07 12:02:44 -04:00
microproofs
bfa4cc2efc
fix: some function dependency tree path was not being updated in order
...
fix: revert to old implicit way of casting to data for now
2023-08-07 12:02:44 -04:00
microproofs
a45ff692a6
last changes for today
2023-08-07 12:02:44 -04:00
microproofs
db79468435
remove old stuff
2023-08-07 12:02:44 -04:00
microproofs
aca79bd728
remove warning
2023-08-07 12:02:44 -04:00
microproofs
3189a60bdb
fixes to how we sort dependencies.
...
Also update dependency path based on a functions path.
2023-08-07 12:02:44 -04:00
microproofs
80b950b8aa
fix edge case with assign and pattern matching
2023-08-07 12:02:44 -04:00
microproofs
186e1235fd
checkpoint
2023-08-07 12:02:44 -04:00
microproofs
1ee7492f1f
fix tuple clause
2023-08-07 12:02:44 -04:00
microproofs
5aecb96668
constants are back. I had broke them when switching how data casting works
2023-08-07 12:02:44 -04:00
microproofs
0b8266dfd1
some type conversion fixes
2023-08-07 12:02:44 -04:00
microproofs
02948616cd
some more fixes involving clauses
2023-08-07 12:02:44 -04:00
microproofs
a689b8748f
fix: working on minor edge cases
...
fix: zero arg function dependencies should not count as hoisted
fix: tuple index was receiving the wrong type
2023-08-07 12:02:44 -04:00
microproofs
4e3ced5b75
fix and clean up tests and handle
...
one edge case on rearrange clauses
2023-08-07 12:02:44 -04:00
microproofs
018453f6b1
fix expect on tuple type using the wrong internal type
2023-08-07 12:02:44 -04:00
microproofs
f03ed41e03
fix some unnecessary lambdas in assign
2023-08-07 12:02:44 -04:00
microproofs
03dd13dc7d
fixing list condition edge cases and clean up rearrange list clauses
2023-08-07 12:02:44 -04:00
microproofs
e8fa8f5423
fixing list clause issues
2023-08-07 12:02:44 -04:00
microproofs
c6f90a999b
checkpoint
2023-08-07 12:02:44 -04:00
microproofs
389699f485
fix to subject type for assignment on single clause
2023-08-07 12:02:44 -04:00
microproofs
dcb3a9b45b
some type and expect fixes
2023-08-07 12:02:44 -04:00
microproofs
3545bad3c4
fix typing to constr
2023-08-07 12:02:44 -04:00
microproofs
52ebc9b6c1
some more fixes
2023-08-07 12:02:44 -04:00
microproofs
58b327e5b3
fixing bugs and edge cases
2023-08-07 12:02:44 -04:00
microproofs
2f4319f162
fix: tuples and list patterns had a few issues
2023-08-07 12:02:44 -04:00
microproofs
960a15c4ec
checkpoint - fixing tests and stuff
2023-08-07 12:02:44 -04:00
microproofs
72b6f0f847
all but six tests passing
2023-08-07 12:02:44 -04:00
microproofs
6eeb282dee
Now code gen is finished and we just have testing
2023-08-07 12:02:44 -04:00
microproofs
518bea5be4
feat: fixed up generate and generate test
...
last step is checking on uplc code gen
2023-08-07 12:02:44 -04:00
microproofs
18ea44adb0
chore: rename unwrapData and wrapData
...
add validator cast function for extra validator params
2023-08-07 12:02:44 -04:00
microproofs
55dd1a1a56
out with the old code and in with the air tree
2023-08-07 12:02:44 -04:00
microproofs
02ce3761ae
final checkpoint
2023-08-07 12:02:44 -04:00
microproofs
8641c305f4
feat: airtree now hoists function. Now all that is left is finishing uplc gen
2023-08-07 12:02:44 -04:00
microproofs
5ad8b520fd
checkpoint
2023-08-07 12:02:44 -04:00
microproofs
5a51764cff
remove some warnings
2023-08-07 12:02:44 -04:00
microproofs
a099c01734
feat: add support for hoisting code gen functions
...
fix: code gen vars should be module functions
fix: missed a recursive call in do_find_air_tree_node under binop
2023-08-07 12:02:44 -04:00
microproofs
c0f09856d3
feat: Here's a first, we hoisted some user functions onto the validator
2023-08-07 12:02:44 -04:00
microproofs
62660e04b5
checkpoint;
...
Remaining work is on function hoisting. Functions have been defined and monomorphized
2023-08-07 12:02:44 -04:00
microproofs
ae9de11e77
big checkpoint:
...
feat: add monomorphize and other useful tree function abstractions
feat: started testing function hositing result so far
2023-08-07 12:02:44 -04:00
microproofs
947c118175
checkpoint
2023-08-07 12:02:44 -04:00
microproofs
9704cafefe
a checkpoint for function hoisting start and type fix
2023-08-07 12:02:44 -04:00
microproofs
55ae708e3e
checkpoint: start on function hoisting
2023-08-07 12:02:44 -04:00