Closed
Bug 244014
Opened 20 years ago
Closed 20 years ago
Removal of code complexity limits in the interpreter
Categories
(Rhino Graveyard :: Core, enhancement)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
FIXED
1.6R1
People
(Reporter: igor, Assigned: igor)
Details
Attachments
(1 file)
129.03 KB,
patch
|
Details | Diff | Splinter Review |
Currently the interpreter bytecode limits code complexity in various ways. For
example, it restricts the size of jump offsets to 32K, the number of different
strings is limited to 64K per script and the number of arguments in function
calls can not exceed 64K.
Although such limits are quite reasonable, they are occasionally hit especially
with automatically generated scripts. It would be nice if the interpreter would
not contain such restrictions.
Assignee | ||
Comment 1•20 years ago
|
||
The patch changes bytecode in 2 ways:
1. To remove 32K limit on the size of jump offset the patch adds a hashtable
for jump offset that does not fit short. The jumpcode then checks if the offset
is 0 then it uses the hashtable to lookup the jump target based on the jump pc.
To decrease code duplication the interpreter loop is reorganized to have all
jump-related code in one place.
2. To remove 64K restriction on various indexes and counters a new prefix
bytecode Icode_REG_IND* and Icode_REG_STR* are introduced. They preload string
or index arguments of various instructions so the instructions themselves can
use already extracted value. The prefixes know how to deal with arbitrary int
values and encode them accordingly.
Assignee | ||
Comment 2•20 years ago
|
||
I committed the above patch as a series of smaller patches.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5R6
You need to log in
before you can comment on or make changes to this bug.
Description
•