[webkit-dev] ENABLE define purging

Maciej Stachowiak mjs at apple.com
Thu Apr 28 23:11:36 PDT 2011


On Apr 28, 2011, at 10:11 AM, Adam Barth wrote:

> Maybe the ones that control features should be FEATURE(INDEXED_DATABASE)?  There's also a wide variety in the scale of feature.  For example, SVG and INSPECTOR are vastly larger features than REQUEST_ANIMATION_FRAME.  That's more of an observation than a lead up to a suggestion.
> 
Tentatively, it seems like features (in the sense of interfaces of any kind exposed to Web content) are the majority of uses of ENABLE. Probably second is flags useful only for debugging. If there is a coherent theme to the items that remain, I'd suggest renaming those.

That being said, if we do want to rename the feature flags specifically, then FEATURE would certainly be a fine name.

Regards,
Maciej

> Adam
> On Apr 28, 2011 2:51 AM, "Maciej Stachowiak" <mjs at apple.com> wrote:
> > 
> > 
> > The following slightly more complete and accurate command finds 132:
> > 
> > $ find Source -name "*.cpp" -or -name "*.h" -or -name "*.mm" -or -name "*.c" -or -name "*.m" -or -name "*.idl" | xargs -L 1000 grep -r "#if ENABLE" -h | awk '{print $2}' | grep ENABLE | sed -e 's/(/_/; s/)//;' | sort | uniq
> > 
> > Some suggestions:
> > 
> > * Maybe one thing to do is to use a different base macro name for the ones that exist solely for debugging purposes and are never meant to be used in a shipping build. For example, JSC_ZOMBIES and FAST_MALLOC_MATCH_VALIDATION are clearly in this category.
> > 
> > * Some of these should really be USE instead of ENABLE, since they imply use of a particular external library. GLIB_SUPPORT and LEVELDB, PURGABLE_MEMORY, and SYMBIAN_DIALOG_PROVIDERS all seem to be in this category for instance.
> > 
> > 
> > 
> > On Apr 28, 2011, at 1:21 AM, Eric Seidel wrote:
> > 
> >> We have 127 ENABLE defines. As discussed in Maciej's "Saying No"
> >> talk, we should make an effort to reduce that number so as to reduce
> >> complexity in our build process and testing matrix.
> >> 
> >> % find Source -name "*.cpp" | xargs grep -r "#if ENABLE" -h | awk
> >> '{print $2}' | sort | uniq
> >> 
> >> ENABLE(3D_RENDERING)
> >> ENABLE(ACCELERATED_2D_CANVAS)
> >> ENABLE(APPLICATION_CACHE_DYNAMIC_ENTRIES)
> >> ENABLE(ASSEMBLER)
> >> ENABLE(ASSEMBLER_WX_EXCLUSIVE)
> >> ENABLE(BLOB)
> >> ENABLE(CHANNEL_MESSAGING)
> >> ENABLE(CLIENT_BASED_GEOLOCATION)
> >> ENABLE(CODEBLOCK_SAMPLING)
> >> ENABLE(COMPUTED_GOTO_INTERPRETER)
> >> ENABLE(CONTEXT_MENUS)
> >> ENABLE(Condition1)
> >> ENABLE(DASHBOARD_SUPPORT)
> >> ENABLE(DATABASE)
> >> ENABLE(DATALIST)
> >> ENABLE(DATA_TRANSFER_ITEMS)
> >> ENABLE(DEBUG_MATH_LAYOUT)
> >> ENABLE(DEBUG_WITH_BREAKPOINT)
> >> ENABLE(DETAILS)
> >> ENABLE(DEVICE_ORIENTATION)
> >> ENABLE(DFG_JIT)
> >> ENABLE(DFG_JIT_RESTRICTIONS)
> >> ENABLE(DIRECTORY_UPLOAD)
> >> ENABLE(DOM_STORAGE)
> >> ENABLE(DRAG_SUPPORT)
> >> ENABLE(EVENTSOURCE)
> >> ENABLE(EXECUTABLE_ALLOCATOR_DEMAND)
> >> ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
> >> ENABLE(FAST_MALLOC_MATCH_VALIDATION)
> >> ENABLE(FAST_MOBILE_SCROLLING)
> >> ENABLE(FILE_SYSTEM)
> >> ENABLE(FILTERS)
> >> ENABLE(FTPDIR)
> >> ENABLE(FULLSCREEN_API)
> >> ENABLE(GEOLOCATION)
> >> ENABLE(GESTURE_EVENTS)
> >> ENABLE(GESTURE_RECOGNIZER)
> >> ENABLE(GLIB_SUPPORT)
> >> ENABLE(GLOBAL_FASTMALLOC_NEW)
> >> ENABLE(ICONDATABASE)
> >> ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
> >> ENABLE(IMAGE_RESIZER)
> >> ENABLE(INDEXED_DATABASE)
> >> ENABLE(INPUT_SPEECH)
> >> ENABLE(INSPECTOR)
> >> ENABLE(INTERPRETER)
> >> ENABLE(JAVASCRIPT_DEBUGGER)
> >> ENABLE(JAVASCRIPT_I18N_API)
> >> ENABLE(JAVA_BRIDGE)
> >> ENABLE(JIT)
> >> ENABLE(JIT_OPTIMIZE_CALL)
> >> ENABLE(JIT_OPTIMIZE_METHOD_CALLS)
> >> ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
> >> ENABLE(JIT_USE_SOFT_MODULO)
> >> ENABLE(JSC_MULTIPLE_THREADS)
> >> ENABLE(JSC_ZOMBIES)
> >> ENABLE(LEVELDB)
> >> ENABLE(LINK_PREFETCH)
> >> ENABLE(MAC_JAVA_BRIDGE)
> >> ENABLE(MATHML)
> >> ENABLE(MEDIA_STATISTICS)
> >> ENABLE(MEDIA_STREAM)
> >> ENABLE(MEMORY_SAMPLER)
> >> ENABLE(METER_TAG)
> >> ENABLE(NETSCAPE_PLUGIN_API)
> >> ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
> >> ENABLE(NOTIFICATIONS)
> >> ENABLE(NO_LISTBOX_RENDERING)
> >> ENABLE(OFFLINE_WEB_APPLICATIONS)
> >> ENABLE(ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL)
> >> ENABLE(OPCODE_SAMPLING)
> >> ENABLE(OPCODE_STATS)
> >> ENABLE(OPENTYPE_SANITIZER)
> >> ENABLE(ORIENTATION_EVENTS)
> >> ENABLE(PAN_SCROLLING)
> >> ENABLE(PARALLEL_JOBS)
> >> ENABLE(PLUGIN_PACKAGE_SIMPLE_HASH)
> >> ENABLE(PLUGIN_PROCESS)
> >> ENABLE(PLUGIN_PROXY_FOR_VIDEO)
> >> ENABLE(PROGRESS_TAG)
> >> ENABLE(PURGEABLE_MEMORY)
> >> ENABLE(QT_BEARER)
> >> ENABLE(QT_USERAGENT_DEVICEMODEL)
> >> ENABLE(QUOTA)
> >> ENABLE(REGEXP_TRACING)
> >> ENABLE(REGISTER_PROTOCOL_HANDLER)
> >> ENABLE(REPAINT_THROTTLING)
> >> ENABLE(REQUEST_ANIMATION_FRAME)
> >> ENABLE(SAMPLING_COUNTERS)
> >> ENABLE(SAMPLING_FLAGS)
> >> ENABLE(SAMPLING_THREAD)
> >> ENABLE(SHARED_WORKERS)
> >> ENABLE(SINGLE_THREADED)
> >> ENABLE(SKIA_TEXT)
> >> ENABLE(SMOOTH_SCROLLING)
> >> ENABLE(SPEECH_INPUT)
> >> ENABLE(SPELLCHECK)
> >> ENABLE(SVG)
> >> ENABLE(SVG_ANIMATION)
> >> ENABLE(SVG_AS_IMAGE)
> >> ENABLE(SVG_FONTS)
> >> ENABLE(SVG_FOREIGN_OBJECT)
> >> ENABLE(SVG_USE)
> >> ENABLE(SYMBIAN_DIALOG_PROVIDERS)
> >> ENABLE(TEXT_CARET)
> >> ENABLE(TILED_BACKING_STORE)
> >> ENABLE(TOUCH_EVENTS)
> >> ENABLE(VIDEO)
> >> ENABLE(VIDEO_TRACK)
> >> ENABLE(WBXML)
> >> ENABLE(WCSS)
> >> ENABLE(WEBGL)
> >> ENABLE(WEB_ARCHIVE)
> >> ENABLE(WEB_AUDIO)
> >> ENABLE(WEB_PROCESS_SANDBOX)
> >> ENABLE(WEB_SOCKETS)
> >> ENABLE(WEB_TIMING)
> >> ENABLE(WML)
> >> ENABLE(WORKERS)
> >> ENABLE(WTF_MULTIPLE_THREADS)
> >> ENABLE(XHR_RESPONSE_BLOB)
> >> ENABLE(XHTMLMP)
> >> ENABLE(XPATH)
> >> ENABLE(XSLT)
> >> ENABLE(YARR_JIT)
> >> ENABLE(YARR_JIT_DEBUG)
> >> ENABLE_NOTIFICATIONS
> >> 
> >> It's unclear to me how many of these we can easily remove (or should remove?)
> >> 
> >> If anyone has suggestions, I have the beginning of a spreadsheet here:
> >> https://spreadsheets.google.com/ccc?key=0AlC4tS7Ao1fIdHFVNUpFSDBudEF5WGM3WDNzQjI3Ync&hl=en&authkey=CJCDiooK
> >> _______________________________________________
> >> webkit-dev mailing list
> >> webkit-dev at lists.webkit.org
> >> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
> > 
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110428/b34ca920/attachment.html>


More information about the webkit-dev mailing list