Jordan Rome

Results 346 comments of Jordan Rome

> I'm not sure if I generated the test in a right way. That command you posted looks good to me. I think this PR still needs a semantic_analyser test...

This is ugly but correct. The alternative is to have min/max use hash maps and an atomic min/max write after lookup - I don't know what would be faster but...

Responded in the issue with a more detailed repro. Here is the alternative solution where we just convert min/max to use a hash map, which I'm leaning towards because it's...

Abandoning in favor of https://github.com/bpftrace/bpftrace/pull/3298, which stores a struct as the min/max map values instead of using two separate keys.

@ajor I realized I could use the fact that we know if an integer literal is negative to improve automatic downcasting e.g. this is no longer an issue `BEGIN {...

> looks like maps represent all integers as i64. is that why maps don't have this issue? do we have any desire to unify the behavior? Good call. We should...

I think we need to fix maps. See the below examples, which should all cause type errors IMHO. ``` BEGIN { @a = (uint16)1; @a = -2; exit(); } @a:...

I think I addressed all comments. Going to merge soon unless anyone has any objections.

As a bit of added info, I tested the 63 internal Meta bpftrace scripts and 2 had a integer type error as a result of this.

> One place where let can be useful is if we want to introduce [variable shadowing](https://en.wikipedia.org/wiki/Variable_shadowing) in scopes I think even then I might prefer the keyword `local` as `let`...