The default bug view has changed. See this FAQ.

[meta] Remove obsolete numeric typedefs

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: dmandelin, Unassigned)

Tracking

({meta})

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
jsdouble, etc--hopefully we don't need any of that stuff any more.
(Reporter)

Updated

5 years ago
Depends on: 725550
(Reporter)

Comment 1

5 years ago
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.
(Reporter)

Comment 2

5 years ago
Created attachment 595615 [details]
Python script for generic file munging
(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.
(Reporter)

Comment 4

5 years ago
(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.
(Reporter)

Updated

5 years ago
Depends on: 726230
(Reporter)

Updated

5 years ago
Depends on: 730511
(Reporter)

Updated

5 years ago
Depends on: 730523

Updated

5 years ago
Blocks: 712034
(Reporter)

Updated

5 years ago
Depends on: 731492
(Reporter)

Updated

5 years ago
Depends on: 731898
(Reporter)

Updated

5 years ago
Depends on: 732306
(Reporter)

Updated

5 years ago
Depends on: 733260
Anything left to do here?
Anything left to do here? LegacyIntTypes.h defines some intX/uintX and JSIntX/JSUintX typedefs that are unused.
Keywords: meta
OS: Windows 7 → All
Hardware: x86_64 → All
I think we're pretty much done here.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.