The register allocator should not use a hash set for the few registers it keeps track of. It should use a deque to cycle the register usage, and it should also have a way to indicate a preferred register to allocate.
Created attachment 233013 [details]
Comment on attachment 233013 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=233013&action=review
Very neat! I love it.
> + RELEASE_ASSERT(m_registers.size());
I think you should put this assertion one line above. Otherwise it looks a little weird accessing the first element before checking if the size is valid.
> + JSC::MacroAssembler::RegisterID allocateRegisterWithPreference(JSC::MacroAssembler::RegisterID registerID)
registerID -> preferedRegisterID?
> + UNUSED_PARAM(registerID);
> + for (auto reg : m_registers)
reg -> register
Created attachment 233072 [details]
Comment on attachment 233072 [details]
Clearing flags on attachment: 233072
Committed r169953: <http://trac.webkit.org/changeset/169953>
All reviewed patches have been landed. Closing bug.