Refactor code that are obviously able to pass RegisterSet by value to do so instead of passing a reference.
Created attachment 326251 [details] proposed patch.
Comment on attachment 326251 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=326251&action=review > Source/JavaScriptCore/ChangeLog:9 > + Refactored code that are obviously able to pass RegisterSet by value to do so > + instead of passing a reference. It turns out that even for primitive values that can/should be passed by value, doing const T& is essentially doing just that. For example, const int& foo() const { return m_foo; } means that the actual load of the int will happen if the caller to foo() actually needs the value, and then it happens at the moment that the value is really needed. So, I don't think that your patch's change is consistent with what you're saying you're doing - RegisterSet is already being "passed by value" under the loose C++ definition of that.
(In reply to Filip Pizlo from comment #2) > It turns out that even for primitive values that can/should be passed by > value, doing const T& is essentially doing just that. OK. I should have known compilers are smart enough for that.
Created attachment 326257 [details] proposed patch.
Thanks for the review. Landed in r224550: <http://trac.webkit.org/r224550>.
<rdar://problem/35567060>