Closed Bug 898451 Opened 7 years ago Closed 7 years ago

Miscellaneous SpiderMonkey cleanups

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: sunfish, Unassigned)

Details

Attachments

(4 files, 1 obsolete file)

The following are a few patches for miscellaneous cleanups I've collected in the js/src tree.
Whiteboard: [leave open]
Attachment #781723 - Flags: review?(jwalden+bmo)
This showed up among a simple scan for non-const global variables.
Attachment #781724 - Flags: review?(nicolas.b.pierron)
Attached patch simple cleanupsSplinter Review
Attachment #781726 - Flags: review?(nicolas.b.pierron)
Attachment #781729 - Flags: review?(evilpies)
Attachment #781723 - Flags: review?(jwalden+bmo) → review+
Comment on attachment 781724 [details] [diff] [review]
don't define LabelBase::id_count in non-debug mode

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

Labels are manipulated by addresses, and this id field is not even used.  So I will suggest to just remove it.
Attachment #781724 - Flags: review?(nicolas.b.pierron) → feedback+
Comment on attachment 781726 [details] [diff] [review]
simple cleanups

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

sounds good to me.
Attachment #781726 - Flags: review?(nicolas.b.pierron) → review+
Attached patch remove id_countSplinter Review
(In reply to Nicolas B. Pierron [:nbp] from comment #5)
> Labels are manipulated by addresses, and this id field is not even used.  So
> I will suggest to just remove it.

Works for me.
Attachment #781724 - Attachment is obsolete: true
Attachment #782929 - Flags: review?(nicolas.b.pierron)
Attachment #782929 - Flags: review?(nicolas.b.pierron) → review+
Comment on attachment 781729 [details] [diff] [review]
constify some global variables

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

You certainly like 'const' :)

::: js/src/editline/editline.c
@@ -90,1 @@
>  unsigned	rl_quit;

Wow never looked at this code.
Attachment #781729 - Flags: review?(evilpies) → review+
Yeah; I assume some of this code is only used in the standalone js shell, but it's nice to clean up anyway so that analysis tools don't worry about it.

https://hg.mozilla.org/integration/mozilla-inbound/rev/790a8a3d4aa5
Whiteboard: [leave open]
https://hg.mozilla.org/mozilla-central/rev/790a8a3d4aa5
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.