tame/tamer/src
Mike Gerwitz 40c941d348 tamer: asg::air::AirAggregate: Initial impl of nested exprs
This introduces a number of concepts together, again to demonstrate that
they were derived.

This introduces support for nested expressions, extending the previous
work.  It also supports error recovery for dangling expressions.

The parser states are a mess; there is a lot of duplicate code here that
needs refactoring, but I wanted to commit this first at a known-good state
so that the diff will demonstrate the need for the change that will
follow; the opportunities for abstraction are plainly visible.

The immutable stack introduced here could be generalized, if needed, in the
future.

Another important note is that Rust optimizes away the `memcpy`s for the
stack that was introduced here.  The initial Parser Context was introduced
because of `ArrayVec` inhibiting that elision, but Vec never had that
problem.  In the future, I may choose to go back and remove ArrayVec, but I
had wanted to keep memory allocation out of the picture as much as possible
to make the disassembly and call graph easier to reason about and to have
confidence that optimizations were being performed as intended.

With that said---it _should_ be eliding in tamec, since we're not doing
anything meaningful yet with the graph.  It does also elide in tameld, but
it's possible that Rust recognizes that those code paths are never taken
because tameld does nothing with expressions.  So I'll have to monitor this
as I progress and adjust accordingly; it's possible a future commit will
call BS on everything I just said.

Of course, the counter-point to that is that Rust is optimizing them away
anyway, but Vec _does_ still require allocation; I was hoping to keep such
allocation at the fringes.  But another counter-point is that it _still_ is
allocated at the fringe, when the context is initialized for the parser as
part of the lowering pipeline.  But I didn't know how that would all come
together back then.

...alright, enough rambling.

DEV-13160
2023-01-20 23:37:29 -05:00
..
asg tamer: asg::air::AirAggregate: Initial impl of nested exprs 2023-01-20 23:37:29 -05:00
bin tamer: Air{Token=>} 2022-12-13 14:36:38 -05:00
diagnose tamer: diagnose::report::VisualReporter::render: Remove superfluous comments 2023-01-20 23:37:29 -05:00
iter tamer: iter::trip: Flatten Result 2022-05-20 16:08:16 -04:00
ld tamer: asg::Asg::get: Narrow object type 2022-12-22 16:32:21 -05:00
nir tamer: f::Functor: New trait 2023-01-20 23:37:27 -05:00
obj tame: obj::xmlo: Use SPair where applicable 2022-12-16 14:46:10 -05:00
parse tamer: f::Functor: New trait 2023-01-20 23:37:27 -05:00
sym tamer: sym::symbol: Use {=>diagnostic_}panic! for resolution failure 2022-11-01 12:42:36 -04:00
test tamer: Ensure debug_assert! takes effect in test profile 2022-07-05 14:59:35 -04:00
xir tamer: xir::writer: write{=>_all} 2023-01-01 23:43:00 -05:00
convert.rs tamer: convert::Expect{From,Into}: Diagnostic panics 2022-12-01 11:09:25 -05:00
diagnose.rs tamer: diagnose::report: Error tracking 2022-10-26 12:32:51 -04:00
f.rs tamer: f::Functor: New trait 2023-01-20 23:37:27 -05:00
fmt.rs tamer: fmt: JoinListWrap: New wrapper 2022-12-16 14:46:12 -05:00
fs.rs Copyright year update 2022 2022-05-03 14:14:29 -04:00
global.rs Copyright year update 2022 2022-05-03 14:14:29 -04:00
iter.rs tamer: iter::trip: Flatten Result 2022-05-20 16:08:16 -04:00
ld.rs Copyright year update 2022 2022-05-03 14:14:29 -04:00
lib.rs tamer: f::Functor: New trait 2023-01-20 23:37:27 -05:00
nir.rs tamer: f::Functor: New trait 2023-01-20 23:37:27 -05:00
num.rs tamer: Initial concept for AIR/ASG Expr 2022-12-22 14:33:28 -05:00
parse.rs tamer: tamec: Introduce NIR->AIR->ASG lowering 2022-12-13 13:37:07 -05:00
span.rs tamer: Initial concept for AIR/ASG Expr 2022-12-22 14:33:28 -05:00
xir.rs tamer: xir::st: Static namespace prefixes (c and t) 2022-08-12 00:47:14 -04:00