1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

LibJS: Add StackFrame to avoid indirection in VM register access

This is a simple trick to generate better native code for access to
registers, locals, and constants. Before this change, each access had
to first dereference the member pointer in Interpreter, and then get to
the values. Now we always have a pointer directly to the values on hand.

Here's how it looks:

    class StackFrame {
    public:
        Value get(Operand) const;
        void set(Operand, Value);

    private:
        Value m_values[];
    };

And we just place one of these as a window on top of the execution
context's array of values (registers, locals, and constants).
This commit is contained in:
Andreas Kling 2025-04-29 01:44:38 +02:00 committed by Andreas Kling
parent 35efd4d14b
commit 36bb2824a6
Notes: github-actions[bot] 2025-04-29 12:55:45 +00:00
4 changed files with 531 additions and 532 deletions

File diff suppressed because it is too large Load diff