Last Comment Bug 725548 - [meta] Remove obsolete numeric typedefs
: [meta] Remove obsolete numeric typedefs
Status: RESOLVED FIXED
: meta
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on: 725550 726230 730511 730523 731492 731898 732306 733260
Blocks: 712034
  Show dependency treegraph
 
Reported: 2012-02-08 18:23 PST by David Mandelin [:dmandelin]
Modified: 2013-11-05 02:08 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Python script for generic file munging (466 bytes, text/plain)
2012-02-08 19:09 PST, David Mandelin [:dmandelin]
no flags Details

Description David Mandelin [:dmandelin] 2012-02-08 18:23:20 PST
jsdouble, etc--hopefully we don't need any of that stuff any more.
Comment 1 David Mandelin [:dmandelin] 2012-02-08 19:04:36 PST
JSBool is the only hard one. The reasons we have it:

1. In VS2005, in C, there is no bool type defined. This could be worked around easily enough with 'typedef int bool' for VS2005 only.

2. More importantly, |bool| doesn't give a size guarantee, which would make life harder for the JITs (and possibly certain other applications).

3. any others?

Regarding #2, we already use |bool| for internal APIs, so it seems like it would be pretty much the same as what we have now to use |bool| most places and use a special |jsbool| only when JITs actually call that function.
Comment 2 David Mandelin [:dmandelin] 2012-02-08 19:09:06 PST
Created attachment 595615 [details]
Python script for generic file munging
Comment 3 Chris Leary [:cdleary] (not checking bugmail) 2012-02-09 11:46:27 PST
(In reply to David Mandelin from comment #1)
> 1. In VS2005, in C, there is no bool type defined. This could be worked
> around easily enough with 'typedef int bool' for VS2005 only.

I thought C embedders tended to cry whenever a third-party header defined something to be bool, because they may have their own (incompatible, un-namespaced) internal definition as well.
Comment 4 David Mandelin [:dmandelin] 2012-02-09 11:49:01 PST
(In reply to Chris Leary [:cdleary] from comment #3)
> (In reply to David Mandelin from comment #1)
> > 1. In VS2005, in C, there is no bool type defined. This could be worked
> > around easily enough with 'typedef int bool' for VS2005 only.
> 
> I thought C embedders tended to cry whenever a third-party header defined
> something to be bool, because they may have their own (incompatible,
> un-namespaced) internal definition as well.

I was hoping that "embedding SpiderMonkey in C with VS2005" was sufficiently obscure that no one's even doing it. We could always fix it more if someone actually is.
Comment 5 :Ms2ger (⌚ UTC+1/+2) 2012-05-22 07:35:56 PDT
Anything left to do here?
Comment 6 Chris Peterson [:cpeterson] 2013-11-04 22:06:47 PST
Anything left to do here? LegacyIntTypes.h defines some intX/uintX and JSIntX/JSUintX typedefs that are unused.
Comment 7 :Ms2ger (⌚ UTC+1/+2) 2013-11-05 02:08:46 PST
I think we're pretty much done here.

Note You need to log in before you can comment on or make changes to this bug.