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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Alexander V. Diemand <axeld>
Submitted on:  Thu 08 Jul 2004 02:52:15 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Stefan Urbanek <stefanu>
Open/Closed: Closed

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

closing as fixed years ago

Richard Frith-Macdonald <CaS>
Project 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>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
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>

 

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
  • -unavailable- added by CaS (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Jan 2009 07:23:05 PM UTCCaSOpen/ClosedIn Test=>Closed
    Sat 10 Jul 2004 11:13:03 AM UTCstefanuStatusNone=>Fixed
      Open/ClosedAnalyzed=>In Test
    Fri 09 Jul 2004 09:22:52 PM UTCaxeldAttached File-=>Added bugfix_size_of_literal_index-2.diff, #1472
    Fri 09 Jul 2004 02:11:15 PM UTCstefanuAssigned toNone=>stefanu
      Open/ClosedOpen=>Analyzed
    Thu 08 Jul 2004 02:52:15 PM UTCaxeldAttached File-=>Added bugfix_size_of_literal_index.diff, #1469
      Carbon-Copy-=>Added stefanu

    Back to the top


    Powered by Savane 3.1-cleanup1