Closed
Bug 696067
Opened 13 years ago
Closed 6 years ago
avmfeatures.as should generate #warning if feature switches are already defined
Categories
(Tamarin Graveyard :: Build Config, defect)
Tamarin Graveyard
Build Config
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: edwsmith, Unassigned)
References
Details
(Whiteboard: has-patch)
Attachments
(1 file)
16.16 KB,
patch
|
edwsmith
:
feedback?
|
Details | Diff | Splinter Review |
The protocol for features is that the vm host defines feature or system switches, then the features define VMCFG_ (etc) names that control functionality. It is wrong for any of those secondary switches to be already defined, upon entering the top of avmfeatures.h We could add two safeguards: 1. for every switch defined by every feature, guard that its not already defined, #error out if so. 2. add an <obsolete> section for legacy switches that nobody defines, but that are permanently unused.
Reporter | ||
Updated•13 years ago
|
Component: Baseline JIT (CodegenLIR) → Build Config
QA Contact: nanojit → build-config
Reporter | ||
Updated•13 years ago
|
Summary: avmfeatures.as should generate #errors if feature switches are already defined → avmfeatures.as should generate #warning if feature switches are already defined
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → edwsmith
Reporter | ||
Comment 1•13 years ago
|
||
This can't land as-is, because it breaks everything; our own build scripts define things they shouldn't, notably AVMPLUS_UNIX.
Attachment #572036 -
Flags: feedback?
Reporter | ||
Comment 2•13 years ago
|
||
I also have found player code switching on input switches (AVMFEATURE_x, AVMSYSTEM_x), or using them with #ifdef or defined() rather than normal logic. from a casual grep, these need looking at: #if AVMFEATURE_OSR - settings code !defined(AVMFEATURE_AOT_DISABLE_NEON) - rendering code, many hits defined (AVMFEATURE_MEMORY_PROFILER) - android
Reporter | ||
Comment 3•13 years ago
|
||
(In reply to Edwin Smith from comment #2) > !defined(AVMFEATURE_AOT_DISABLE_NEON) - rendering code, many hits This one isn't even defined by core/avmfeatures.as, so we can ignore it, but using the name "AVMFEATURE_XXX" outside avmfeatures.as is probably asking for trouble.
Comment 4•13 years ago
|
||
(In reply to Edwin Smith from comment #3) > (In reply to Edwin Smith from comment #2) > > > !defined(AVMFEATURE_AOT_DISABLE_NEON) - rendering code, many hits > > This one isn't even defined by core/avmfeatures.as, so we can ignore it, > but using the name "AVMFEATURE_XXX" outside avmfeatures.as is probably > asking for trouble. We should crack down on this. Plus, this looks like a tweak more than a feature so it's triply bad. And it's a "negative" name (disable_blahblah) so quadruply bad.
Reporter | ||
Updated•13 years ago
|
Target Milestone: --- → Future
Reporter | ||
Updated•12 years ago
|
Assignee: edwsmith → nobody
Reporter | ||
Updated•12 years ago
|
Whiteboard: has-patch
Updated•6 years ago
|
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•