Browser hacking: Let's add a JIT compiler to LibJS

  Рет қаралды 16,755

Andreas Kling

Andreas Kling

9 ай бұрын

Follow me on X: x.com/awesomekling
Sponsor me on GitHub: github.com/sponsors/awesomekling
Support me on Patreon: / awesomekling
Donate via PayPal: paypal.me/awesomekling
Discord: / discord
Merch: store.serenityos.org/
SerenityOS is a new operating system that we're building from scratch. serenityos.org
Ladybird is a cross-platform web browser, also part of the SerenityOS project. :^)

Пікірлер: 37
@District8190
@District8190 9 ай бұрын
As much as I'm not super happy about you moving away from the old stance of keeping LibJS as an extremely undestandable bytecode VM, these videos have been extremely interesting. I guess I've never looked too far into JIT implementations, and your videos end up making me accidentally discover new details as usual.
@driedurchin
@driedurchin 9 ай бұрын
Well, if you watched the previous video, he did mention that his intent is to still keep the JIT simple as well, so that the quality you're talking about is still present. Obviously, some complexity will be added but I guess the Serenity team will decide if it's worth it.
@thaddaeusmarkle1665
@thaddaeusmarkle1665 9 ай бұрын
It seems like the bytecode is still gonna be there, its just that now it can be either interpreted or compiled. The interpreter is also still gonna stay around, this is just another option.
@bbq1423
@bbq1423 9 ай бұрын
It could perhaps be useful to restrict the process running the jitted code into not being able to run any syscalls, it's only there to run the state machine after all.
@kreuner11
@kreuner11 9 ай бұрын
How would it communicate back with the main thread? There is a tool for restricting the types of syscalls you can make called pledge, here it'll have the minimum pledge likely just for IPC
@yjk_ch
@yjk_ch 9 ай бұрын
It would still need some way to talk back to JS engine, though. But I think at least JIT part cen theoretically become a separate process with very minimal privileges(using pledge()).
@bbq1423
@bbq1423 9 ай бұрын
@@kreuner11 If the main process and the child process have a shared region of memory which the child has write access to (maybe not even read ¯\_(ツ)_/¯) then I believe that you could do the communication completely without syscalls.
@perotubinger
@perotubinger 9 ай бұрын
Great new video series! Calling it a “series” because there a hopefully many more to come. ❤
@DanelonNicolas
@DanelonNicolas 9 ай бұрын
took me a week to make something similar to my own language... Andreas did it in roughly three hours? hahaha awesome, kling!
@dealloc
@dealloc 9 ай бұрын
Andreas also worked on WebKit, so fair game :D
@LeoBerardino
@LeoBerardino 9 ай бұрын
Super awesome videos @andreas. We are enjoing each minute of the JIT implementation. Thank you for that :)
@Hector-bj3ls
@Hector-bj3ls 9 ай бұрын
Your desktop background is literally me right now. I'm at my desk with my drink and my laptop, wrapped up in my fancy poncho.
@andrewkaster4033
@andrewkaster4033 9 ай бұрын
void*p and size_t size? Our Span type is crying 😢
@dbarenholz
@dbarenholz 9 ай бұрын
More JIT videos please! These are so fun!
@solcloud
@solcloud 9 ай бұрын
This will be interesting, thank you for new series 😍
@JustATempest
@JustATempest 9 ай бұрын
If it's abstract enough, It could be possible to reuse a lot of this code, when adding support for WebAssembly.
@tobiasfrey9573
@tobiasfrey9573 9 ай бұрын
Love your videos
@justanormalperson
@justanormalperson 9 ай бұрын
These videos are great :^)
@maixicek
@maixicek 9 ай бұрын
Awesome jeet series :)
@andreialdea6072
@andreialdea6072 9 ай бұрын
the Netflix series on these channel always end up on JS in some way 😅
@staswisniewski4101
@staswisniewski4101 9 ай бұрын
Well hello friends
@PlutoniumJesus
@PlutoniumJesus 9 ай бұрын
@34:18 What about MOVS?
@JordanWerthman
@JordanWerthman 9 ай бұрын
I am a bit confused how Array/LocalArrayBase are not being overwritten since they are stored in caller-saved (R8/R9) registers and you over-write them with the arguments for the native function calls before you save them on the stack? I didn’t see the code on GitHub so maybe I am misremembering or confused but that feels like it would cause issues.
@getpunned
@getpunned 9 ай бұрын
Get jitty with it
9 ай бұрын
I need that wallpaper.
@hxllside
@hxllside 9 ай бұрын
Is this stuff already pushed anywhere?
@awesomekling
@awesomekling 9 ай бұрын
Yeah, the branch is in my serenity fork on GitHub: github.com/awesomekling/serenity/tree/libjs_jeet
@hxllside
@hxllside 9 ай бұрын
@@awesomekling Thanks!
@nopair5688
@nopair5688 9 ай бұрын
🤓🙏🙌✌
@NoOne-ev3jn
@NoOne-ev3jn 9 ай бұрын
Hey, how can someone become as good as you?
@awesomekling
@awesomekling 9 ай бұрын
Mainly by doing a lot of programming and trying to do things even if they seem hard :)
@CYXXYC
@CYXXYC 9 ай бұрын
1:05:54 did he say the p word
@YuTv1408
@YuTv1408 9 ай бұрын
Coding is quiet boring and frustrating. Kinda toxic if you think about it
@SimonBuchanNz
@SimonBuchanNz 9 ай бұрын
... Huh?
@YuTv1408
@YuTv1408 9 ай бұрын
Just kidding....lololol. that face 😅😅
@slendi9623
@slendi9623 9 ай бұрын
WHF
Browser hacking: JIT fast path for JavaScript ToBoolean()
45:35
Andreas Kling
Рет қаралды 10 М.
Browser hacking: Basic try...catch in the JavaScript JIT
1:25:43
Andreas Kling
Рет қаралды 9 М.
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 8 МЛН
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 23 МЛН
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 7 МЛН
Browser hacking: JIT fast path for variable access
1:23:07
Andreas Kling
Рет қаралды 10 М.
I Melted Wood With Friction
8:44
The Action Lab
Рет қаралды 888 М.
I spent 30 days learning shaders to avoid drawing pixel art
7:49
Python vs Uiua vs BQN
15:47
code_report
Рет қаралды 14 М.
Kernelless Kernel Programming (eBPF) - Computerphile
19:12
Computerphile
Рет қаралды 72 М.
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 139 М.
Browser hacking: Using external SVG files as images
1:54:24
Andreas Kling
Рет қаралды 9 М.
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
OS hacking: Faster text painting (with a glyph ID cache!)
32:25
Andreas Kling
Рет қаралды 9 М.
S24 Ultra and IPhone 14 Pro Max telephoto shooting comparison #shorts
0:15
Photographer Army
Рет қаралды 9 МЛН
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,1 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 1,4 МЛН
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 976 М.