rm JSScript::evalHashLink

RESOLVED FIXED in mozilla16

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: luke, Assigned: luke)

Tracking

unspecified
mozilla16
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
With bug 765956, I think we can remove JSScript::evalHashLink by using a Vector in the eval cache instead of embedding the link.  This would save a word and make njn smile.
:)
Whiteboard: [js:t]
(Assignee)

Updated

5 years ago
Depends on: 770261
(Assignee)

Comment 2

5 years ago
Created attachment 638585 [details] [diff] [review]
rm

Might as well.  Plus, the eval cache logic was bothering me so I turned it into a proper HashSet.

A few notes:
 - evalCache is cleared on every GC
 - compartment now implies principals (CPG) which is why I replaced the principals subsumption check with compartment equality
 - that EvalKernel assert I removed is already in DirectEval
Assignee: general → luke
Status: NEW → ASSIGNED
Attachment #638585 - Flags: review?(n.nethercote)
Comment on attachment 638585 [details] [diff] [review]
rm

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

I know I owe you like 100 reviews but I barely know anything about the EvalCache so this r+ is very rubber-stampy... you should probably get someone else to check it :/

One useful thing I can say:  if you haven't already, please save yourself some trouble later by checking that the sizeof(JSScript) static assertion passes on all eight combinations of:
- 32-bit vs 64-bit
- opt vs debug
- methodjit enabled vs disabled

::: js/src/builtin/Eval.cpp
@@ -63,5 @@
> -
> -    h *= JS_GOLDEN_RATIO;
> -    h >>= 32 - SHIFT;
> -    JS_ASSERT(h < ArrayLength(table_));
> -    return &table_[h];

Good riddance to ad hoc hash tables.
Attachment #638585 - Flags: review?(n.nethercote) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9a5dfa1b07d
Target Milestone: --- → mozilla16
Unfortunately bug 772303 (https://hg.mozilla.org/integration/mozilla-inbound/rev/fad7d06d7dd5) had to be backed out for winxp pgo-only jsreftest failures.

This bug (amongst others) either caused unresolvable (for someone who doesn't work on the JS engine at least) conflicts with the backout of fad7d06d7dd5, or else bugzilla dependencies indicated that one of it's dependants had now been backed out. 

Since there was no one in #developers that could resolve the conflicts, unfortunately this bug has been backed out:

https://hg.mozilla.org/integration/mozilla-inbound/rev/f0be4b70b814
Target Milestone: mozilla16 → ---
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ebc800948e7a
(Assignee)

Updated

5 years ago
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/ebc800948e7a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.