Daniel Xu
Daniel Xu
It'd be nice to have a generic pass that could collapse const idents -> const. That way it'll be consistent across all our language constructs. @ZelinMa557 go for it!
I think code like: ``` $a = 5; @[a] = 3; ``` could be folded into: ``` @[5] = 3; ``` Similarly something like: ``` $a = 2 + 3;...
Yeah, that makes sense. Constant folding should probably occur before semantic analysis, at least to solve the issue in the original post.
Each prog type has a different context. I'm wondering if we should provide definitions for all of them or just take a `T: Sized`. When I did this for cilium/ebpf...
@janca-ucdavis > That overhead could get pretty gnarly with repeated per-element access and a lot of CPUs At least with the implementation in the current PR, you basically have to...
> A variant on this uses multiple phases to make sure all the writers are flipped over before printing and clearing the data buffers That kinda sounds like an RCU...
> Yes, that does sound fine - I do think that anything that synchronously operates on multiple pieces of data should make sure that is explicitly called out, but it's...
> Using --aot searches $PATH for bpftrace-aotrt which is not very convenient when doing development. Maybe we could make it also (recursively) search $PWD (or the directory of the bpftrace...
Sweet! This is an excellent fix. Haven't had a chance to look at the code yet; hope to look at the base PR today/tomorrow