summaryrefslogtreecommitdiff
path: root/indra/llcommon
AgeCommit message (Collapse)Author
2011-02-01Replace ad-hoc test functions/methods with systematic enumeration.Nat Goodspeed
Previous tests involved a small handful of functions with only a couple different parameter types. Now we exhaustively invoke every registration case, plus every metadata query case. Call cases still pending.
2011-02-01Automated merge up from viewer-development into mesh-developmentLoren Shih
2011-01-31Fix crash bug in array-style metadata query for nullary functions.Nat Goodspeed
The shortcut way to construct an LLSD array of size n is to assign LLSD() to array[n-1]. That's fine -- as long as you remember not to do it for n == 0.
2011-01-31Resolve LLEventDispatcher::add(function(const LLSD&)) ambiguity.Nat Goodspeed
A free function or static method accepting(const LLSD&) was being intercepted by the free-function-with-arbitrary-parameters overload instead of the original Callable overload. Added an overload that specifically redirects that case. Documented limit of ~6 arbitrary parameters for directly-called functions (5 for methods). Beyond that many, you have to write a Callable wrapper function and unpack the parameters from the LLSD by hand.
2011-01-31Fix a couple gotchas in LLSDArray, LLSDParam, llsd_equals().Nat Goodspeed
Nested LLSDArray expressions, e.g.: LLSD array_of_arrays(LLSDArray(LLSDArray(17)(34)) (LLSDArray("x")("y"))); would quietly produce bad results because the outermost LLSDArray was being constructed with the compiler's implicit LLSDArray(const LLSDArray&) rather than LLSDArray(const LLSD&) as the reader assumes. Fixed with an explicit copy constructor to Do The Right Thing. Generalized LLSDParam<float> specialization into a macro to resolve similar conversion ambiguities for float, LLUUID, LLDate, LLURI and LLSD::Binary. Added optional bits= argument to llsd_equals() to permit comparing embedded Real values using is_approx_equal_fraction() rather than strictly bitwise. Omitting bits= retains current bitwise-comparison behavior.
2011-01-31HACK just to get the build to work. FIX THIS TEST!Alain Linden
2011-01-28Extend LLEventAPI to directly call other functions & methods.Nat Goodspeed
Until now, LLEventAPI has only been able to register functions specifically accepting(const LLSD&). Typically you add a wrapper method to your LLEventAPI subclass, register that, have it extract desired params from the incoming LLSD and then call the actual function of interest. With help from Alain, added new LLEventAPI::add() methods capable of registering functions/methods with arbitrary parameter signatures. The code uses boost::fusion magic to implicitly match incoming LLSD arguments to the function's formal parameter list, bypassing the need for an explicit helper method. New add() methods caused an ambiguity with a previous convenience overload. Removed that overload and fixed the one existing usage. Replaced LLEventDispatcher::get() with try_call() -- it's no longer easy to return a Callable for caller to call directly. But the one known use of that feature simply used it to avoid fatal LL_ERRS on unknown function-name string, hence the try_call() approach actually addresses that case more directly. Added indra/common/lleventdispatcher_test.cpp to exercise new functionality.
2011-01-28Introduce LLSDArray, LLSDMap, LLSDParam.Nat Goodspeed
LLSDArray is a helper to construct an LLSD::Array value inline. LLSDMap is a helper to construct an LLSD::Map value inline. LLSDParam is a customization point, a way for generic code to support unforseen parameter types as conversion targets for LLSD values.
2011-01-28trivial: convert to "unix return"Xiaohong Bao
2011-01-26add "pause" function for SH-846: design and implement the debug code to ↵Xiaohong Bao
locate memory leaking
2011-01-26for SH-846: design and implement the debug code to locate memory leakingXiaohong Bao
2011-01-21Automated merge up from viewer-developmentLoren Shih
2011-01-19pull changes back from betaOz Linden
2011-01-15renamed temp name flag member in name cache to avoid confusion with similar ↵Oz Linden
names in other classes
2011-01-14Automated merge up from viewer-developmentLoren Shih
2011-01-10Automated merge up from viewer-developmentLoren Shih
2011-01-10Automated merge from mesh-developmentLoren Shih
2011-01-07expose << operator for LLMD5 objects in LL_COMMON_APIBrad Payne (Vir Linden)
2011-01-07Merge from viewer-developmentDon Kjer
2011-01-07increment minor revision number to make version "2.6.0"Oz Linden
2011-01-06BUILDFIX: fixing linux build breakageNyx (Neal Orman)
cleaning up a bit of syntax that gcc is complaining about. reviewed by bao
2011-01-05mergeprep
2011-01-05mergeBrad Payne (Vir Linden)
2011-01-04trival: fix compiling errors for Linux.Xiaohong Bao
2011-01-04a debug tool to detect LLPointer issues for SH-694: check if there are any ↵Xiaohong Bao
other LLPointer issues in the mesh model uploading flow and fix them if exist. This debug tool is off by default. To turn it on, set LL_REF_COUNT_DEBUG to be 1 in the header file "llcommon/llrefcount.h".
2010-12-30STORM-955: VWR-24312: Massively duplicated objectsAleric Inglewood
Turns out that most of my SNOW-800 patch was included in Viewer 2 (albeit without crediting me). However, not everything was used and some more cleaning up was possible. After this patch, and when compiling with optimization, there are no duplicates left anymore that shouldn't be there in the first place. Apart from the debug stream iostream guard variable, there are several static variables with the same name (r, r1, r2, etc) but that indeed actually different symbol objects. Then there are a few constant POD arrays that are duplicated a hand full of times because they are accessed with a variable index (so optimizing them away is not possible). I left them like that (although defining those as extern as well would have been more consistent and not slower; in fact it would be faster theoretically because those arrays could share the same cache page then).
2010-12-29mergeBrad Payne (Vir Linden)
2010-12-29Automated merge up from viewer-developmentLoren Shih
2010-12-29allow run-time query of which timer function is being usedBrad Payne (Vir Linden)
2010-12-22Merge with viewer-developmentDon Kjer
2010-12-21Merge from trunkAndrew A. de Laix
2010-12-21Automated merge up from viewer-developmentLoren Shih
2010-12-21Automated merge from mesh-developmentLoren Shih
2010-12-20mergeBrad Payne (Vir Linden)
2010-12-20SH-682 FIX, SH-594 FIX - removed mFMP wrapper, added thread checking. Moved ↵Brad Payne (Vir Linden)
onIdle functions to llcallbacklist.
2010-12-20thread safety checkingBrad Payne (Vir Linden)
2010-12-17Merge from viewer-development post 2.4 releaseMonty Brandenberg
2010-12-17SH-682 WIP: allow DEBUG_FAST_TIMER_THREADS to work when enabledBrad Payne (Vir Linden)
2010-12-16Automated merge up from viewer-developmentLoren Shih
2010-12-15Merge from don_linden/viewer-sandboxDon Kjer
2010-12-15pulling fixes back from viewer-betaOz Linden
2010-12-14Automated merge with https://bitbucket.org/mani_linden/viewer-developmentNat Goodspeed
2010-12-14SWAT-352: when loading lleventhost, call apr_dso_error() function.Nat Goodspeed
In addition to its usual apr_sterror() function, APR defines a special function specifically for errors relating to the apr_dso_*() functions. Introduce ll_apr_warn_status() and ll_apr_assert_status() overloads accepting apr_dso_handle_t* to call apr_dso_error() as well as apr_strerror() and log its output. Use new ll_apr_warn_status() in LLAppViewer::loadEventHostModule() for apr_dso_load() and apr_dso_sym() calls. Instead of shorthand ll_apr_assert_status(), use with llassert_always() so check is still performed even in Release build. Add more lleventhost-related debugging output, e.g. full pathname of the DLL. On Mac and Linux, call 'file' command to report nature of the DLL too.
2010-12-14Mergebrad kittenbrink
2010-12-13permit flush when disabled.Andrew A. de Laix
2010-12-13Merge from viewer-developmentDon Kjer
2010-12-13Automated merge up from viewer-developmentLoren Shih
2010-12-10Automated merge with https://bitbucket.org/mani_linden/viewer-development/Andrew A. de Laix
2010-12-10fix possible crash on shutdown in event queue flush.Andrew A. de Laix
2010-12-10fix working directory in install script and remove dependency on open option ↵Andrew A. de Laix
--args which is 10.6 only. Also fix erroneous check in process launcher which was mistakenly reporting a failed execution of the new updater script.