bugGNU Octave - Bugs: bug #64690, VM has issues with script files...

 
 

bug #64690: VM has issues with script files containing a function

Submitter:  None
Submitted:  Mon 18 Sep 2023 07:53:53 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Ready For Test Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 21 Sep 2023 12:29:23 AM UTC, comment #2: 

Thanks. Pushed here: https://hg.savannah.gnu.org/hgweb/octave/rev/ddf7c5f4ddde

I edited the commit message to refer to this bug number.

Arun Giridhar <arungiridhar>
Group Member
Wed 20 Sep 2023 09:09:43 PM UTC, comment #1: 

Thanks for the test. I've made a patch adding support for function defs in scripts.



(file #55153)

Petter <petter>
Mon 18 Sep 2023 07:53:53 AM UTC, original submission:  

https://docs.octave.org/latest/Script-Files.html:

"Even though a script file may not begin with the function keyword, it is possible to define more than one function in a single script file and load (but not execute) all of them at once. To do this, the first token in the file (ignoring comments and other white space) must be something other than function."


File test.m
----------------
1;

function ret = test1(x)
      ret = x;
endfunction

y = test1(1);

disp(y);
-----------------


'__compile__("test")'
error: Not implemented ./../libinterp/parse-tree/pt-bytecode-walk.h:292


OR

 
_enable_vm_eval_ (1);
source test.m
warning: Auto-compilation of test failed with message Not implemented ./../libinterp/parse-tree/pt-bytecode-walk.h:292
1


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #55153:  octave_32433.patch added by petter (6KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arungiridhar (Posted a comment)
  • -email is unavailable- added by petter (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-09-21 arungiridhar StatusNone Ready For Test
    2023-09-20 petter Attached File- Added octave_32433.patch, #55153

    Back to the top

    Powered by Savane 3.12