Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Jul 18, 2019

The key thing is that there is a single constant, which may or may not be saved/loaded from a local, and may or may not get an added global if in relocatable code.

Fixes emscripten-core/emscripten#8993

…e constant, which may or may not be saved/loaded from a local, and may or may not get an added global if in relocatable code
// An EM_JS has a single const in the body. Typically it is just returned,
// but in unoptimized code it might be stored to a local and loaded from
// there, and in relocatable code it might get added to __memory_base etc.
FindAll<Const> consts(curr->body);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh man a Const-finder? That's way nicer :D

@kripken kripken merged commit e4ae884 into master Jul 18, 2019
@kripken kripken deleted the emjspic branch July 18, 2019 22:24
kripken added a commit to emscripten-core/emscripten that referenced this pull request Jul 20, 2019
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
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.

Unexpected generated __em_js__ function body

3 participants