Timothy Flynn
93712b24bf
Everywhere: Hoist the Libraries folder to the top-level
2024-11-10 12:50:45 +01:00
Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00
Andreas Kling
98f2da9834
LibJS: Rename Cell::visit_children() => Cell::visit_edges()
...
The GC heap is really a graph of cells, so "children" didn't quite feel
appropriate here.
2020-11-28 17:16:48 +01:00
Linus Groh
965050796f
LibJS: Don't create StringOrSymbol(String) if from_value() fails
...
If value.to_string() throws an exception and returns a null string we
must create an invalid StringOrSymbol, not one from the null string
(which ASSERT()s).
2020-11-07 10:08:05 +01:00
Andreas Kling
4387590e65
LibJS: Support move semantics for StringOrSymbol
...
This allows us to rehash property tables without a bunch of ref count
churn happening.
2020-10-15 23:49:53 +02:00
Nico Weber
d8d00d3ac7
LibJS: Add StringOrSymbol::as_string_impl() helper
2020-10-05 17:35:27 +02:00
Nico Weber
cc765e14ca
AK: Move StringImpl::operator== implementation into StringImpl
2020-10-05 17:35:27 +02:00
Andreas Kling
d01b746d88
LibJS: Add StringOrSymbol constructor that takes a FlyString
...
This avoids refcount churn from implicit conversion in some places.
2020-10-04 19:25:49 +02:00
Andreas Kling
3d053f244f
LibJS: Avoid creating a temporary String in StringOrSymbol::operator==
2020-10-04 19:25:49 +02:00
Andreas Kling
d542049596
LibJS: Avoid StringImpl refcount churn when hashing StringOrSymbol
...
Add a StringOrSymbol::hash() helper function so we can compute the hash
without having to construct a temporary String.
2020-10-04 19:25:49 +02:00
Andreas Kling
cfd141b4f9
LibJS: Avoid unnecessary StringImpl copy in StringOrSymbol(String)
2020-10-04 19:25:49 +02:00
Andreas Kling
b9793e603c
LibJS: Don't require Interpreter& in PropertyName and StringOrSymbol
2020-09-27 20:26:58 +02:00
Andreas Kling
340a115dfe
LibJS: Make native function/property callbacks take VM, not Interpreter
...
More work on decoupling the general runtime from Interpreter. The goal
is becoming clearer. Interpreter should be one possible way to execute
code inside a VM. In the future we might have other ways :^)
2020-09-27 20:26:58 +02:00
Andreas Kling
6444f49d22
LibJS: Make StringOrSymbol not leak strings
...
Ideally this thing would not allocate strings at all, but I'll leave
that as a separate exercise.
2020-08-16 20:31:05 +02:00
Matthew Olsson
7a1d485b19
LibJS: Integrate Symbols into objects as valid keys
...
This allows objects properties to be created for symbol keys in addition
to just plain strings/numbers
2020-07-09 23:33:00 +02:00