Joe Savona edeaaaf38a Add PropertyCall/ComputedCall instructions
Adds `PropertyCall` and `ComputedCall`, which are a combination of 
CallExpression and PropertyLoad/ComputedLoad, respectively. The goal is to 
ensure that we correctly model the receiver of a call where the callee is a 
member expression, and also accurately record scope dependencies in for both the 
computed and non-computed (property) cases. 

An alternative that I tried first was to add a `receiver: Place | null` to 
CallExpression. That works well for HIR construction, but it's then very 
difficult at codegen time to correctly reconstruct the original call: if the 
receiver and callee share part of their structure then we can transform back to 
a non-computed member expression, otherwise it has to be computed. Eg we have to 
distinguish `a.b.c[d.foo]()` from `a.b.c[a.b.c.foo]()`. Given that our target is 
high-level code, it seems reasonable to have a higher-level representation for 
these cases. 

I'm open to feedback but this feels pretty reasonable in terms of complexity / 
precision of modeling.
2023-01-17 09:40:49 -08:00
S
Description
No description provided
MIT 1.8 GiB
Languages
JavaScript 67.1%
TypeScript 29.4%
HTML 1.5%
CSS 1.1%
C++ 0.6%
Other 0.2%