Commit Graph

50 Commits

Author SHA1 Message Date
Ms2ger
66ec2d6bf5 Bug 716236 - Fix indentation in GuardObjects.h and allow its inclusion into C files; r=Waldo 2012-01-15 09:13:07 +01:00
Jeff Walden
91b680ff1c Bug 716112 - Add an optional second argument to MOZ_ASSERT to allow explanations to accompany assertions, if desired. r=cjones
--HG--
extra : rebase_source : a6be7ef89c91a58df489057ca4ea67791b6881a0
2012-01-06 15:51:27 -06:00
Michael Kohler
bf6a5aaae5 Bug 711818 - MOZILLA_GUARD_OBJECT_NOTIFIER* should use a MOZ_ prefix to follow MFBT style 2012-01-10 00:29:30 -05:00
Jeff Walden
59cc3501fc Add introductory comments to the files in mfbt/ that aren't copied from elsewhere, to facilitate easier MXR directory skimming. No bug, r=lumpy
--HG--
extra : rebase_source : dd834c64e625a0184b64d13e2a2e6fd8960ca832
2011-12-28 10:48:54 -06:00
Jeff Walden
19621b98f1 Bug 713560 - Make MOZ_STATIC_ASSERT, when it expands to C++11 static_cast(), pass its reason argument along to static_cast in more compilers. r=typo-fix 2011-12-27 12:09:41 -06:00
Jeff Walden
6fc5b5e274 Bug 712129 - Implement MOZ_STATIC_ASSERT and MOZ_STATIC_ASSERT_IF. r=luke 2011-12-19 16:58:30 -05:00
Jeff Walden
68b1495a0b Bug 712129 - Add more assertion macro flavors to mfbt, and make the JS engine use mfbt's implementations where appropriate. r=cjones
--HG--
extra : rebase_source : 6b94db05e74b18a3938a28cbc0f520eb4e01fbb0
2011-12-19 15:54:12 -05:00
Jeff Walden
bfa80a9c3c Bug 712129 - Move MOZ*INLINE macros from Util.h into Attributes.h, where they make more sense. r=luke
--HG--
extra : rebase_source : f62a21c8833c9d5eb7351b18ba14f14d4286b3c0
2011-12-19 14:45:52 -05:00
Jeff Walden
2fdb1074ab Bug 712129 - Move assertion code into a new mfbt/Assertions.h header. r=luke
--HG--
extra : rebase_source : 6587b6aa4180493c48b0663bc627543020a21deb
2011-12-19 14:28:35 -05:00
Jeff Walden
95c80127e7 Bug 711775 - Implement MOZ_NORETURN to encapsulate this-function-doesn't-return semantics. r=cjones
--HG--
extra : rebase_source : d56f3ef47e11c42b5fe6a442e13fd6202208914f
2011-12-17 16:45:29 -05:00
Jeff Walden
12a559d387 Bug 711683 - Use Clang's feature-detection macros, not its version number, for feature testing. r=cjones
--HG--
extra : rebase_source : fdf8e0bff705410a85bd4560f08b226321632bb1
2011-12-17 16:45:29 -05:00
Jeff Walden
6bb9efafe4 Bug 711672 - Break mfbt's dependency on jstypes.h by moving various API macros out of JS and into mfbt. r=luke, r=cjones
--HG--
extra : rebase_source : f18993e1eec1a5e5bcdb9cd97fa7d7c6ad261e2c
2011-12-13 14:26:58 -05:00
Jeff Walden
476c7d19c5 Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin 2011-12-08 22:54:10 -05:00
Jeff Walden
461e38f5e8 Bug 704313 - Implement mozilla/StdInt.h. r=cjones
--HG--
extra : rebase_source : b221134fdfbde13a37a6ef621bba3ca183a46101
2011-11-22 17:42:57 -08:00
Jeff Walden
498c8c0db5 Bug 704313 - Import, unmodified, the Microsoft-compatible <stdint.h> implementation from the 'msinttypes' Google Code project, r26, into mfbt. r=gerv for license compatibility and the addition to toolkit/content/license.html, r=cjones for the code
--HG--
extra : rebase_source : 9e1105b916d15023a91ffcca8b26445bc1bd930d
2011-11-22 16:40:45 -08:00
Jeff Walden
528226156e Followup to bug 704127 - s/MOZ_HAVE CXX11_FINAL/MOZ_HAVE_CXX11_FINAL/ in one case (thanks to Stuart Cook in m.d.platform for noticing this, I have *no* *idea* how he managed it, Luke had to have me point it out to even see the change in the diff), and actually define it for -std=c++0x GCC (a mistaken omission originally). rs=luke
--HG--
extra : rebase_source : 2187e3b4a133c898cf6b1fcb3dd92226c70e2082
2011-12-01 18:21:27 -08:00
Jeff Walden
ae17ec2da9 Bug 704127 - Implement MOZ_FINAL as a modifier for classes and virtual member functions. r=cjones
--HG--
extra : rebase_source : d95a3b3e726f810f299314358ba8c5e23557698e
2011-11-20 22:21:16 -08:00
Jeff Walden
f559a0708c Bug 704127 - Move C++ attribute support out of mozilla/Types.h and into mozilla/Attributes.h so that it can be used by code that's not yet compatible with the full mfbt experience. r=cjones
--HG--
extra : rebase_source : 7b653358a73f222c055f5139e33ca470475f88c9
2011-11-20 12:22:51 -08:00
Joe Drew
aae5fce5be Bug 702799 - Don't modify a RefPtr when using the implicit conversion to TemporaryRef. r=cjones 2011-11-21 16:42:07 -05:00
Ed Morley
0d4271ee17 Merge last green changeset of mozilla-inbound to mozilla-central 2011-11-16 11:02:43 +00:00
Ms2ger
6622e2e115 Bug 672796 - Move MOZILLA_GUARD_OBJECT_NOTIFIER_* out of AutoRestore.h; r=khuey 2011-11-16 08:50:19 +01:00
Jeff Walden
9c21acc93a Change preprocessor-directive indentation to be two-space, not one-space. rs=cjones in bug 702437 2011-11-15 22:26:55 -08:00
Jeff Walden
3a9bae8669 Bug 702437 - Implement MOZ_OVERRIDE to encapsulate support for the contextual override keyword on virtual member functions. r=cjones 2011-11-14 10:31:46 -08:00
Jeff Walden
08bcb814aa Very slight comment tweak for the compile-to-nothing case for defining MOZ_DELETE. No bug, r=sparky
--HG--
extra : rebase_source : 3a5f731e646e1367403ae7c8ae7715e74faa2b8b
2011-11-10 21:49:51 -08:00
Jeff Walden
d0edb425f5 Bug 701183 - Make MOZ_DELETE use deleted function syntax in gcc when it's possible to do so without causing a warning. r=cjones
--HG--
extra : rebase_source : 6f452c9cc9dcdc772991ee1056975bf7b0b4bb5b
2011-11-10 14:19:28 -08:00
Jeff Walden
9732b0dd63 Bug 700910 - Implement MOZ_DELETE to encapsulate C++11 = delete syntax. r=cjones
--HG--
extra : rebase_source : 0fc4bc154923c84fd91e52be99fdac78f7c6dbc4
2011-11-08 19:19:44 -08:00
Jeff Walden
b7753477cf Bug 693469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. (Exceptions: assigning to static initializers, use in static assertions, as template parameters, etc. These will go away when the relevant compilers have C++11 constexpr support.) r=cjones
--HG--
extra : rebase_source : b4bae9a0f85abf2feb828609b50e756916b99a6f
2011-10-10 22:50:08 -07:00
Chris Leary
0d6adcf81f Bug 693928: Fix random orange from LifoAlloc debug memset. (r=luke)
--HG--
extra : rebase_source : 314ebeb6364ad0bb45baa6b7d7f09b9603e47b27
2011-10-12 15:32:40 -07:00
Jeff Walden
eb2cb918a4 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden
77ebbde4ab Bug 639469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. r=cjones
--HG--
extra : rebase_source : 860a8271bf7e51cde358f2a4185c410de1fc2960
2011-10-10 22:50:08 -07:00
Justin Lebar
16aac235d7 Bug 689433 - Followup. Remove unused MOZ_STATIC_ASSERT macro. r=roc 2011-10-06 17:51:24 -04:00
Justin Lebar
83e3821db7 Bug 689433 - Align nsAutoTArray<E> to E's natural alignment. r=roc
--HG--
extra : rebase_source : f7062f251f6905a58145ed6d94680f076dabbef7
2011-10-05 09:11:17 -04:00
Chris Leary
14bc4cf54d Bug 684039: rewrite JS LIFO allocator, avoids thrashing. (r=luke)
--HG--
rename : js/src/jsarena.h => js/src/ds/LifoAlloc.h
extra : rebase_source : 098bf9561114f82363ebd0862213acf952709257
2011-09-22 13:22:30 -07:00
Terrence Cole
8dfb9edbc9 Bug: 685041 - convert #ifdef DEBUG vars in jsgc.cpp to DebugOnly; r=luke
This adds operation++ and operator-- to DebugOnly in support of the two uses
cleaned up here.
2011-09-07 11:32:35 -07:00
Terrence Cole
9e219e8b92 Bug 646597 - Remove unneeded #ifdef DEBUG: use DebugOnly instead; r=bhackett
Assignment to a DebugOnly variable results in a call to either the empty
'operator =' or to an empty implicit 1-arg constructor and empty copy
constructor when in non-debug mode.  Either of these get inlined and
eliminated as dead code above -00, so there is no benefit to skipping
this assignment for non-debug builds.
2011-09-04 13:58:00 +01:00
Chris Leary
31076ac1d6 Merge mozilla-central and tracemonkey. 2011-06-27 11:07:22 -07:00
Chris Leary
0780a149be Bug 649576: Extricate JSHashTable from JSAtomList death grip. (r=luke) 2011-06-24 14:22:30 -07:00
Chris Leary
7922cf2289 Merge mozilla central and tracemonkey. 2011-06-20 16:49:20 -07:00
Ehsan Akhgari
14a79314b1 Bug 662971 - Silence the clang warnings issued because of alignment requirements increase when compiling mfbt/Util.h; r=Waldo
--HG--
extra : rebase_source : a2bb6f588674602993c6603abda01487b72b6923
2011-06-17 15:59:47 -04:00
Bas Schouten
c58b307338 Followup to bug 661973: Fix bug with COM outparams and add convenience operators. r=cjones 2011-06-21 21:44:00 -07:00
Jeff Walden
077f90dc40 Add a RangedPtr constructor accepting an array as a shorthand for RangedPtr(arr, N). rs=luke 2011-06-07 13:25:36 -07:00
Jeff Walden
87ccff3aa5 Bug 662001 - Move js::RangeCheckedPointer<T> to mozilla::RangedPtr<T>, make it no longer implicitly convert to T*, and adjust users accordingly. r=cjones 2011-06-06 11:02:34 -07:00
David Mandelin
2299c54162 Bug 656282: Remove redundant declaration that causes an MSVC warning, r=luke
--HG--
extra : rebase_source : 42c6e9594f36fd7320bdea90fdb01c955bf07f4d
2011-05-16 16:17:19 -07:00
Jeff Walden
ac8938a32d Bug 656059 - Add operator-> to mozilla::DebugOnly<T> so it can store pointers. r=cjones
--HG--
extra : rebase_source : 3d7aeec93f1ae1e5bbd4b03c30216e70fe15eb6a
2011-05-10 14:56:49 -07:00
Chris Jones
b4c5b0ece8 Bug 661973: Implement mozilla::RefCounted, RefPtr, TemporaryRef, OutParamRef, and byRef. r=Bas,luke sr=roc 2011-06-16 20:40:20 -07:00
Daniel Holbert
582e13726b Bug 654346: Fix C++-style comments in mfbt headers included by .c files, to fix build warnings. r=cjones comment-only=DONTBUILD 2011-05-03 10:24:01 -07:00
Chris Jones
a61c26e2c0 Bug 642381, part 3: Hoist Maybe into mfbt and eliminate Gecko's use of jstl. r=jorendorff,luke 2011-04-28 17:48:52 -05:00
Chris Jones
ea1f5e599c Bug 647011: Sprinkle some DebugOnly in js/src. r=luke 2011-04-20 18:27:30 -05:00
Chris Jones
9520dec9fe Bug 577899, part 2: Add a DebugOnly helper to mfbt, which only contains a value in debug builds. r=luke 2011-03-31 20:46:35 -05:00
Chris Jones
02c5d89688 Bug 577899, part 1: Add mfbt, to contain code shared between SpiderMonkey and Gecko. r=luke,ted sr=brendan,bsmedberg,roc 2011-03-31 20:46:35 -05:00