eclipse / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
940 stars 394 forks source link

Improve runtime helpers story #517

Open mgaudet opened 7 years ago

mgaudet commented 7 years ago

It's a little strange that today, dependent runtimes need to edit OMR files to add new runtime helpers (see https://github.com/eclipse/omr/pull/509)

This can be improved.

mstoodle commented 7 years ago

@0xdaryl had the beginnings of a story for this part at one point with FERuntimeHelpers.inc (possibly not remembering the name properly) that could be brought in by a language compiler. Maybe we revive / revisit that approach?

lmaisons commented 7 years ago

I've wondered for a while now if this might not be solvable using the pre-processor by doing something along the lines of:

    #define RUNTIME_HELPER(x) (void (*) void) (x), #x

And simply declaring them in an ad hoc manner as they are needed.

Assuming this isn't completely unfeasible, if we were to go this route, it sounded like we'd have to demote runtime helpers to standard trampolines in the code cache, reserving the ones we may need to be able to call in the future as part of compiling a method (and failing the compilation / possibly switching code caches if we can't)