bugGNUstep - Bugs: bug #9595, StepTalk was not able to handle...

Group
 
 

bug #9595: StepTalk was not able to handle more than 256(128) literals in scripts.

Submitter:  Alexander V. Diemand <axeld>
Submitted:  Thu 08 Jul 2004 02:52:15 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  stefanu
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 30 Jan 2009 07:22:53 PM UTC, comment #5: 

closing as fixed years ago

Richard Frith-Macdonald <CaS>
Group Member
Mon 12 Jul 2004 11:31:46 AM UTC, comment #4: 

Thanks a lot. Did some testing and it works perfectly.

Alexander V. Diemand <axeld>
Sat 10 Jul 2004 11:13:03 AM UTC, comment #3: 

Applied patch. Please test.

Stefan Urbanek <stefanu>
Group Member
Fri 09 Jul 2004 09:22:52 PM UTC, comment #2: 

I have been imprecise: Mateu has been providing a patch which allowed for addressing 256 literals instead of the default 128 ones; just because of a tiny change from signed char to unsigned char in the method fetchNextBytecodeAtPointer: in file STBytecodes.m (and not STCompiler.m as I mentionned).
This change has never made its way into the CVS and therefore, I have included it again in my diff.

There is a new diff (bugfix_size_of_literal_index-2.diff) attached which simplifies the way "long jumps" are encoded. It now uses EMIT_DOUBLE instead of EMIT_TRIPPLE. There is no need for the special macros to compute the offset or encode it in two bytes.

Please ignore the first diff. Its changes have been integrated in the new one.


Alexander V. Diemand <axeld>
Fri 09 Jul 2004 02:11:15 PM UTC, comment #1: 

Patch looks good. I'll apply it when I get home.

Concerning the STCompiler change: what do you mean? Recycling of a literal? If yes, then it is not possible, because arrays and strings are mutable. However, it can be done for numbers as a special case. Has anyone else elaborated more deeply the issue?

Stefan Urbanek <stefanu>
Group Member
Thu 08 Jul 2004 02:52:15 PM UTC, original submission:  

Scripts written in Smalltalk and interpreted by StepTalk where limited to max. 256 literals (1 byte index) such as strings and numbers per block. This is way below what is normally needed.
A simple update of the compiler which computes the literal's index and stores it in the bytecode, plus the interpreter was necessary to allow for 16 bit indexes. This should allow for 64k literals.

The attached diff is made from the following files:
StepTalk/Languages/Smalltalk/STBytecodes.m
StepTalk/Languages/Smalltalk/STCompiler.m
against the current CVS version.

BTW: the patch uploaded by Mateu has not been fully applied to the CVS version of StepTalk. The needed change to STCompiler.m has been included again.

Thanks for including this in CVS.

Alex.

Alexander V. Diemand <axeld>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #1528:  bugfix_size_of_literal_index-2.diff added by axeld (6KiB - text/x-diff - new and complete diff)
file #1509:  bugfix_size_of_literal_index.diff added by axeld (3KiB - text/x-diff - Diff against STCompiler.m and STBytecodes.m)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  •  

    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 logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-01-30 CaS Open/ClosedIn Test Closed
    2004-07-10 stefanu StatusNone Fixed
        Open/ClosedAnalyzed In Test
    2004-07-09 axeld Attached File- Added bugfix_size_of_literal_index-2.diff, #1472
    2004-07-09 stefanu Assigned toNone stefanu
        Open/ClosedOpen Analyzed
    2004-07-08 axeld Attached File- Added bugfix_size_of_literal_index.diff, #1469
        Carbon-Copy- Added stefanu

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code