octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65191] Refactor dynamic stack frame for bytec


From: Petter
Subject: [Octave-bug-tracker] [bug #65191] Refactor dynamic stack frame for bytecode interpreter
Date: Mon, 22 Jan 2024 17:40:57 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65191>

                 Summary: Refactor dynamic stack frame for bytecode
interpreter
                   Group: GNU Octave
               Submitter: petter
               Submitted: Mon 22 Jan 2024 10:40:56 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 22 Jan 2024 10:40:56 PM UTC By: Petter <petter>
After discussions in the discourse thread about aligning the stack frame
objects of the bytecode interpreter with how the non-bytecode frames work,
I've done some much needed refactoring of the bytecode_fcn_stack_frame class.

The bytecode_fcn_stack_frame class was quite entangled with back and forth
handling of scripts, nested, anonymous function etc, so I tried to make it
cleaner by splitting it up and removing redundant code.


Refactor dynamic stack frame for bytecode interpreter

Split up the bytecode_fcn_stack_frame into fcn, script and nested
to detangle unessecary messiness.

Also solve some bugs where handles to nested function did not look
for symbols in the correct frame and did not push the closure frame
properly.

* call-stack.cc: Remove redundant check for bytecode frames
                 Use new stack_frame::create_xxx fcns
* stack-frame.cc: Refactor bytecode_fcn_stack_frame
* stack-frame.h: New create_bytecode_nested ()
                 New create_bytecode_anon ()
                 New create_bytecode_script ()
* ov_base.h: New enum value OCT_NESTED_HANDLE
* ov-fcn-handle.h: New get_closure_frame ()
* ov-fcn-handle.cc
* ov-ref.cc: Use offset overload
* ov.h: More friends
* pt-bytecode-vm.cc: Handle bytecode calls to nested handles
* pt-butecode-walk.cc: Remove fake offset workaround
* bytecode_nested.m: Update tests








    _______________________________________________________
File Attachments:


-------------------------------------------------------
Name: 33272.patch  Size: 121KiB
<http://savannah.gnu.org/bugs/download.php?file_id=55597>

    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-97bcd06ad68494ad933ec8c727bceb074e2dfa28.tar.gz

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65191>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]