Closed Bug 732306 Opened 13 years ago Closed 13 years ago

Remove jsint

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: dmandelin, Assigned: dmandelin)

References

Details

Attachments

(3 files)

YA typedef cleanup.
Attached patch PatchSplinter Review
There's a little bit more to this job than the previous ones. There are about 280 uses of |jsint| in the code base (99% in SpiderMonkey). jsint is a typedef for int32_t, so I could have just made that replacement, but when I looked at the code, many of the sites seemed to just want an int semantically, so I went case by case. I still used scripts to generate most of the diff, to make it easier to refresh post-review. I'll post the scripts later. Summary of what I picked: - For values going to or from jsvals, jsids, or jump offsets, I used int32_t. - Otherwise, I used |int|, except in a few cases where there was an obvious connection to int32_t, e.g., StaticStrings::getInt
Attachment #602236 - Flags: review?(luke)
Attached file File munger script
Comment on attachment 602236 [details] [diff] [review] Patch Adios. leftIndex needs to be re-aligned.
Attachment #602236 - Flags: review?(luke) → review+
Comment on attachment 602236 [details] [diff] [review] Patch Review of attachment 602236 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/plugins/base/nsJSNPRuntime.cpp @@ +461,1 @@ > if (JS_DoubleIsInt32(d, &i)) { I'm surprised this works ::: js/src/jsapi.h @@ +2243,5 @@ > extern JS_PUBLIC_API(JSBool) > JS_ValueToNumber(JSContext *cx, jsval v, double *dp); > > extern JS_PUBLIC_API(JSBool) > +JS_DoubleIsInt32(double d, int32_t *ip); ... given this.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: