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

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

[Octave-bug-tracker] [bug #64705] VM variable scope problems when execut


From: Petter
Subject: [Octave-bug-tracker] [bug #64705] VM variable scope problems when executing scripts
Date: Sat, 7 Oct 2023 12:11:48 -0400 (EDT)

Follow-up Comment #14, bug #64705 (project octave):

I made two patches that seem to solve the issues. It modifies the test case to
enumerate every combination
of uncompiled and compiled script, function etc so hopefully everything is
covered.


VM Handle mixing of non-bytecode and bytecode scripts (bug #64705)

Also add left-out 'ans' in variable pushing and popping in script frames.

* libinterp/corefcn/stack-frame.cc: Lookup unknown name instead of panicing in
scope_flags.
                                    Pretend to be user script frame to make
uncompiled scripts
                                    find the correct eval frame.
                                    Skip machine compiled frame with
static_link instead of parent link.
* libinterp/octave-value/ov-usr-fcn.cc: Allow calling uncompiled scripts from
compiled scripts.
* libinterp/parse-tree/pt-bytecode-walk.cc: Also invite 'ans' id to the script
frame
* test/compile/: Tests updated



VM Fix loading and saving from bytecode script frame (bug #64705)

Makes load() and save() not panic in bytecode script frames.

* libinterp/corefcn/stack-frame.cc: Use varref() for scripts in insert_symbol
                                    that got proper support for scripts.
* test/compile/: Tests updated.


(file #55212, file #55213)

    _______________________________________________________

Additional Item Attachment:

File name: octave_32487.patch             Size:18 KB
    <https://file.savannah.gnu.org/file/octave_32487.patch?file_id=55212>

File name: octave_32488.patch             Size:7 KB
    <https://file.savannah.gnu.org/file/octave_32488.patch?file_id=55213>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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