[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65304] bytecode compiler fails with VM error
From: |
Petter |
Subject: |
[Octave-bug-tracker] [bug #65304] bytecode compiler fails with VM error 5274 |
Date: |
Wed, 14 Feb 2024 17:59:28 -0500 (EST) |
Follow-up Comment #2, bug#65304 (group octave):
Here are two patches that should solve the issue.
The first patch allows for more than 255 arguments, up to 2^16-1 in an index
operation.
The other patch allows for more than 255, up to 2^15-1, named arguments or
return symbols when compiling a function.
Allow more than 255 arguments to index operations in bytecode (bug #65304)
Change some opcodes to use 2 bytes for number of args and use them when
the number of args is bigger than 255. INDEX_STRUCT_SUBCALL,
INDEX_STRUCT_CALL,
WORDCMD, WORDCMD_NX and INDEX_OBJ.
* pt-bytecode-vm.cc: Use two bytes for number of args for the opcodes
* pt-bytecode-walk.cc: Use the opcodes when many args
Support more than 255 named arguments and returns in the bytecode interpreter
(bug #65304)
Use two bytes to store the amount of argument symbols and return symbols, to
allow
for 2^15-1 symbols. Replace magic anon. fn. marker -128 with -32768.
* pt-bytecode-vm-internal.h: Change size to two bytes
* pt-bytecode-vm.cc: Change size to two bytes
* pt-bytecode-walk.cc: Emit two bytes
Error check new limits
* bytecode_subfuncs.m: Update tests
(file #55703, file #55704)
_______________________________________________________
Additional Item Attachment:
File name: octave_33190.patch Size:7 KB
<https://file.savannah.gnu.org/file/octave_33190.patch?file_id=55703>
File name: octave_33191.patch Size:16 KB
<https://file.savannah.gnu.org/file/octave_33191.patch?file_id=55704>
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-8523ddde37d79b56404205a28f13efda563b0104.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65304>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/