Closed Bug 364809 Opened 19 years ago Closed 19 years ago

Remove jsop_* from JSContext

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: Seno.Aiko, Assigned: Seno.Aiko)

Details

Attachments

(1 file, 1 obsolete file)

Since bug 325951 removed support for older JS versions, cx->jsop_eq / cx->jsop_ne always contain JSOP_EQ / JSOP_NE and are thus redundant.
Attached patch patch (obsolete) — Splinter Review
I moved version down to make it fit into the same dword as insideGCMarkCallback. That reduces the size of a JSContext from 360 to 356 bytes on x86 but I think the main benefit of this patch is that it makes it a bit easier to look at this huge struct in a debugger.
Attachment #249513 - Flags: review?(brendan)
This is good, sorry I didn't review till now. Need help from Igor or Brian to get the patch landed. I'll defer review to Igor, who did the version-reduction work (which we should probably do more of; I'm vexed by JS_HAS_BLOCK_SCOPE and so was mrbkap, last I heard). /be
Assignee: general → Seno.Aiko
Attachment #249513 - Flags: review?(brendan) → review?(igor)
Attachment #249513 - Flags: review?(igor) → review+
The previous patch has bitrotted a little.
Attachment #249513 - Attachment is obsolete: true
Whiteboard: [checkin needed]
I committed the patch from comment 3 to the trunk: Checking in jscntxt.c; /cvsroot/mozilla/js/src/jscntxt.c,v <-- jscntxt.c new revision: 3.101; previous revision: 3.100 done Checking in jscntxt.h; /cvsroot/mozilla/js/src/jscntxt.h,v <-- jscntxt.h new revision: 3.139; previous revision: 3.138 done Checking in jsscan.c; /cvsroot/mozilla/js/src/jsscan.c,v <-- jsscan.c new revision: 3.118; previous revision: 3.117 done Mark this fixed when you see that the committed code was the right one.
Thanks for the checkin! So it looks like this increased the code size on argo-vm by 48 bytes because version's offset is now greater than 127 bytes. If we want these bytes back we could change interpLevel to an uint16 (MAX_INTERP_LEVEL is 1000) and pair it with version. Moving options up and the regExpStatics down saves another ~120 bytes (MSVC, optimised). Are these savings worth another patch?
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
(In reply to comment #5) Moving options up and the regExpStatics down saves another ~120 > bytes (MSVC, optimised). Are these savings worth another patch? Yes, but please file another bug for that.
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: