Closed Bug 1312395 Opened 8 years ago Closed 8 years ago

Baldr: merge PassTls and InterModule

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: bbouvier, Assigned: bbouvier)

References

Details

Attachments

(1 file)

Attached patch merge-enum.patchSplinter Review
We unveiled a logical invariant in WasmIonCompile with Lars, when looking at the code deciding whether to pass the TLS register: when InterModule is True, then PassTls *must* be true. This indicates we can simplify the code there a bit. Here's the patch doing this and documenting behavior more clearly.
Attachment #8803836 - Flags: review?(luke)
Comment on attachment 8803836 [details] [diff] [review]
merge-enum.patch

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

::: js/src/asmjs/WasmIonCompile.cpp
@@ +62,5 @@
> +
> +enum class TlsUsage {
> +    Unused,  // No particular action is taken with respect to the TLS register.
> +    Need,    // The TLS register must be reloaded just before the call.
> +    Preserve // Same, plus the TLS register must be preserved across the call.

I know I suggested "Preserve", but I realized that's not quite right.  I think
  CallerSave // Same, plus space must be allocated to save/restore the TLS register

@@ +65,5 @@
> +    Need,    // The TLS register must be reloaded just before the call.
> +    Preserve // Same, plus the TLS register must be preserved across the call.
> +};
> +
> +bool NeedsTls(TlsUsage usage) {

nit: static and \n before {
Attachment #8803836 - Flags: review?(luke) → review+
Nice cleanup, btw, thanks!
Pushed by bbouvier@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/00b6c424d440
Merge InterModule/PassTLS into a single enum; r=luke
https://hg.mozilla.org/mozilla-central/rev/00b6c424d440
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: