Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson d126c3c24f Bug 1063962 - Replace jschar typedef with C++11 char16_t type. r=jandem 2014-07-21 21:43:21 -07:00
Jason Orendorff 26bdfdcc2f 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
Jason Orendorff 64a2896773 Bug 645416, part 2 - Add support for symbols to JS::Value. r=luke.
The API for symbol Values is much like the API for strings.

The implementation behind all this is in a later patch. Here, a class
JS::Symbol is declared, but not defined anywhere yet.

The constants being deleted from js/public/Value.h probably haven't been used
since Tracemonkey days.

--HG--
extra : rebase_source : 5b2d0cc4d99223483e850ee80913eef3854c427c
2014-06-23 10:55:51 -05:00
Bill McCloskey a144caadb7 Bug 1017302 - Expose add-on IDs to JS engine (r=bholley) 2014-06-21 11:54:22 -07:00
Jan de Mooij ce729bb6e9 Bug 1018243 - Use unsigned char instead of char for latin1 strings. r=luke 2014-05-31 10:44:32 +02:00
Sean Stangl e4de4469c3 Bug 948638 - Always use jsid struct types. r=Waldo 2013-12-10 15:45:41 -08:00
Sean Stangl 33cecd91b2 Bug 939505 - Use JS_DEBUG in public headers. r=jorendorff 2013-12-06 15:03:08 -08:00
Jim Blandy e2f0547581 Bug 892643: Implement PersistentRooted<T>, an unrestricted-lifetime rooting type. r=terrence, jcoppeard 2013-11-04 13:35:08 -08:00
Ehsan Akhgari b7d148db05 Bug 895047 - Make char16_t available everywhere and use that to define PRUnichar and jschar; r=jcranmer,jorendorff,glandium 2013-10-17 00:36:13 -04:00
Phil Ringnalda b808ef7069 Back out ee100983f921 (bug 895047) for build bustage
CLOSED TREE
2013-10-16 21:51:55 -07:00
Ehsan Akhgari 5582e7b472 Bug 895047 - Make char16_t available everywhere and use that to define PRUnichar and jschar; r=jcranmer,jorendorff,glandium 2013-10-17 00:36:13 -04:00
Nicholas Nethercote 01c70c8c97 Bug 911020 - Introduce js/TypeDecls.h, which holds very commonly used type declarations from the JS engine. r=luke.
--HG--
extra : rebase_source : 008ef689989f93b46627b8be8608bdbc544ca3a2
2013-08-27 19:59:14 -07:00