Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Trivial do-while loop crashes Prepack #2500

Open
NTillmann opened this issue Aug 28, 2018 · 0 comments
Open

Trivial do-while loop crashes Prepack #2500

NTillmann opened this issue Aug 28, 2018 · 0 comments
Labels

Comments

@NTillmann
Copy link
Contributor

let x = __abstract("number", "(x)");
do { x++; } while (x < 3);

=>

Invariant Violation:
This is likely a bug in Prepack, not your code. Feel free to open an issue on GitHub.
    at invariant (/Users/nikolait/git/prepack/lib/invariant.js:24:15)
    at ResidualOperationSerializer._serializeLocalAssignment (/Users/nikolait/git/prepack/lib/serializer/ResidualOperationSerializer.js:633:28)
    at ResidualOperationSerializer.serializeStatement (/Users/nikolait/git/prepack/lib/serializer/ResidualOperationSerializer.js:138:26)
    at TemporalOperationEntry.serialize (/Users/nikolait/git/prepack/lib/utils/generator.js:155:26)
    at serializeFn (/Users/nikolait/git/prepack/lib/utils/generator.js:852:46)
    at Generator.serialize (/Users/nikolait/git/prepack/lib/utils/generator.js:861:7)
    at _withGeneratorScope (/Users/nikolait/git/prepack/lib/serializer/ResidualHeapSerializer.js:1946:141)
    at ResidualHeapSerializer._withGeneratorScope (/Users/nikolait/git/prepack/lib/serializer/ResidualHeapSerializer.js:1907:5)
    at Object.serializeGenerator (/Users/nikolait/git/prepack/lib/serializer/ResidualHeapSerializer.js:1946:64)
    at ResidualOperationSerializer._serializeDoWhile (/Users/nikolait/git/prepack/lib/serializer/ResidualOperationSerializer.js:472:30)

The issue is that the phiNode is undefined.

@NTillmann NTillmann added the bug label Sep 22, 2018
@hermanventer hermanventer removed their assignment Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants