Closed Bug 1249960 Opened 4 years ago Closed 4 years ago

Find a better name for Int32Key and MacroAssembler::branchKey.

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

separated from bug 1245112 comment #49.

(In reply to Nicolas B. Pierron [:nbp] from bug 1245112 comment #49)
> ::: js/src/jit/MacroAssembler-inl.h
> @@ +499,5 @@
> > +}
> > +
> > +template<typename T>
> > +void
> > +MacroAssembler::branchKey(Condition cond, const T& length, const Int32Key& key, Label* label)
> 
> follow-up: Later, we should find a better name for Int32Key / branchKey. 
> And replace these arguments names by lhs / rhs.  It sounds to me that this
> function should just be named branch32.
Renamed following
  * Int32Key => RegisterOrInt32Constant
  * MacroAssembler::branchKey => MacroAssembler::branch32
  * MacroAssembler::storeKey  => MacroAssembler::store32
  * MacroAssembler::bumpKey with 1  => MacroAssembler::inc32
  * MacroAssembler::bumpKey with -1 => MacroAssembler::dec32

"RegisterOrInt32Constant" may be a bit too long, but at least clearer than Int32Key, I think.

also, made related methods' name aligned with similar methods for 32bit operation.
Assignee: nobody → arai.unmht
Attachment #8726575 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8726575 [details] [diff] [review]
Rename Int32Key to RegisterOrInt32Constant, branchKey to branch32, storeKey to store32, bumpKey to inc32 and dec32.

Review of attachment 8726575 [details] [diff] [review]:
-----------------------------------------------------------------

This is Wonderful!

RegisterOrInt32Constant is way way better than Int32Key and renaming the functions makes the code easier to read and understand.
Thanks :)
Attachment #8726575 - Flags: review?(nicolas.b.pierron) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c04247de9a256823e6f69b604d9b68667cfb4416
Bug 1249960 - Rename Int32Key to RegisterOrInt32Constant, branchKey to branch32, storeKey to store32, bumpKey to inc32 and dec32. r=nbp
https://hg.mozilla.org/mozilla-central/rev/c04247de9a25
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.