Idan Horowitz
366468f1de
LibJS: Implement Intl %SegmentsPrototype%.containing
2022-01-31 21:05:04 +02:00
Idan Horowitz
96af50bbba
LibJS: Implement the Intl CreateSegmentDataObject AO
2022-01-31 21:05:04 +02:00
Idan Horowitz
cea6c81c77
LibJS: Implement the Intl.Segmenter FindBoundary AO
2022-01-31 21:05:04 +02:00
Idan Horowitz
b1d19b5917
LibJS: Convert Intl.Segmenter, Segments and SegmentIterator to Utf16
...
This is a precursor to implementing the FindBoundary AO, which operates
on Utf16 code unit indexes.
2022-01-31 21:05:04 +02:00
Idan Horowitz
4967bcd4ce
LibUnicode: Implement sentence segmentation
2022-01-31 21:05:04 +02:00
Idan Horowitz
a593a5c8ab
LibUnicode: Implement word segmentation
2022-01-31 21:05:04 +02:00
Idan Horowitz
58b0eed6a7
LibUnicode: Implement grapheme segmentation
2022-01-31 21:05:04 +02:00
Idan Horowitz
44e8c05c67
AK: Add a Utf16View::code_unit_offset_of(Utf16CodePointIterator) helper
...
This helper can be used to used to retrieve the code unit offset of an
active Utf16CodePointIterator efficiently.
2022-01-31 21:05:04 +02:00
Idan Horowitz
2d50c08f34
LibUnicode: Download and parse {Grapheme,Word,Sentence} break props
2022-01-31 21:05:04 +02:00
Timothy Flynn
6efbafa6e0
Everywhere: Update copyrights with my new serenityos.org e-mail :^)
2022-01-31 18:23:22 +00:00
Timothy Flynn
02b7bf34c9
LibJS: Implement BigInt IsLessThan according to the spec
2022-01-31 17:50:54 +00:00
Timothy Flynn
9ad3debf35
LibJS: Implement BigInt loose-equality according to the spec
2022-01-31 17:50:54 +00:00
Timothy Flynn
281b0411f2
LibJS: Implement conversion of strings to BigInts according to the spec
...
The spec defines a StringToBigInt AO which allows for converting binary,
octal, decimal, and hexadecimal strings to a BigInt. Our conversion was
only allowing for decimal strings.
2022-01-31 17:50:54 +00:00
Timothy Flynn
94a346c9b9
AK: Add is_ascii_[binary,octal]_digit to CharacterTypes
2022-01-31 17:50:54 +00:00
Timothy Flynn
0013227377
LibCrypto: Change UnsignedBigInteger parser to use a StringView
...
SignedBigInteger already accepts a StringView; let's avoid the heap
allocation in UnsignedBigInteger.
2022-01-31 17:50:54 +00:00
Andreas Kling
6b5f6d6c0e
LibJS: Add a 96-byte CellAllocator
...
Two of our most frequently allocated objects are Shape (88 bytes)
and DeclarativeEnvironment (80 bytes). Putting these into 128-byte
cells was quite wasteful, so let's add a more suitable allocator
for them.
2022-01-31 16:19:23 +01:00
Andreas Kling
8bdf6441b1
LibJS: Use u32 for the JS::Shape property count
...
We don't need to support more than 2^32 object properties anyway, so
there's no point in using 64-bit property counts.
This small reduction in memory usage makes test-js run ~10% faster on
x86_64 locally.
2022-01-31 16:19:23 +01:00
Andreas Kling
7a742b17da
LibJS: Store ECMAScriptFunctionObject bytecode in an OwnPtr
...
Using an Optional was extremely wasteful for function objects that don't
even have a bytecode executable.
This allows ECMAScriptFunctionObject to fit in a smaller size class.
2022-01-31 16:19:23 +01:00
Andreas Kling
8d3f92c844
LibJS: Make JS::ECMAScriptFunctionObject smaller by reordering members
...
...and making heavy use of bitfields.
2022-01-31 16:19:23 +01:00
Andreas Kling
fc04465fa3
LibJS: Remove unnecessary GlobalObject pointer from Environment
...
As it turns out, we didn't actually need this pointer. :^)
2022-01-31 16:19:23 +01:00
Andreas Kling
4a51165f5f
LibJS: Reorganize JS::Shape members a little bit
...
Now that AK::Weakable doesn't have a bunch of padding at the end,
let's move the smaller members of JS::Shape to the end, since there's
nothing to fold into at the start.
2022-01-31 16:19:23 +01:00
Andreas Kling
1469057033
LibJS: Make JS::Shape smaller by using OwnPtr<HashMap> for transitions
...
Many shapes don't have any forward transitions to cache, so we can save
a bunch of memory (and time) by only creating the cache maps when
actually needed.
2022-01-31 16:19:23 +01:00
Andreas Kling
51e5cc4e13
AK: Remove thread safety gunk from userspace WeakPtr
...
The implicit thread safety stuff is only needed by the kernel version
of WeakPtr, as userspace already makes no guarantees about this.
2022-01-31 16:19:23 +01:00
Andreas Kling
30fcb07fe8
LibJS: Make JS::Environment smaller by reordering members
...
By putting `m_permanently_screwed_by_eval` first, it folds into the
padding at the end of the base class (JS::Cell).
2022-01-31 16:19:23 +01:00
Luke Wilde
7431f6073b
LibWeb: Implement ChildNode.replaceWith
2022-01-31 15:25:36 +01:00
Luke Wilde
5a5e3a6ec3
LibWeb: Implement ChildNode.after
2022-01-31 15:25:36 +01:00
Luke Wilde
1bbe40c5af
LibWeb: Implement ChildNode.before
2022-01-31 15:25:36 +01:00
Luke Wilde
d1bc9358c1
LibWeb: Implement ParentNode.replaceChildren
2022-01-31 15:25:36 +01:00
Luke Wilde
34dfdc3f37
LibWeb: Implement ParentNode.append
2022-01-31 15:25:36 +01:00
Luke Wilde
d5c96c3ccf
LibWeb: Implement ParentNode.prepend
...
`convert_nodes_to_single_node` is inside its own file so ChildNode can
include and use it without having to include other headers such as
DOM/Node.h. This is to prevent circular includes.
2022-01-31 15:25:36 +01:00
Luke Wilde
d7998c5dbd
LibWeb: Accept array pairs in URLSearchParams constructor
2022-01-31 15:25:36 +01:00
Luke Wilde
68813fbe70
LibWeb: Add initial support for passing union types into IDL functions
...
This currently does not accept ArrayBuffer, DataView, TypedArrays,
callback functions, nullable types, dictionaries, records and frozen
arrays.
2022-01-31 15:25:36 +01:00
Luke Wilde
fb7ca09f04
LibWeb: Add support for passing sequences into IDL functions
2022-01-31 15:25:36 +01:00
Kenneth Myhra
9773c3cabc
pape: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
0dc46da99f
open: Use more StringView instead of const char*
2022-01-31 15:25:07 +01:00
Kenneth Myhra
71c004b75f
open: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
73f431a7cb
ntpquery: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
5d41f993cd
notify: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
a64b44377d
nl: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
cf207ad938
mount: Use more StringView instead of const char*
2022-01-31 15:25:07 +01:00
Kenneth Myhra
9d48406312
mount: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
46c4988568
lsof: Use more StringView instead of const char*
2022-01-31 15:25:07 +01:00
Kenneth Myhra
262161481f
lsof: Port to LibMain
2022-01-31 15:25:07 +01:00
Kenneth Myhra
6a7ffcddba
lsirq: Port to LibMain
2022-01-31 15:25:07 +01:00
Luke Wilde
4a69072c3a
Ports/fontconfig: Add freetype dependency
...
When I did a fresh build of ports, I got this while building fontconfig:
```
checking for FREETYPE... no
configure: error: Package requirements (freetype2 >= 21.0.15) were not
met:
No package 'freetype2' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FREETYPE_CFLAGS
and FREETYPE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
```
2022-01-31 03:31:40 +01:00
Timothy Flynn
fb08a5a896
LibJS: Implement Intl.supportedValuesOf
...
This is a stage 3 ECMA-402 proposal:
https://tc39.es/proposal-intl-enumeration/
2022-01-31 00:32:41 +00:00
Timothy Flynn
a120e85596
LibJS: Provide public access to list of sanctioned unit identifiers
2022-01-31 00:32:41 +00:00
Timothy Flynn
98348d9a33
LibJS: Allow calling Array::create_from without allocating a Vector
...
This method works as-is with a Span instead of a Vector (with some minor
const correctness adjustments).
2022-01-31 00:32:41 +00:00
Timothy Flynn
2e1db1b090
LibTimeZone: Use new generator util to generate all time zones
...
Added the call to generate_available_values(), then realized it is the
exact same as the existing, manually written implementation. So let's
use the new utility.
2022-01-31 00:32:41 +00:00
Timothy Flynn
bb0f548614
LibUnicode: Generate a list of available currencies
2022-01-31 00:32:41 +00:00