This test uses eval, and the filename/line# calculations are expensive there.
Judging by the code, I think the culprit is js_PCToLineNumber. It walks through all source notes of the script containing the eval to find the note that contains the given pc. A simple fix would be to embed the line number into JSOP_EVAL.
Assignee: general → igor
Created attachment 311301 [details] [diff] [review] v1 The patch introduces JSOP_LINENO and always generates the new bytecode after JSOP_EVAL. I use this independent bytecode and don't extend JSOP_EVAL with an extra 2 bytes to store lineno to avoid extra checks in the shared implementation of JSOP_CALL and JSOP_EVAL.
Created attachment 311302 [details] [diff] [review] v1 for real
Comment on attachment 311302 [details] [diff] [review] v1 for real r=shaver, indeed. (The comment above JSXDR_BYTECODE_VERSION should really be changed, since we want to increment the second term, to decrement the expression's value!)
Attachment #311302 - Flags: review?(shaver) → review+
Comment on attachment 311302 [details] [diff] [review] v1 for real Asking for approval: this is a safe optimization to avoid expensive calculations of the line number based on script's pc pointer.
Comment on attachment 311302 [details] [diff] [review] v1 for real a1.9b5=beltzner
I checked in the patch from the comment 4 to the trunk: http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1206377895&maxdate=1206378079&who=igor%25mir2.org
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Created attachment 311547 [details] [diff] [review] using C, not C++ comments In the checked in patch I have used // FALL THROUGH. This patch fixes this. I will check it in when the tree will be green.
You need to log in before you can comment on or make changes to this bug.