Commit graph

83 commits

Author SHA1 Message Date
wolfbeast
aa89a14709 Remove Unboxed Object code from /vm, Part 3. 2019-06-28 20:11:10 +08:00
wolfbeast
3e1ffa6cf6 Remove Unboxed Object code from jit, Part 2. 2019-06-28 20:10:58 +08:00
wolfbeast
bd6c34b56a Revert "Remove JSOP_SPREADCALLARRAY and just use JSOP_NEWARRAY again."
This reverts commit 912c3f5cbc512557794a3dfd7bc5cb4994413dfe.
2019-06-28 20:10:21 +08:00
wolfbeast
a6bb928fa4 Remove JSOP_SPREADCALLARRAY and just use JSOP_NEWARRAY again. 2019-06-19 21:34:38 +08:00
wolfbeast
1d499496a2 Update comment 2019-06-19 21:34:36 +08:00
wolfbeast
90bb3e7f1d Remove and clean up more code. 2019-06-19 21:34:34 +08:00
wolfbeast
c6c456b12b Replace SetOrExtendBoxedOrUnboxedDenseElements with direct calls. 2019-06-19 21:34:33 +08:00
wolfbeast
79dfc644d3 Clean up and rename MoveBoxedOrUnboxedDenseElements. 2019-06-19 21:34:31 +08:00
wolfbeast
ec0e78d127 Convert CopyBoxedOrUnboxedDenseElements to something that doesn't crash. 2019-06-19 21:34:29 +08:00
wolfbeast
18166cf949 Remove functors for array natives. 2019-06-19 21:34:26 +08:00
wolfbeast
ea2349157d Remove unboxed array context option and shell flag. 2019-06-19 21:34:25 +08:00
wolfbeast
87f3c86484 Make use of ArrayObjects in favor of generic JS objects.
ArrayObjects has been a thing for years but been under-used. About time
they are used where prudent.
2019-06-19 21:34:21 +08:00
wolfbeast
1176a9ace1 Inline combined methods for NativeObject and UnboxedArrayObject accesses. 2019-06-19 21:34:19 +08:00
wolfbeast
54b6b407a9 Remove UnboxedArray code part 2 2019-06-19 21:34:02 +08:00
wolfbeast
f5923f0626 Add Atomics.notify instead of Atomics.wake according to revised spec.
- Keep .wake as an alias until we're certain it can be removed.
- Enable SAB memory
2019-06-15 06:27:46 +08:00
wolfbeast
2db998a4f8 Remove Unboxed Objects from vm/ - Part 2 2019-05-24 21:56:16 +08:00
wolfbeast
cc936df2e5 Remove unboxed object code from jit, Part 1 2019-05-24 21:56:13 +08:00
wolfbeast
37315e4898 Remove Unboxed Objects from vm/ Part 1 + fix deprot 2019-05-24 21:56:09 +08:00
wolfbeast
fb23522087 Remove initial chunk of Unboxed Objects machinery part 2 2019-05-24 21:55:50 +08:00
wolfbeast
7b0eb7be8c remove unboxed code chunk (wip1) 2019-05-24 21:55:45 +08:00
wolfbeast
3538814b92 Implement array.flat and array.flatMap
Self-hosted implementation that adds both functions and adds them to
@@unscopables as specced in ES2019.
Resolves #1095
2019-05-24 21:54:58 +08:00
wolfbeast
dee48511aa Implement String.prototype.trimStart and trimEnd.
This renames our internal function names because *Left and *Right might
be deprecated and have to be removed later, making that trivial.
Resolves #1089
2019-05-17 22:17:20 +08:00
wolfbeast
78d61fd2b1 Issue #187: Remove solaris conditional code. 2019-04-04 20:26:26 +08:00
adeshkp
f922e8ae0e Remove a couple of unused variables 2019-03-16 07:04:13 +08:00
wolfbeast
becadd3588 Align instanceof with the final ES6 spec. 2019-02-16 00:28:03 +08:00
adeshkp
521c918660 Remove telemetry leftovers from JS engine. 2019-02-16 00:27:38 +08:00
David Teller
7d0bef1093 Reduce number of allocations in AutoStopwatch
This patch fixes two related issues.
1. The AutoStopwatch uses a stack-allocated `mozilla::Vector` to
communicate with its callback during each compartment switch.
This vector was designed to allow its contents to be stack-allocated
but they turned out to be accidentally heap-allocated.

2. During each tick, the stopwatch fills a vector `recentGroups_`.
This vector always started with minimal capacity and had to grow
repeatedly as groups were added, causing repeated reallocations.
This patch preallocates `recentGroups_` to have the same capacity as the
previous tick. We expect that this should eventually reach a stable size
that closely matches the actual needs of the process.
2019-02-16 00:27:30 +08:00
wolfbeast
dce38e8d76 Revert "Reduce number of allocations in AutoStopwatch"
This reverts commit 3476c1d60ec29c5497123194acd7a9310b1023d2.
2019-02-16 00:27:29 +08:00
David Teller
059aeea416 Reduce number of allocations in AutoStopwatch
This patch fixes two related issues.
1. The AutoStopwatch uses a stack-allocated `mozilla::Vector` to
communicate with its callback during each compartment switch.
This vector was designed to allow its contents to be stack-allocated
but they turned out to be accidentally heap-allocated.

2. During each tick, the stopwatch fills a vector `recentGroups_`.
This vector always started with minimal capacity and had to grow
repeatedly as groups were added, causing repeated reallocations.
This patch preallocates `recentGroups_` to have the same capacity as the
previous tick. We expect that this should eventually reach a stable size
that closely matches the actual needs of the process.
2019-02-16 00:27:28 +08:00
adeshkp
aea50f182f Telemetry: Remove stubs and related code 2019-02-16 00:24:04 +08:00
wolfbeast
518106945b Use canonical function in TypeNewScript::rollbackPartiallyInitializedObjects. 2019-02-16 00:22:06 +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
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
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
janekptacijarabaci
d57aa4fc94 Fix Build Bustage - with "--enable-debug" 2019-02-16 00:08:38 +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
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
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
janekptacijarabaci
5381ebe25c Bug 1287677 - Add mozIntl.getDisplayNames API 2019-02-15 23:44:41 +08:00
trav90
10b24b8110 Fix Value::isGCThing footgun, stop returning true for NullValue 2019-02-15 23:41:26 +08:00
janekptacijarabaci
ac07311b18 Bug 1357075 - Pad a nop to unwind to the scope just before a destructuring iterator close trynote
Issue #74
2019-02-15 23:39:34 +08:00