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 machine executed script clear the c


From: Petter
Subject: [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable
Date: Fri, 29 Sep 2023 20:35:39 -0400 (EDT)

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

I've made a patch to address this issue, as well as some related. E.g. you
couldn't define variables in eval:s in script called by script very well.
It required some rework of how bytecode script frames push and pop values from
the "eval frame".


VM Support globals in scripts properly (bug #64705)

Fix globalization and deglobalization in scripts with the same top
scope.

* test/compile/bytecode.tst: Update tests
* test/compile/module.mk: Add new files
* test/compile/bytecode_script_topscope_setup.m: New
* test/compile/bytecode_script_topscope_assert.m: New
* test/compile/bytecode_script_topscope.m: New

* libinterp/corefcn/compile.cc: Support clearing scripts with __vm_compile__
* libinterp/corefcn/stack-frame.cc: Reorganize bytecode dynamic
                                    stackframe to support scripts.
* libinterp/octave-value/ov-ref.cc: New function to notify globalness change
* libinterp/octave-value/ov-ref.h:
* libinterp/octave-value/ov-usr-fcn.cc: Limit script vm execution to top or vm
frames
* libinterp/octave-value/ov.h: base_value_stack_frame friend to access is_ref
* libinterp/parse-tree/pt-bytecode-vm.cc: Remove inaccurate comment
* libinterp/parse-tree/pt-bytecode-walk.cc: Add function name to scope in
                                            cleaner way. Set
m_n_orig_scope_size.
* libinterp/parse-tree/pt-bytecode.h: Field m_n_orig_scope_size for original
                                      amount of symbols in scope


(file #55177)

    _______________________________________________________

Additional Item Attachment:

File name: octave_32477.patch             Size:62 KB
    <https://file.savannah.gnu.org/file/octave_32477.patch?file_id=55177>



    _______________________________________________________

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]