gecko/xpcom/base
Jason Orendorff 0bfce2ba30 Bug 645416, part 3 - Symbol layout and GC support for allocating them. r=terrence.
Layout: js/src/vm/Symbol.h defines the new class JS::Symbol. JS::Symbol is the
same size as JSString on all platforms, because the allocator does not support
smaller allocations.

Allocation: Since the purpose of symbols is to serve as property keys, they are
always allocated in the atoms compartment.

We take a lock when allocating. This could probably be replaced with a
main-thread-only assertion. However, if atom allocation is not already a
bottleneck, symbol allocation probably never will be.

Symbols are given their own finalize-class in the GC. This means we allocate a
page per zone for symbols, even though they are only ever allocated in the
atoms zone. Terrence thought this could be easily fixed later. It should be; we
never touch the page, but a 32-bit virtual address space does not just have
infinite pages to spare.

A jsapi-test exercises the new symbol allocation code. A few oddities in
jsapi-tests are fixed in passing.

Discussion after review led to some new assertions about minimum object size in
AllocateObject and AllocateNonObject.

--HG--
extra : rebase_source : 45abb651d3b1b493d77a5dd0eb554f96b058c63a
2014-06-23 10:55:51 -05:00
..
AvailableMemoryTracker.cpp Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg. 2014-05-20 23:06:54 -07:00
AvailableMemoryTracker.h
ClearOnShutdown.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
ClearOnShutdown.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
CycleCollectedJSRuntime.cpp Bug 645416, part 3 - Symbol layout and GC support for allocating them. r=terrence. 2014-06-23 10:55:51 -05:00
CycleCollectedJSRuntime.h Bug 1026535 - Fix mismatched class/struct tags. r=ehsan 2014-06-18 17:57:51 -07:00
Debug.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
Debug.h Backed out changeset d7d447cac91b (bug 969762) for tp5 regression. 2014-02-12 06:01:29 +09:00
ErrorList.h Bug 1006485 - Part a: Rename FileHandle to MutableFile and LockedFile to FileHandle; r=bent 2014-06-12 05:35:29 +02:00
Makefile.in Bug 973142 - Get rid of the MOZILLA_INTERNAL_API makefile variable; r=glandium 2014-02-18 01:56:51 -05:00
moz.build Bug 945029 - Fix up Android's broken [u]intptr_t inttype macros. r=Waldo 2014-05-12 22:27:14 -07:00
nsAgg.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsAllocator.h Bug 106787 - Fix: Remove nsIAllocator and it's references. r=bsmedberg 2014-04-14 17:20:45 +02:00
nsAutoPtr.h Bug 1013065 - Remove bug 65664's NSCAP_DONT_PROVIDE_NONCONST_OPEQ workaround. r=dbaron 2014-05-04 23:11:04 -07:00
nsAutoRef.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsCom.h
nsConsoleMessage.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsConsoleMessage.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsConsoleService.cpp Bug 869836 - Part 3: Use Append('c') instead of AppendLiteral("c"). r=ehsan 2014-05-22 06:48:51 +03:00
nsConsoleService.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nscore.h Bug 1022420 - Disable NS_NO_VTABLE on clang-cl in order to avoid the compiler warning; r=froydnj 2014-06-09 07:57:10 -04:00
nsCrashOnException.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsCrashOnException.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsCycleCollector.cpp Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg. 2014-05-20 23:06:54 -07:00
nsCycleCollector.h Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj 2014-05-14 23:14:58 +03:00
nsDebugImpl.cpp Bug 1016631 - Cosmetic fix to use correct type for sysctl()'s 2nd argument. Also s/NULL/nullptr/ style fix in my code. r=gcp, r=vladan 2014-05-28 18:11:00 -04:00
nsDebugImpl.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsDumpUtils.cpp Bug 1015497 - Enable FifoWatcher and its consumers on every Unix. r=froydn,jld 2014-05-29 05:24:00 +02:00
nsDumpUtils.h Bug 1015497 - Enable FifoWatcher and its consumers on every Unix. r=froydn,jld 2014-05-29 05:24:00 +02:00
nsError.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsErrorAssertsC.c
nsErrorService.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsErrorService.h Bug 972605, part 3 - Make nsErrorService use a modern hash table. r=froydnj 2014-05-09 13:47:37 -07:00
nsGZFileWriter.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsGZFileWriter.h
nsIConsoleListener.idl
nsIConsoleMessage.idl
nsIConsoleService.idl
nsICycleCollectorListener.idl Bug 973090 - IPC remoting for child GC/CC logging. r=mccr8, r=bent 2014-05-13 13:13:00 -04:00
nsIDebug2.idl
nsIDebug.idl
nsIErrorService.idl Bug 978486 - Remove nsErrorService::mErrorStringBundleKeyMap. r=froydnj 2014-03-04 09:49:40 -08:00
nsIException.idl Bug 995047. Change out stack/exception APIs to hand out AString instead of AUTF8String for filename/functionname, so we end up with fewer string conversions in practice. r=smaug 2014-04-11 22:20:40 -04:00
nsIGZFileWriter.idl
nsIID.h
nsIInterfaceRequestor.idl
nsIMacUtils.idl
nsIMemory.idl
nsIMemoryInfoDumper.idl Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg. 2014-05-20 23:06:54 -07:00
nsIMemoryReporter.idl Bug 976024 - Track Unique Set Size in the Developer HUD. r=21, r=njn 2014-06-13 06:38:00 +02:00
nsIMessageLoop.idl
nsIMutable.idl
nsInterfaceRequestorAgg.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsInterfaceRequestorAgg.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsIProgrammingLanguage.idl Bug 969757 - Remove the dead code in our tree which pretends to support OS/2; r=roc,mcmanus,gps,jorendorf,bsmedberg sr=bsmedberg 2014-02-10 17:57:01 -05:00
nsISecurityConsoleMessage.idl
nsISizeOf.h
nsIStatusReporter.idl Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsISupports.idl
nsISupportsBase.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsISupportsObsolete.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsIUUIDGenerator.idl
nsIVersionComparator.idl
nsIVisualEventTracer.idl
nsIWeakReference.idl Bug 1016680, part 5 - Report the memory used by PresShell::mCaret. r=dbaron 2014-06-22 23:02:59 +01:00
nsMacUtilsImpl.cpp Bug 869836 - Part 2: Use AppendLiteral instead of Append(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:50 +03:00
nsMacUtilsImpl.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsMemoryImpl.cpp Bug 996133: Remove unnecessary NS_DISPATCH_NORMAL arguments to NS_DispatchToMainThread. r=ehsan 2014-05-23 12:53:17 -07:00
nsMemoryImpl.h Bug 1015664. Part 1: Remove NS_HIDDEN_() usage. r=bsmedberg 2014-06-03 00:08:21 +12:00
nsMemoryInfoDumper.cpp Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg. 2014-05-20 23:06:54 -07:00
nsMemoryInfoDumper.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsMemoryReporterManager.cpp Bug 976024 - Track Unique Set Size in the Developer HUD. r=21, r=njn 2014-06-13 06:38:00 +02:00
nsMemoryReporterManager.h Bug 976024 - Track Unique Set Size in the Developer HUD. r=21, r=njn 2014-06-13 06:38:00 +02:00
nsMessageLoop.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsMessageLoop.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsObjCExceptions.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsrootidl.idl Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc 2014-01-04 10:02:17 -05:00
nsSecurityConsoleMessage.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsSecurityConsoleMessage.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsSetDllDirectory.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsStackWalk.cpp Bug 1017132. Don't call printf in FramePointerStackWalk. r=dbaron 2014-06-03 15:42:10 -04:00
nsStackWalk.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsStackWalkPrivate.h
nsStatusReporterManager.cpp Bug 1015497 - Enable FifoWatcher and its consumers on every Unix. r=froydn,jld 2014-05-29 05:24:00 +02:00
nsStatusReporterManager.h Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj 2014-05-14 23:14:58 +03:00
nsSystemInfo.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsSystemInfo.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsTraceRefcnt.cpp Bug 869836 - Part 3: Use Append('c') instead of AppendLiteral("c"). r=ehsan 2014-05-22 06:48:51 +03:00
nsTraceRefcnt.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsUUIDGenerator.cpp Bug 1015547 - Fill |struct nsID| via arc4random_buf if available on Android and BSDs. r=vlad, r=glandium 2014-06-02 18:42:00 -04:00
nsUUIDGenerator.h Bug 1015547 - Prefer arc4random to generate UUIDs on BSDs. r=vlad, r=glandium 2014-06-02 18:41:00 -04:00
nsVersionComparatorImpl.cpp Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
nsVersionComparatorImpl.h
nsWeakPtr.h
nsWindowsHelpers.h Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj 2014-05-14 23:14:58 +03:00
pure_api.c
pure.h
StackWalk.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
StaticMutex.h Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj 2014-05-14 23:14:58 +03:00
StaticPtr.h Bug 995730 - Fix style violations in xpcom/base/ (part 2). r=froydnj 2014-05-14 23:14:58 +03:00
SystemMemoryReporter.cpp Bug 1011350 - Collect TaggedAnonymousMemory info in SystemMemoryReporter. r=njn 2014-06-17 17:56:00 +02:00
SystemMemoryReporter.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
VisualEventTracer.cpp Bug 869836 - Part 9: Use AssignLiteral instead of Assign(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:52 +03:00
VisualEventTracer.h Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00