Skip to content

Replaced access path bases with access paths in backward dataflow #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 3, 2025

Conversation

MForest7
Copy link
Collaborator

@MForest7 MForest7 commented May 28, 2025

Replaced nested objects in backward dataflow with access paths, also get a performance increase.

project stmts avg time (main) avg time (new) aa improvement, % (old) aa improvement, % (new)
project1 9914 2.5s 1.6s 37.2 39.4
project2 26679 2.2s 1.4s 15.3 16.5
project3 4272 0.8s 0.4s 29.0 28.8
project4 4584 0.5s 0.3s 37.5 35.6
project5 121091 30.4s 9.3s 35.3 37.4
project6 28548 3.3s 1.7s 36.8 38.9
project7 5162 0.6s 0.4s 28.1 28.0

@MForest7 MForest7 requested a review from Lipen May 28, 2025 15:59
github-advanced-security[bot]

This comment was marked as spam.

@Lipen

This comment was marked as resolved.

@MForest7 MForest7 force-pushed the mforest/ets-access-paths-in-backward branch from 094d735 to 3f5fdde Compare June 24, 2025 10:57
@Lipen
Copy link
Member

Lipen commented Jul 3, 2025

For the future reference: this PR disrupted the "saved types" trick for handling new T with unresolved T, in particular, the filling of typeInfo (later passed to savedTypes in Forward FF) in Backward FF was removed since it is either can't be expressed anymore, or it is just not clear how to do it straight. Consequently, I have removed the whole "saved types" logic from Forward FF to clean-up the code.

Below is the failing test with unresolved T and "expected" type which could be passed only with saved types trick, but it is not clean whether we even need to support such case. So, we have decided to currently disable such test.

class CaseNew2 {
    entrypoint() {
        let x = new Something(); // unresolved
        let y = x.foo; // use 'foo' field
        this.infer(x);
    }
    infer(a: any): any {
        const EXPECTED_ARG_0 = "Something { foo: any }";
    }
}

@Lipen Lipen merged commit 814740d into main Jul 3, 2025
6 checks passed
@Lipen Lipen deleted the mforest/ets-access-paths-in-backward branch July 3, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants