ladybird/Userland/Utilities
Andreas Kling 69dddd4ef5 LibJS: Start fleshing out a bytecode for the JavaScript engine :^)
This patch begins the work of implementing JavaScript execution in a
bytecode VM instead of an AST tree-walk interpreter.

It's probably quite naive, but we have to start somewhere.

The basic idea is that you call Bytecode::Generator::generate() on an
AST node and it hands you back a Bytecode::Block filled with
instructions that can then be interpreted by a Bytecode::Interpreter.

This first version only implements two instructions: Load and Add. :^)

Each bytecode block has infinity registers, and the interpreter resizes
its register file to fit the block being executed.

Two new `js` options are added in this patch as well:

`-d` will dump the generated bytecode
`-b` will execute the generated bytecode

Note that unless `-d` and/or `-b` are specified, none of the bytecode
related stuff in LibJS runs at all. This is implemented in parallel
with the existing AST interpreter. :^)
2021-06-07 18:11:59 +02:00
..
adjtime.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
allocate.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
aplay.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
arp.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
avol.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
base64.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
basename.cpp basename: Tidy up a little more 2021-06-01 09:13:17 +02:00
beep.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
bt.cpp LibGUI+Shell+bt+ls: Use proper APIs for creating file URLs 2021-06-01 09:28:05 +02:00
cal.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
cat.cpp Utilities: Use Vector<String> positional arguments in some places 2021-04-29 11:28:01 +02:00
checksum.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
chgrp.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
chmod.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
chown.cpp Userland: Return 1 when help text is shown for insufficient args 2021-06-01 21:30:16 +01:00
chres.cpp Userland: Update IPC calls to use proxies 2021-05-03 21:14:40 +02:00
chroot.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
cksum.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
clear.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CMakeLists.txt Userland: Add matroska program to test parsing Matroska container files 2021-06-06 17:47:00 +02:00
copy.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
cp.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
cpp-parser.cpp LibCpp: Generalize ASTNode::dump() to support redirecting its output 2021-05-19 23:19:07 +02:00
crash.cpp Utilities: Add support for testing null deferencing a RefPtr 2021-06-06 22:16:11 +02:00
cut.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
date.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
dd.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
ddate.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
df.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
dirname.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
disasm.cpp Everywhere: Add missing includes for <AK/OwnPtr.h> 2021-05-19 21:36:57 +02:00
disk_benchmark.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
dmesg.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
du.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
echo.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
env.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
errno.cpp Utilities: Add errno utility 2021-05-15 23:51:50 +01:00
expr.cpp AK+Everywhere: Consolidate String::index_of() and String::find() 2021-05-24 11:59:18 +02:00
false.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
fgrep.cpp Userland: Return 1 when help text is shown for insufficient args 2021-06-01 21:30:16 +01:00
file.cpp file: Output directory when path is a directory 2021-05-27 13:18:23 +01:00
find.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
flock.cpp Userland: Return 1 when help text is shown for insufficient args 2021-06-01 21:30:16 +01:00
fortune.cpp Userland: Avoid a bunch of JsonObject copies 2021-05-31 17:59:02 +01:00
functrace.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
gml-format.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
grep.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
gron.cpp Userland: Return 1 when help text is shown for insufficient args 2021-06-01 21:30:16 +01:00
groups.cpp Userland: Add groups program 2021-05-05 15:12:30 +01:00
gunzip.cpp Utilities: Use Vector<String> positional arguments in some places 2021-04-29 11:28:01 +02:00
gzip.cpp Utilities: Use Vector<String> positional arguments in some places 2021-04-29 11:28:01 +02:00
head.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
hexdump.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
host.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
hostname.cpp hostname: Handle 'sethostname' errors 2021-06-04 19:11:27 +02:00
id.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
ifconfig.cpp ifconfig: Use shorter argument names 2021-06-05 23:51:08 +04:30
ini.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
jp.cpp Userland: Avoid a bunch of JsonObject copies 2021-05-31 17:59:02 +01:00
js.cpp LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
keymap.cpp Userland: Preserve keyboard mapping preference on reboot (#6955) 2021-05-09 15:56:03 +02:00
kill.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
killall.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
ln.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ls.cpp LibGUI+Shell+bt+ls: Use proper APIs for creating file URLs 2021-06-01 09:28:05 +02:00
lsirq.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
lsof.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
lspci.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
man.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
matroska.cpp Userland: Fix matroska utility displaying invalid track data 2021-06-06 23:46:59 +04:30
md.cpp md: Improve document parsing error message 2021-06-01 21:30:16 +01:00
misbehaving-application.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mkdir.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
mkfifo.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mknod.cpp Userland: Return 1 when help text is shown for insufficient args 2021-06-01 21:30:16 +01:00
mktemp.cpp LibC: Remove static from function local constexpr variable 2021-05-18 08:07:21 +02:00
modload.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
modunload.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
more.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
mount.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
mv.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
nc.cpp Userland: Treat inet_pton returning 0 as an error 2021-05-27 22:56:21 +02:00
netstat.cpp Userland: Avoid a bunch of JsonObject copies 2021-05-31 17:59:02 +01:00
nl.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
notify.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
nproc.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
ntpquery.cpp ntpquery: Replace printf()/fprintf(stderr) with out{,ln}()/warnln() 2021-05-30 14:07:58 +01:00
open.cpp Utilities: Add support for relative paths in open command 2021-06-02 17:34:27 +04:30
pape.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
passwd.cpp LibC: Implement support for getspnam() and friends 2021-05-01 12:40:12 +02:00
paste.cpp Userland: Implement paste --watch mode 2021-05-10 19:09:53 +01:00
pathchk.cpp Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
pidof.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
ping.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
pls.cpp pls: Fix typo in TERM environment variable propagation 2021-05-30 23:13:52 +02:00
pmap.cpp Utilities: Report correct memory addresses for pmap 2021-06-02 10:16:45 +01:00
PreprocessorTest.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
printf.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
pro.cpp LibProtocol: Use URL class in RequestClient::start_request argument 2021-06-06 16:00:11 +02:00
profile.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
ps.cpp Utilities: Make sure columns for ps are properly aligned 2021-06-03 17:53:59 +02:00
purge.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
readelf.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
readlink.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
realpath.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
reboot.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
rev.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
rm.cpp rm: Allow empty paths if -f is specified 2021-06-05 10:56:58 +02:00
rmdir.cpp Userland: Make rmdir take multiple paths 2021-04-26 09:32:42 +02:00
seq.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
shot.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
shuf.cpp Userland: Migrate from arc4random_uniform() to get_random_uniform() 2021-05-14 22:24:02 +02:00
shutdown.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
sleep.cpp LibC: Do not include errno.h inside unistd.h 2021-05-14 22:24:02 +02:00
sort.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
sql.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
stat.cpp LibC: Move makedev(), major(), minor(), to sys/types.h 2021-05-14 22:24:02 +02:00
strace.cpp Everywhere: Remove accidental '\n' from various outln() invocations 2021-06-03 22:50:21 +02:00
stty.cpp Userland: Fix stty not setting control characters 2021-05-24 20:14:21 +01:00
su.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
sync.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
syscall.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
sysctl.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
tac.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
tail.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
tar.cpp tar: Ignore "extended headers" 2021-05-24 00:01:01 +01:00
tee.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
telws.cpp Utilities: Update telws to use the isolated WebSocket service 2021-04-25 19:04:34 +02:00
test_efault.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
test_env.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
test_io.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
test-bindtodevice.cpp Userland: Rename e1k0 to ep0s7 2021-05-22 15:42:54 +01:00
test-crypto.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
test-fuzz.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
test-pthread.cpp Userland: Rename LibThread => LibThreading 2021-05-22 18:54:22 +02:00
test-unveil.cpp Utilities: Fix test-unveil INT_MAX include 2021-05-23 18:10:29 +02:00
test.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
top.cpp LibCore: Make ProcessStatisticsReader return results in a Vector 2021-05-23 11:10:15 +02:00
touch.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
tr.cpp Everywhere: Sort out superfluous QuickSort.h imports 2021-05-29 23:41:54 +01:00
traceroute.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
tree.cpp Userland: Move HOST_NAME_MAX to limits.h 2021-04-27 23:06:16 +02:00
true.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
truncate.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
tt.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
tty.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
umount.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
uname.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
uniq.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
unzip.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
uptime.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
useradd.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
userdel.cpp Utilities: Implement ArmedScopeGuard in userdel to unlink temp files 2021-05-30 17:42:03 +01:00
utmpupdate.cpp Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
w.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
wasm.cpp LibWasm: Move Wasm::BytecodeInterpreter into its own header 2021-06-05 14:31:54 +04:30
watch.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
wc.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
which.cpp which: Replace printf() with outln()/warnln() 2021-05-30 14:07:58 +01:00
whoami.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
xargs.cpp Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
yes.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
zip.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00