



My IR targets JS. It is/aims to be highly ECMA compliant (modulo 'with' semantics). Recently I have been rewriting some support classes/improving some data structures and have decided to redo the CFG classes completely. Try-catch-finally modelling was the part I was unhappy about in my earlier implementation. I had a complex mechanism for handling unions for exception edges which was very buggy (now, for simplicity I have now adopted fat block unions for exception edges; java like).
But still, one of the parts about the IR that still bugs me is the way I have implemented finaliser blocks. Finalizers are like mini functions calls (usually with special instructions in most target VMs). Finalizer return targets are in some sense "context sensitive" + they can be nested. In my current implementation this is exactly what it does (super imprecise at finalizer returns, but easy to implement). I can think of two ways to solve this situation off the top of my head:
1/ Keep the graph as it is, but introduce some kind of 'context' in the AI (Abstract Interpretation engine). Change the analysis infrastructure, leave graph structure untouched (hopefully less things break?!).
2/ Roll up the sleeves, and clone/inline the blocks like the big boys (I think v8 does this). Nested finalisers calling other finalizers (just feels like something I am not emotionally equipped to deal with atm 😂).
If anyone has experience with handling such situations I would greatly appreciate your view on this. I know this might sound a bit silly, but JS does require a bit of extra maintenance at times (emitting instructions to move certain elements to heap, clearing out the catch offsets from stack, potentially calling iterator callbacks, the whole deal); so any change I make might end up becoming a week of debugging exercise. As I am the sole developer and maintainer of the project, I have become a bit more cautious about taking abrupt decisions which could end up breaking more things than they fix.
Thanks everyone, this thread has been incredibly useful for the past few months. I just got my passport yesterday with a 10yr B1/B2 visa. A little bit of background about me:
I am a PhD scholar at IIT Bombay (India) and recently had my research paper accepted at a flagship conference in the USA. I was invited to deliver an oral presentation (later this year). At first I was excited but after spending nearly two months and getting nowhere, the entire process just felt 'stuck'. I spent a month of getting all documentation/funding/etc in order and then another month trying to book a slot.
-- I generally do everything to avoid 'kafkaesque' situations (but the process will force you through it). Waiting a month for the funding to be approved felt a bit like 'waiting for Godot ;)'. During this time I also had a lot of arguments (probably unjustified in hindsight) with my advisor on whether it was really worth it for me to travel.
After a lot of effort (waking up at odd times and checking if the website is finally working {at some point the scheduling system was broken; which they updated on the website much later}) I managed to get an appointment for a much later date. I was informed by my friends that it was a good idea to get any appointment I can get, and try the emergency appointment route. It felt like a much more predictable route and it actually was. I wrote a small writeup (explaining my case with relevant documents attached) and they responded back within 12 hours (I was pleasantly surprised).
My interview was over before I knew it, they just asked me two questions, 1. (something like) what do you do and what is the purpose of your travel -- I spoke a bit about my research and the exact reason I would be travelling 2. Will IIT Bombay be sponsoring your travel? Yes. would you like me to show you the documents? - No not required... your VISA has been approved...
To be honest, the process was not as bad I thought it was going to be. Getting the documents ready took around a month, VISA scheduling took another, other than that it was not an unpredictable process at all. I had all kinds of irrational fears earlier, like getting rejected because I had a C in physical education on my school grade sheet or because I was a Libra. This was further amplified by the fact that you can hear other people's interview as you stand in line (I witnessed a lot of rejections, in fact the two people right before me had their visa rejected). From my experience, they ask straight questions and expect straight answers. In my case, It felt like the decision was already made even before I got there, the interview felt more like "crossing the t's and dotting the I's" exercise.