Age | Commit message (Collapse) | Author |
|
The kill system call accepts negative pids, as they
have special meaning:
pid == -1 means all processes the calling process has access to.
pid < -1 means every process who's process group ID is -pid.
I don't see any reason why the user space program should mask this.
|
|
JS::Value already has the empty state ({} or Value() gives you one.)
Use this instead of wrapping Value in Optional in some places.
I've also added Value::value_or(Value) so you can easily provide a
fallback value when one is not present.
|
|
|
|
|
|
This is required for template literals - we're not quite there yet, but at
least the parser can now tell us when this token is encountered -
currently this yields "Unexpected token Invalid". Not really helpful.
The character is a "backtick", but as we already have
TokenType::{StringLiteral,RegexLiteral} this seemed like a fitting name.
This also enables syntax highlighting for template literals in the js
REPL and LibGUI's JSSyntaxHighlighter.
|
|
This makes it show up in Inspector with all the menus inside it. :^)
|
|
These were never meant to stick around.
|
|
We can't assume there's always a parent custody -- when we open "/"
there isn't gonna be one!
Fixes #1858.
|
|
|
|
These strings would be applied when inserted into the buffer, but are
not shown as part of the suggestion.
This commit also patches up Userland/js and Shell to use this
functionality
|
|
This is a simple utility for invoking Core::DesktopServices::open() from command
line :^)
|
|
This moves us towards being able to run JavaScript in different global
objects without allocating a separate GC heap.
|
|
|
|
|
|
functrace traces the function calls a program makes.
It's like strace, but for userspace.
It works by using Debugging functionality to insert breakpoints
at call&ret instructions.
|
|
|
|
POSIX says, "Conforming applications should not assume that the returned
contents of the symbolic link are null-terminated."
If we do include the null terminator into the returning string, Python
believes it to actually be a part of the returned name, and gets unhappy
about that later. This suggests other systems Python runs in don't include
it, so let's do that too.
Also, make our userspace support non-null-terminated realpath().
|
|
The addition of assert functions to Userland/js
was done before we had load(..) implemented. Now
that it exists, it seems like the right move the
test helper functions to pure javascript instead
of poluting js with random global functions.
|
|
|
|
|
|
This adds missing checks in several LibJS consumers.
|
|
The work I did to add assert as a native function in js
was a step in the wrong direction. Now that js supports
load() it makes sense to just move assert and anything
we want to add to the test harness into pure javascript.
|
|
ptrace with PT_TRACEME was updated to also stop the traced thread on
exit from execve.
|
|
It's JavaScript after all :^)
|
|
|
|
With extra color (tm)
This commit also patches the users of LibLine to properly use the new
API
|
|
This patch adds primitive support for autocompletion in the JS repl,
it only supports completing global names and properties on variables :^)
|
|
|
|
Let's assume a 32-bit execution environment unless otherwise specified.
|
|
This will be very useful for developer tools like ProfileView, and also
for future tools like debuggers and such. :^)
|
|
|
|
We already have "global" as a way to access the global object in js(1)
(both REPL and script mode). This replaces it with "globalThis", which
is available in all environments, not just js.
|
|
|
|
This patch adds a new kind of JS::Value, the empty value.
It's what you get when you do JSValue() (or most commonly, {} in C++.)
An empty Value signifies the absence of a value, and should never be
visible to JavaScript itself. As of right now, it's used for array
holes and as a return value when an exception has been thrown and we
just want to unwind.
This patch is a bit of a mess as I had to fix a whole bunch of code
that was relying on JSValue() being undefined, etc.
|
|
Objects can have both named and indexed properties. Previously we kept
all property names as strings. This patch separates named and indexed
properties and splits them between Object::m_storage and m_elements.
This allows us to do much faster array-style access using numeric
indices. It also makes the Array class much less special, since all
Objects now have number-indexed storage. :^)
|
|
|
|
|
|
This patchset adds live syntax highlighting to the js repl.
It is turned off by default and can be enabled via the -s flag.
|
|
Introduce a central assert implementation so that the LibJS test suite
can take advantage of one implementation instead of copy/pasting the
same function into every test case file.
|
|
This patch adds a way for a socket to ask to be routed through a
specific interface.
Currently, this option only applies to sending, however, it should also
apply to receiving...somehow :^)
|
|
|
|
Only return whatever a "return" statment told us to return.
The last computed value is now available in Interpreter::last_value()
instead, where the REPL can pick it up.
|
|
StartDownload requests for unhandled protocols (or invalid URLs) will
now refuse to load instead of asserting. A failure code is sent back
to LibProtocol and Protocol::Client::start_download() returns nullptr.
Fixes #1604.
|
|
We can't just blindly dereference the result of getpwnam()/getgrnam()!
Fixes #1625.
|
|
|
|
This allows us to construct menus in a more natural way:
auto& file_menu = menubar->add_menu("File");
file_menu.add_action(...);
Instead of the old way:
auto file_menu = GUI::Menu::construct();
file_menu->add_action(...);
menubar->add_menu(file_menu);
|
|
|
|
|
|
Calling save("file") in a repl saves all the typed lines so far
into the specified file. It currently does not have great support for
multilined functions since those get turned into one line.
|
|
This reverts commit a60ea79a41845767ce40f225de20da7c99534ad1.
Reverting these changes since they broke things.
Fixes #1608.
|