Commit graph

66 commits

Author SHA1 Message Date
Brian Smith
36285d0405 Issue #2304 - Part 3 - Implement the error cause proposal. https://bugzilla.mozilla.org/show_bug.cgi?id=1679653 2026-03-11 18:07:01 +00:00
Brian Smith
64dc722b28 Issue #2304 - Part 2 - Prerequisite: Teach GCPolicy about Maybe. https://bugzilla.mozilla.org/show_bug.cgi?id=1377008 2026-03-11 18:06:41 +00:00
Brian Smith
3c9bbc9665 Issue #2304 - Part 1 - Prerequisite: Make Handle<Maybe<>> more convenient. This is required to implement JS::NothingHandleValue. https://bugzilla.mozilla.org/show_bug.cgi?id=1631114 2026-03-11 18:01:01 +00:00
Moonchild
5fd304507d Issue #2692 - Part 7: De-globalize {*}CompileOptions.
Make all users of the various *CompileOptions classes #include "js/CompileOptions.h"
so that nothing but that file has to know about these classes having a
JS_PUBLIC_API on them, that would have to be present in forward-declarations.
2025-03-13 23:03:43 +08:00
Moonchild
40ed1b10f4 Issue #2692 - Part 5: Split out compilation and evaluation APIs into its own header. 2025-03-13 22:59:38 +08:00
Moonchild
307621db50 Issue #2692 - Part 4: Split out off-thread compilation API to its own header. 2025-03-13 22:59:23 +08:00
Moonchild
eca185aa79 Issue #2692 - Part 3: Split out JS compiled script transcoding to its own header. 2025-03-13 22:59:08 +08:00
Moonchild
565fb4b05a Issue #2692 - Part 2: Split out JS SourceBufferHolder to its own header. 2025-03-13 22:58:50 +08:00
Moonchild
9436bfa175 Issue #2692 - Part 1: Split out JS CompileOptions to its own header. 2025-03-13 22:58:36 +08:00
Steve Fink
9a6e3bc30d [js] Disallow deserializing structured clone buffers with transferables more than once. 2024-10-03 14:35:12 +08:00
Brian Smith
5b068f3726 Issue #2402 - CSP Violation events should have the correct sample for inline contexts. https://bugzilla.mozilla.org/show_bug.cgi?id=1473587 Add preference to increase max length of CSP report source sample. https://bugzilla.mozilla.org/show_bug.cgi?id=1415352 Return valid columnNumber value in CSP violation events. https://bugzilla.mozilla.org/show_bug.cgi?id=1418246 2024-01-11 09:50:12 +08:00
Brian Smith
9b9075eef6 Issue #1442 - Part 4: Add JSAPI functions for working with ReadableStream. https://bugzilla.mozilla.org/show_bug.cgi?id=1272697 2023-10-04 09:53:45 +08:00
Brian Smith
e12e377e51 Issue #2308 & #1240 Follow-up - Add BigInt support to JSOP_INC and JSOP_DEC. https://bugzilla.mozilla.org/show_bug.cgi?id=1526309 2023-09-20 09:29:18 +08:00
Brian Smith
d972016c23 Issue #2026 - Part 2a - Support BigInt in NumberFormat and toLocaleString. https://bugzilla.mozilla.org/show_bug.cgi?id=1543677 2023-07-29 23:38:30 +08:00
Brian Smith
b64643e410 Issue #2026 - Part 1 - Implement BigInt64 and BigUint64Array. https://bugzilla.mozilla.org/show_bug.cgi?id=1456569 2023-07-29 23:38:09 +08:00
Brian Smith
7a30b0fa2d Issue #1240 - Part 8 - Fix incorrect asserts with debug enabled. Fix BigInt errors in remainder operations https://bugzilla.mozilla.org/show_bug.cgi?id=1524136 Also fix 2 debug asserts in fallthroughs due to missing BigInt cases. 2023-07-25 09:14:42 +08:00
Brian Smith
dc23241afb Issue #1240 - Part 4 - Implement parser support for BigInt literals. https://bugzilla.mozilla.org/show_bug.cgi?id=1505849 Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1456568 Un-result-ified the BigInt XDR code, so we can enable it. https://bugzilla.mozilla.org/show_bug.cgi?id=1419094 Uninitialised memory read with BigInt right-shift https://bugzilla.mozilla.org/show_bug.cgi?id=1679003 2023-07-25 09:09:57 +08:00
Brian Smith
d42d5ce138 Issue #1240 - Part 3b - Implement WrappingOperations.h for wraparound math operations & conversions. https://bugzilla.mozilla.org/show_bug.cgi?id=1441657 Implement mozilla::WrappingMultiply. Prerequisite for our V8 fast forward. 2023-07-25 09:08:56 +08:00
Brian Smith
ddd49121a6 Issue #1240 - Part 3a - Adjust mozilla::FloatingPoint<T>'s definition. So only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. https://bugzilla.mozilla.org/show_bug.cgi?id=1508725 Prerequisite for our V8 fast forward. 2023-07-25 09:08:39 +08:00
Brian Smith
13ac0d6483 Issue #1240 - Part 2 - Define the BigIntObject class for BigInt wrapper objects. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 3. In our Part 3 we will fast forward to the V8 implementation skipping GMP. 2023-07-25 09:08:22 +08:00
Brian Smith
f041afc61d Issue #1240 - Part 1 - Define a new BigInt primitive type. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 1.0. However leaving out the --enable-bigint changes. 2023-07-25 09:08:03 +08:00
Brian Smith
2c0384c4a2 Issue #2255 & #1240 - Simplify and enhance Maybe and Some(). https://bugzilla.mozilla.org/show_bug.cgi?id=1325351 This is a prerequisite for our BigInt V8 fast forward and potential #2255 fix. 2023-07-06 10:24:34 +08:00
Moonchild
f9c39acaa6 Issue #1656 - Follow-up: Re-nuke the vim lines introduced in #2265 2023-07-03 15:12:01 +08:00
Martok
c10a29d96f Issue #1819 - Implement Intl.Locale proposal
This is according to spec for the mozilla71 cycle, a follow-up will further adjust to spec.

- Add Intl.Locale as native C++
- Port Unicode BCP 47 locale identifier parser to C++
- Port language tag parser to C++
- adjust make_intl_data to generate the data

Based-on: m-c 1433303, 1570370
2023-07-03 15:09:21 +08:00
Martok
30157344fe Issue #2259 - Update Intl.* Object-ness to ECMA-402, 4th edition
- turn each Intl object into a NativeObject subclass
- create them as PlainObject
- ensure correct type is passed in self-hosted code
- implement legacy constructor semantics for DateTime&NumberFormat
- store internals on object slot instead of JS WeakMap

Based-on: m-c 1328386, 1332604
2023-07-03 15:05:30 +08:00
Martok
f8f7aed528 Issue #2259 - Add JS::StackGCVector and JS::RootedVector
Based-on: m-c 1521732/{1,3}, 1527881
2023-07-03 15:03:45 +08:00
Martok
4c2e378613 Issue #2259 - Add mozilla::Result<V, E> and JS::Result<> for fallible return values
Based-on: m-c 1283562, 1277368/1, 1324828
2023-07-03 15:03:29 +08:00
Job Bautista
621868a340 Issue #2241 - Part 2: Add SameValueZero implementation to mfbt/FloatingPoint.h
Backported from Mozilla bug 1560658.

This is to prevent duplication of code while implementing DOMMatrix operations.
2023-05-15 09:09:58 +08:00
Job Bautista
ec2fb72568 Issue #2241 - Part 1: Move {js::,JS_}{{Strictly,Loosely}Equal,SameValue} into their own header and implementation files
Backported from Mozilla bug 1516742.

The .from* methods are going to depend on SameValueZero, which needs to be
visible to /dom. This patch provides the foundation for that.
2023-05-15 09:09:41 +08:00
Job Bautista
ed30a96467 Issue #62 - Fix xul.dll link bustage related to JS::ubi::DominatorTree.
This is the one I don't understand how it fixed the bustage. Why is it needed
to remove JS_PUBLIC_API..? It would seem counter-intuitive, but it wasn't...
2023-03-28 12:10:02 +08:00
Job Bautista
2c8387f4fa Issue #62 - Fix xul.dll link bustage related to MovableCellHasher.
The unsafeSet method is based on Jon Coppeard's part 2 patch for Mozilla bug
1306008. This is needed because of the use of unsafeSet in rekey() of
MovableCellHasher<JS::Heap<T>>
2023-03-28 12:09:30 +08:00
Job Bautista
d163d08cb2 Issue #2083 - Part 2: Remove use of RegExpGuard.
Based on Mozilla bug 1345177.
There were more uses of RegExpGuard in js/src/builtin/RegExp.cpp not found in
 the original bug's patch.
2023-02-01 07:36:07 +08:00
Job Bautista
3796c7c1e1 Issue #2083 - Part 1: Make RegExpShared a GC thing.
Based on Mozilla bug 1345177.
Changes from the original bug's patch:

- We don't have JS::CurrentThreadIsHeapCollecting, so let's use
  trc->runtime()->isHeapCollecting() instead.
- Mozilla bug 1337117 renamed runtimeFromMainThread to
  runtimeFromActiveCooperatingThread for Firefox 54, so let's use the former
2023-02-01 07:35:50 +08:00
Job Bautista
3e6cbc6af3 Issue #1969 - Implement Intl.RelativeTimeFormat.
Based on Mozilla bugs 1270140, 1504656, 1483545, and 1504334.
Took note of Mozilla bug 1379222 which changed GetPrototypeFromCallableConstructor
 to GetPrototypeFromBuiltinConstructor.
There are many other changes I did myself since the initial implementation by
 Mozilla wouldn't work with this codebase.
2022-07-30 08:43:43 +08:00
Martok
85af7f6e80 Issue #1952 - m-c 1383775: Clean up function toString/toSource code, remove remnants of source decompiler 2022-07-03 06:55:19 +08:00
Jeremy Andrews
e632fc1e8c Issue #1742 - Part 4: Don't trigger read barriers when comparing wrapped pointers types
This is actually an undocumented dependency of Bug 1325406 for Linux and
SunOS.

Ref: BZ 1308236
2022-05-31 09:12:45 +08:00
Moonchild
574b295d15 Issue #1742 - Part 3: use JS::PropertyResult instead of Shape*
This is the meat of the issue and switches using raw shape pointers out for
PropertyResult objects where feasible.
2022-05-31 09:12:29 +08:00
Moonchild
c48b8e8932 Issue #1742 - Part 2: Add a class to encapsulate the possible results of a property lookup 2022-05-31 09:12:25 +08:00
Moonchild
80d7d43961 Issue #1742 - Part 1: Refactor rooting base class templates
Based on Bug 1325406
2022-05-31 09:12:19 +08:00
Moonchild
d4eac725fd Issue #1877 - Resolve RELEASE_OR_BETA conditionals. 2022-04-21 21:46:47 +08:00
Moonchild
aa38ed97fa Issue #1701 - Implement Intl.PluralRules API 2020-12-24 09:36:34 +08:00
Moonchild
dabd32f955 Issue #1656 - Part 7: Nuke vim config lines in JS 2020-09-25 22:04:24 +08:00
Moonchild
34db761758 Issue #618 - Simplify module resolve hook to be a function pointer
This is an ahead-of time port to try and address #1624.
This is based on BZ 1461751 and Jon Coppeard's work in it.
2020-08-29 08:08:41 +08:00
Moonchild
b52bc1586d [js] Try to catch bad pointers for GC and bail if not valid. 2020-08-06 10:23:26 +08:00
wolfbeast
5386cd812b Issue #1570 - Implement globalThis
This resolves #1570
2020-06-06 07:19:04 +08:00
Jiaxun Yang
b9ffc2c362 Bug 1430693 - IonMonkey: MIPS: Fix generic NaN for legacy mips (IEEE 754-1985)
Tag: #1542
2020-05-23 06:55:04 +08:00
wolfbeast
1e553d0e73 Issue #316 - Make the memory GC performance object conditional (WIP)
This was only added for GCubench and likely interfering with building
without devtools-server.
2020-02-21 07:05:16 +08:00
wolfbeast
647d6033e0 Simplify value setting.
This gets rid of unused boolean return values on setters and a level of
indirection for calls to set values.
2020-01-10 17:06:55 +08:00
Gaming4JC
142e8bf444 Bug 1331092 - Part 7: Implement Async Generator yield*.
Tag #1287
2019-12-18 09:16:59 +08:00
Gaming4JC
10b93afff4 Bug 1331092 - Part 2: Implement Async Generator except yield*.
Tag #1287
2019-12-18 09:16:52 +08:00