Closed
Bug 977181
Opened 11 years ago
Closed 11 years ago
Don't push/assume IonContext when executing JIT code
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: luke, Assigned: luke)
Details
Attachments
(2 files)
|
12.55 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
|
17.41 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
IonContext is used during JIT compilation (much less after the performance work to stop using GetIonContext), but it shouldn't be necessary while running JIT code since we already maintain PerThreadData::ionJSContext when pushing JitActivations.
This patch adds a GetJSContextFromJitCode() that returns TlsPerThreadData.get()->ionJSContext and uses this in the few places that use GetIonContext()->cx when called from JIT code. The patch also pushes an IonContext in a few places that perform IC compilation. (Hopefully later we'll be able to remove the remaining IonContext uses from compilation and just use explicit alloc/cx-passing.)
Attachment #8382328 -
Flags: review?(jdemooij)
| Assignee | ||
Comment 1•11 years ago
|
||
While I'm here, I might as well rename ionJSContext to jitJSContext and ionStackLimit to jitStackLimit.
Attachment #8382339 -
Flags: review?(jdemooij)
Comment 2•11 years ago
|
||
Comment on attachment 8382328 [details] [diff] [review]
rm-ion-context-push
Review of attachment 8382328 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! I think you can also remove FastInvokeGuard::ictx_ (in vm/Interpreter-inl.h) now, r=me with that.
Attachment #8382328 -
Flags: review?(jdemooij) → review+
Comment 3•11 years ago
|
||
Comment on attachment 8382339 [details] [diff] [review]
rename-ion-to-jit
Review of attachment 8382339 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/Stack.cpp
@@ +1340,5 @@
> jit::JitActivation::~JitActivation()
> {
> if (active_) {
> cx_->mainThread().ionTop = prevIonTop_;
> + cx_->mainThread().jitJSContext = prevIonJSContext_;
Nit: we can rename prevIonJSContext_ too.
Attachment #8382339 -
Flags: review?(jdemooij) → review+
| Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2fb5b3b138d7
https://hg.mozilla.org/mozilla-central/rev/1cec924f3734
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•