Commit graph

167 commits

Author SHA1 Message Date
wolfbeast
3567db7ccc Code style improvements (no bug). 2019-02-16 00:16:18 +08:00
wolfbeast
f592b614d0 Improve graph edge resolution code.
This is a follow-up to ca7ecd37c94e268972697a37eec4e46771c6e6f2 further improving the DiD resolution for CVE-2018-12386.
2019-02-16 00:16:16 +08:00
wolfbeast
3757eafab3 Bug 1493900.
DiD fix.
2019-02-16 00:15:07 +08:00
trav90
7ccaa52ace Rename TypeSet::clone to TypeSet::cloneIntoUninitialized to indicate that it freshly initializes the TemporaryTypeSet* provided to it.
Also removes existing code that, quite unnecessarily, partly initialized that argument.
2019-02-16 00:14:12 +08:00
trav90
74983ef77e Don't use PodCopy/PodMove to implement typed-array element-to-element copying
Standard std::copy and std::copy_n are readily optimized to the same thing, and they don't have a non-obvious requirement that the type being copied be trivial.
2019-02-16 00:14:10 +08:00
trav90
3bfbbf5d40 Give uint8_clamped a defaulted (and also trivial) default constructor, copy constructor, and copy-assignment operator.
This also allows uint8_clamped to be permissibly memmove'd and memcpy'd.
2019-02-16 00:14:09 +08:00
trav90
4b23aec47e Don't memset-zero the BacktrackingAllocator::vregs array of non-trivial VirtualRegister instances 2019-02-16 00:13:50 +08:00
trav90
4d089648be Call memset on a void*, not a T*, in js_delete_poison to avoid memset-on-nontrivial warnings with gcc that don't matter for an object whose lifetime is about to end 2019-02-16 00:13:48 +08:00
trav90
fbef1917ad Initialize some asm.js structures using in-class initializers instead of PodZero 2019-02-16 00:13:46 +08:00
trav90
02e07860b2 Stop using PodZero in several places to initialize values of non-trivial type 2019-02-16 00:13:45 +08:00
trav90
fc1e50d7e9 Fix build bustage 2019-02-16 00:13:01 +08:00
trav90
78d0ec7fc9 Call the relevant scope-data constructor when allocating it, and poison/mark as undefined the memory for the trailing array of BindingNames, ratther than impermissibly PodZero-ing non-trivial classes. 2019-02-16 00:12:59 +08:00
trav90
4cbf54089a Convert the trailing array of BindingNames at the end of the various kinds of scope data into raw unsigned chars into which those BindingNames are placement-new'd, rather than memcpy-ing non-trivial classes around and failing to comply with the C++ object model 2019-02-16 00:12:57 +08:00
wolfbeast
8c8145e620 Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables).
Stub resolution/removal should be a follow-up to this.
2019-02-16 00:12:32 +08:00
wolfbeast
ac3468d5cc Add extra check for assembler buffer space. 2019-02-16 00:12:29 +08:00
wolfbeast
36a9805617 Revert "Bug 1444668 - Avoid allocating large AssemblerBuffers. r=luke, r=bbouvier, a=RyanVM"
This reverts commit 9472136272f01b858412f2d9d7854d2daa82496f.
2019-02-16 00:12:16 +08:00
trav90
2fabd9fa1b Avoid using memset on a not-trivial type like ServoSizes 2019-02-16 00:11:36 +08:00
trav90
37959f9945 Avoid using memset on a not-trivial type like TabSizes 2019-02-16 00:11:35 +08:00
trav90
6b97ee8cab Avoid doing a memset on a non-POD structure
|entryCount| tracks -- in fast-to-check manner -- the number of entries in the hashtable.  But to actually enumerate entries, we have to loop through all of |table|, checking for entries that are actually live.  A live entry is indicated by a zero |hash| in the entry.  The |memset| would properly zero that; removing the memset will not.

It's not entirely clear whether a memset that overwrites a lot of stuff but is maybe simpler, is faster than compiler-generated likely-SIMD code that zeroes out *just* |hash| fields in all the entries.  But I am going to guess that SIMD is good enough.  For now, we should just do the simple and thing: don't distinguish POD and non-POD, and know that the compiler is going to recognize that |mem.addr()->~T()| is a no-op when T is trivial.  So with POD, the loop should degenerate to just zeroing |hash| at consistent offset, and SIMD will eat that up, and it can't be *that* different from the memset in performance (if it is at all).
2019-02-16 00:11:33 +08:00
trav90
4f91b109d0 Simplify HeapSlot to make it trivially copyable
This removes the constructors, which were never called since we allocate arrays of HeapSlot with pod_malloc. The destructor is only ever called explicitly since we free this memory with js_free so it has been renamed to destroy(). Also removed is an unused manual barrier.
2019-02-16 00:11:06 +08:00
trav90
413f205479 Avoid using memcpy on HeapSlot that is not trivially copyable. 2019-02-16 00:11:05 +08:00
trav90
6fe56d9f39 js::atomics_wait: Remove unnecessary parentheses in declaration of 'addr'
Silences a warning with GCC 8.
2019-02-16 00:10:55 +08:00
janekptacijarabaci
d57aa4fc94 Fix Build Bustage - with "--enable-debug" 2019-02-16 00:08:38 +08:00
wolfbeast
2a6262ee6d Remove recover instruction results after bailouts. 2019-02-16 00:08:29 +08:00
wolfbeast
e9342c1ad5 Issue #578: Applications cannot start without /proc (chroot).
UXP uses the current stack frame address and the stack size
as a sort of heuristic for various things in the JavaScript
engine.  The js::GetNativeStackBaseImpl() function is used to
get the base stack address (i.e. the address from which the stack
grows, so this can be either the first or last memory address of
the stack memory space depending on the CPU architecture).

On Linux, this function is implemented using the pthreads APIs.
For non-main threads, the queried thread info is stored in
memory.  The main thread does not have this information on hand,
so it gets the stack memory range via the /proc/self/maps file
(see glibc's pthread_get_attr_np.c).

Fortunately (per discussions with the firefox devs in #jsapi)
the base address only needs to be approximate.  In reality,
environment variables, args, and other things are stored in
stack space between the end/beginning of the mapped stack
memory and the 'top' of the stack space used by stack frames.

When using glibc, we can get the top of this usable stack from
__libc_stack_end, which is a void* set by glibc during program
initialization, avoiding the need to access /proc.
Non-main threads still get their stack-base through the usual
pthreads APIs.
Other libc implementations like musl will fall back to the
standard UNIX-like implementation which calls pthread's
pthread_attr_getstack() also from the main thread, which
may imply /proc access and not work in restricted
environments.
2019-02-16 00:06:45 +08:00
Nicolas B. Pierron
0c1ca8a865 Bug 1464829 - Ensure the recover instruction vector has the expected size. 2019-02-16 00:01:56 +08:00
Jon Coppeard
89e332cfec Bug 1465108 - Use function pointers rather than virtual run method for GC parallel tasks r=sfink a=abillings a=RyanVM 2019-02-16 00:01:53 +08:00
wolfbeast
9ca1242630 Fix count of compacting update tasks started. 2019-02-16 00:01:51 +08:00
wolfbeast
591dc9ea93 Reinstate string.prototype.contains()
This adds a compatibility function aliased to string.prototype.includes().
2019-02-16 00:01:40 +08:00
wolfbeast
0795e50d87 Refactor structured clone JSAPI to prevent mismatched scopes.
Roll-up of bugs 1442722, 1455071, 1433642, 1456604 and 1458320.
2019-02-16 00:01:32 +08:00
wolfbeast
8f16d02c34 Change inlining of intrinsics. 2019-02-16 00:01:15 +08:00
André Bargull
dca3b936bf Update tzdata in ICU data files to 2018e. 2019-02-16 00:01:13 +08:00
Gaming4JC
d4ac94cf3e Remove support and tests for HSTS priming from the tree. Fixes #384 2019-02-15 23:59:39 +08:00
wolfbeast
1a823f5ad6 Remove SPS profiler.
- Conditionals and code blocks. (MOZ_ENABLE_PROFILER_SPS)
- Stub out several profiler-only functions.
2019-02-15 23:58:37 +08:00
wolfbeast
e3e1be66db Make InitRuntimeNumberState's return type reflect its infallible nature. 2019-02-15 23:56:18 +08:00
wolfbeast
8e9e42c7d8 Issue #325 Part 14: Remove EXPOSE_INTL_API conditionals. 2019-02-15 23:56:17 +08:00
wolfbeast
d1c16b1326 Issue #325 Part 5: Remove non-Intl legacy code paths from js. 2019-02-15 23:56:03 +08:00
JustOff
401655260c Fix regex escaping in old-configure and js/src/old-configure 2019-02-15 23:55:50 +08:00
wolfbeast
48c807d319 Remove unused XREShellData 2019-02-15 23:55:44 +08:00
wolfbeast
c8462db202 Remove sandbox ductwork conditional code. 2019-02-15 23:55:41 +08:00
janekptacijarabaci
c4dabac726 [regression] [follow up] Error: No such property on self-hosted object: "Intl_getDisplayNames"
Issue #162 and #264
2019-02-15 23:54:10 +08:00
Jeff Walden
48ffdb584c Bug 1452619 - Implement mozilla::IsAsciiAlpha. r=froydnj, a=lizzard 2019-02-15 23:53:19 +08:00
wolfbeast
66bf4fa8f9 Bug 1411415. 2019-02-15 23:53:18 +08:00
wolfbeast
8ffcc15d3f Move --enable-tests out of Python configure and flip the default. 2019-02-15 23:53:16 +08:00
wolfbeast
d804882857 Remove jemalloc 4 from our tree. 2019-02-15 23:52:10 +08:00
wolfbeast
797ca533f9 Remove support for making jemalloc4 the default memory allocator. 2019-02-15 23:52:09 +08:00
wolfbeast
8ee79282f8 Avoid calling slice in self-hosted code. DiD
This time without unrelated/incomplete pluralforms junk.
2019-02-15 23:50:23 +08:00
wolfbeast
7e93e7170f Revert "Add pluralrules to JS Intl"
This reverts commit 7686bceecff17f91758c8c6547a78e71ff3a8c38.
2019-02-15 23:50:22 +08:00
wolfbeast
51510273b0 Remove build support for HP-UX
Note: 3rd party lib support (NSS, etc.) has not been touched.
2019-02-15 23:50:07 +08:00
Jan de Mooij
52269fa01a Bug 1444668 - Avoid allocating large AssemblerBuffers. r=luke, r=bbouvier, a=RyanVM 2019-02-15 23:47:22 +08:00