dillon1000/react

Commit

[test][hir-lower] todo: lower property calls in evaluation order

We currently are not lowering property calls in evaluation order. 

I wonder if the following lowering for a PropertyCall (with static or computed 
property) is semantically equivalent to source: 

1. eval + resolve receiver (store in t0) 

2. eval computed property (if present) 

3. resolve t0.property (binding the call to receiver and storing in t1) 

4. eval args 

5. eval t1(args) 

Although codegen might then generate something like this (if args are named 
temporaries) 

```js 

const tmp = receiver.property.bind(receiver); 

// lower args to temporaries 

tmp(arg1, arg2); 

```
Browse files
Changed paths4 files
First-parent comparison
A compiler/forget/src/__tests__/fixtures/compiler/_bug.computed-call-evaluation-order.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/_bug.computed-call-evaluation-order.js AddedA compiler/forget/src/__tests__/fixtures/compiler/_bug.property-call-evaluation-order.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/_bug.property-call-evaluation-order.js Added
Patch

Files changed

Rendering syntax-highlighted changes…