Hi list,

Lately, we have been discussing ways to clean-up the MIR.h file. Among the problem that we have with this file is that all instructions are randomly ordered in the file. Thus if one need to look for an instruction, you must use the search&jump feature of your editor.

More over, the problem is more general than MIR.h, as we see the same problem in Lowering.cpp and CodeGenerator.cpp.

Having such files results in a terrible developer experience as the source-code locality is non-existent. On the other hand, this model provides good compiled-code locality, as similar functions are packed together in the binary.

Previously, I suggested that we should be moving functions closer to the the transformation phase which are making use of them. As of today, we can see this idea applied to RangeAnalysis.cpp and to Recover.cpp. This idea gives better compiled-code locality.

On the other hand, as a developer, I am sad of the current state, as when I have to look for one instruction, I do not see everything which is related to this instruction in one file. Having source-code locality is good for eye-balling consistency of modifications (reducing review time?).

I think we should improve source-code locality while keeping/improving compiled-code locality. I want to know if people are interested by this topic and if I we should continue this discussion on a bug with actual code prototypes?

--
Nicolas B. Pierron
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to