OdinMonkey: small Ion FFI optimization

RESOLVED FIXED in mozilla33

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: luke, Assigned: luke)

Tracking

unspecified
mozilla33
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 8442858 [details] [diff] [review]
optimize-ffi

I noticed we can just bake in the Runtime* using the existing patching machinery instead of using two loads to get it from the AsmJSActivation.
Attachment #8442858 - Flags: review?(dtc-moz)
Comment on attachment 8442858 [details] [diff] [review]
optimize-ffi

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

Nice. Saves three instructions on the ARM.

::: js/src/jit/AsmJS.cpp
@@ +6708,4 @@
>          // The following is inlined:
> +        //   Activation *act = rt->mainThread.activation()->active_ = false;
> +        //   rt->mainThread.jitTop = prevJitTop_;
> +        //   rt->mainThread.jitJSContext = prevJitJSContext_;

This does not read well. Perhaps:
        //   Activation *act = rt->mainThread.activation();
        //   act->active_ = false;
        //   rt->mainThread.jitTop = act->prevJitTop_;
        //   rt->mainThread.jitJSContext = atc->prevJitJSContext_;
Attachment #8442858 - Flags: review?(dtc-moz) → review+
https://hg.mozilla.org/mozilla-central/rev/a43d41c1645a
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.