Closed Bug 1737561 Opened 3 years ago Closed 3 years ago

Use loadArgumentFixedSlot to load fixed arguments

Categories

(Core :: JavaScript Engine: JIT, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(3 files)

Two issues:

  • tryAttachObjectIsPrototypeOf() and tryAttachObjectToString() are using loadArgumentDynamicSlot() instead of loadArgumentFixedSlot() to load the this value.
  • loadStandardCallArgument() should be replaced with loadArgumentFixedSlot(), so it's easier to experiment inlining natives through Function.prototype.call. (*)

(*) Background info: I've investigated bug 1131996, which is now easy to fix because the arguments analysis is gone - I can upload the patch if there's interest for it, but when I then checked the actual web impact, I've seen that supporting scalar replacement for the pattern [].slice.call(arguments) is more useful. But to support that pattern, we first need to be able to inline natives through Function.prototype.call.

Using loadArgumentDynamicSlot() doesn't help to share the IC code for multiple callers,
because we only attach the IC code when the arguments count is fixed.

And then remove loadStandardCallArgument() because it's no longer used.

Depends on D129384

Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9146c852fd52
Part 1: Use loadArgumentFixedSlot() to load the this-value for Object.prototype.{isPrototypeOf,toString}. r=jandem
https://hg.mozilla.org/integration/autoland/rev/a71d43be04c6
Part 2: Use loadArgumentFixedSlot() instead of loadStandardCallArgument() for Math.hypot. r=jandem
https://hg.mozilla.org/integration/autoland/rev/1b8c01e8d2a3
Part 3: Use loadArgumentFixedSlot() instead of loadStandardCallArgument() for Math.{min,max}. r=jandem

(For what it's worth, if the fix is easy, my vote is for landing the patch for bug 1131996. I'm sure there's still code out there using that pattern.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: