Package patch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Package patch

MrGwen
Hello,

here is the first version of the patch for adding <dir name="...">
support in package.xml.

example:

   <filein>compiler/initialization/SystemInitialization.st</filein>
   <filein>compiler/type/Extensions.st</filein>
   ...

becomes:


<dir name="compiler">
   <filein>...</filein>
  </dir>

Comments are welcome

Gwen

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

dir.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Package patch

Paolo Bonzini-2
Il 10/07/2012 10:32, Gwenaël Casaccio ha scritto:

> Hello,
>
> here is the first version of the patch for adding <dir name="...">
> support in package.xml.
>
> example:
>
>   <filein>compiler/initialization/SystemInitialization.st</filein>
>   <filein>compiler/type/Extensions.st</filein>
>   ...
>
> becomes:
>
>
> <dir name="compiler">
>   <filein>...</filein>
>  </dir>
>
> Comments are welcome

I sent some coding style comments offlist (because you sent it first
only to me), but in general it looks promising.

Thanks!

Paolo



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Package patch

MrGwen
On 10/07/2012 10:36, Paolo Bonzini wrote:

> Il 10/07/2012 10:32, Gwenaël Casaccio ha scritto:
>> Hello,
>>
>> here is the first version of the patch for adding <dir name="...">
>> support in package.xml.
>>
>> example:
>>
>>    <filein>compiler/initialization/SystemInitialization.st</filein>
>>    <filein>compiler/type/Extensions.st</filein>
>>    ...
>>
>> becomes:
>>
>>
>> <dir name="compiler">
>>    <filein>...</filein>
>>   </dir>
>>
>> Comments are welcome
> I sent some coding style comments offlist (because you sent it first
> only to me), but in general it looks promising.
>
> Thanks!
>
> Paolo
>
>
Here is the new iteration, there is one issue with the bytecode checker:
jump skips extension bytecode
If I comment self checkTagIfInPath: tag. it works

Gwen



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

dir.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Package patch

Paolo Bonzini-2
Il 10/07/2012 16:26, Gwenaël Casaccio ha scritto:
>>
> Here is the new iteration, there is one issue with the bytecode checker:
> jump skips extension bytecode
> If I comment self checkTagIfInPath: tag. it works

Fixed like this:

diff --git a/libgst/opt.c b/libgst/opt.c
index ef75763..d37780f 100644
--- a/libgst/opt.c
+++ b/libgst/opt.c
@@ -412,11 +412,16 @@ search_block (const PTR a, const PTR b)
 int
 compute_jump_length (int ofs)
 {
-  if (ofs > -256 && ofs < 256)
+  /* The offset is counted from the end of the bytecode and the result of
+     compute_jump_length is subtracted when computing the jump offset (the
+     the jump offset increases in absolute value when jumping back).  This
+     means the actual range for backwards jumps is a little less than 2^8k
+     bytes, while for forwards jumps it is a little more than 2^8k bytes.  */
+  if (ofs > -254 && ofs < 258)
     return 2;
-  else if (ofs > -65536 && ofs < 65536)
+  else if (ofs > -65532 && ofs < 65540)
     return 4;
-  else if (ofs > -16777216 && ofs < 16777216)
+  else if (ofs > -16777210 && ofs < 16777222)
     return 6;
   else
     return 8;

The parsing of the attributes is a bit fragile, I'll rewrite that and commit
the patch.  Thanks!

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk