[commit] r2441 - Get two loops in ALien marshalling consistent (albeit completely wrong).

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

[commit] r2441 - Get two loops in ALien marshalling consistent (albeit completely wrong).

commits-3
 
Author: eliot
Date: 2011-07-04 18:44:47 -0700 (Mon, 04 Jul 2011)
New Revision: 2441

Modified:
   trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
Log:
Get two loops in ALien marshalling consistent (albeit completely wrong).


Modified: trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
===================================================================
--- trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h 2011-07-05 01:44:26 UTC (rev 2440)
+++ trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h 2011-07-05 01:44:47 UTC (rev 2441)
@@ -18,7 +18,7 @@
 
 #if STACKVM /* Need to access args downwards from first arg */
   if (numArgs < 0)
- for (i = size = 0; --i > numArgs;) {
+ for (i = size = 0; --i >= numArgs;) {
  sqInt arg = argVector[i];
  if (objIsAlien(arg) && sizeField(arg))
  size += moduloPOT(sizeof(long),abs(sizeField(arg)));
@@ -57,7 +57,7 @@
 
 #if STACKVM /* Need to access args downwards from first arg */
   if (numArgs < 0)
- for (i = size = 0; --i > numArgs;) {
+ for (i = size = 0; --i >= numArgs;) {
  sqInt arg = argVector[i];
  if (isSmallInt(arg)) {
  *(long *)argvec = intVal(arg);

Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2441 - Get two loops in ALien marshalling consistent (albeit completely wrong).

Bert Freudenberg


On 05.07.2011, at 03:44, [hidden email] wrote:

>
> Author: eliot
> Date: 2011-07-04 18:44:47 -0700 (Mon, 04 Jul 2011)
> New Revision: 2441
>
> Modified:
>   trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
> Log:
> Get two loops in ALien marshalling consistent (albeit completely wrong).

Are you applying for the obfuscated-snippet-of-the-week award? ;)

> Modified: trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
> ===================================================================
> --- trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h 2011-07-05 01:44:26 UTC (rev 2440)
> +++ trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h 2011-07-05 01:44:47 UTC (rev 2441)
> @@ -18,7 +18,7 @@
>
> #if STACKVM /* Need to access args downwards from first arg */
>   if (numArgs < 0)
> - for (i = size = 0; --i > numArgs;) {
> + for (i = size = 0; --i >= numArgs;) {
> sqInt arg = argVector[i];
> if (objIsAlien(arg) && sizeField(arg))
> size += moduloPOT(sizeof(long),abs(sizeField(arg)));
> @@ -57,7 +57,7 @@
>
> #if STACKVM /* Need to access args downwards from first arg */
>   if (numArgs < 0)
> - for (i = size = 0; --i > numArgs;) {
> + for (i = size = 0; --i >= numArgs;) {
> sqInt arg = argVector[i];
> if (isSmallInt(arg)) {
> *(long *)argvec = intVal(arg);
>

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2441 - Get two loops in ALien marshalling consistent (albeit completely wrong).

Eliot Miranda-2
 


On Tue, Jul 5, 2011 at 2:16 AM, Bert Freudenberg <[hidden email]> wrote:


On 05.07.2011, at 03:44, [hidden email] wrote:

>
> Author: eliot
> Date: 2011-07-04 18:44:47 -0700 (Mon, 04 Jul 2011)
> New Revision: 2441
>
> Modified:
>   trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
> Log:
> Get two loops in ALien marshalling consistent (albeit completely wrong).

Are you applying for the obfuscated-snippet-of-the-week award? ;)

<blush>As unwitting winner many times before there's little point in my reapplying :(  But I hope I've finally got it right in r2442...</blush> :)
 

> Modified: trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
> ===================================================================
> --- trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h        2011-07-05 01:44:26 UTC (rev 2440)
> +++ trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h        2011-07-05 01:44:47 UTC (rev 2441)
> @@ -18,7 +18,7 @@
>
> #if STACKVM /* Need to access args downwards from first arg */
>   if (numArgs < 0)
> -     for (i = size = 0; --i > numArgs;) {
> +     for (i = size = 0; --i >= numArgs;) {
>               sqInt arg = argVector[i];
>               if (objIsAlien(arg) && sizeField(arg))
>                       size += moduloPOT(sizeof(long),abs(sizeField(arg)));
> @@ -57,7 +57,7 @@
>
> #if STACKVM /* Need to access args downwards from first arg */
>   if (numArgs < 0)
> -     for (i = size = 0; --i > numArgs;) {
> +     for (i = size = 0; --i >= numArgs;) {
>               sqInt arg = argVector[i];
>               if (isSmallInt(arg)) {
>                       *(long *)argvec = intVal(arg);
>

- Bert -





--
best,
Eliot

Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2441 - Get two loops in ALien marshalling consistent (albeit completely wrong).

Igor Stasenko

On 5 July 2011 19:30, Eliot Miranda <[hidden email]> wrote:

>
>
>
> On Tue, Jul 5, 2011 at 2:16 AM, Bert Freudenberg <[hidden email]> wrote:
>>
>>
>> On 05.07.2011, at 03:44, [hidden email] wrote:
>>
>> >
>> > Author: eliot
>> > Date: 2011-07-04 18:44:47 -0700 (Mon, 04 Jul 2011)
>> > New Revision: 2441
>> >
>> > Modified:
>> >   trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
>> > Log:
>> > Get two loops in ALien marshalling consistent (albeit completely wrong).
>>
>> Are you applying for the obfuscated-snippet-of-the-week award? ;)
>
> <blush>As unwitting winner many times before there's little point in my reapplying :(  But I hope I've finally got it right in r2442...</blush> :)
>

a good bug is one which is fixed at the end.
I can imagine, marchalling code tends to be smelly and complex so its
easy to make mistakes.

>>
>> > Modified: trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
>> > ===================================================================
>> > --- trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h        2011-07-05 01:44:26 UTC (rev 2440)
>> > +++ trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h        2011-07-05 01:44:47 UTC (rev 2441)
>> > @@ -18,7 +18,7 @@
>> >
>> > #if STACKVM /* Need to access args downwards from first arg */
>> >   if (numArgs < 0)
>> > -     for (i = size = 0; --i > numArgs;) {
>> > +     for (i = size = 0; --i >= numArgs;) {
>> >               sqInt arg = argVector[i];
>> >               if (objIsAlien(arg) && sizeField(arg))
>> >                       size += moduloPOT(sizeof(long),abs(sizeField(arg)));
>> > @@ -57,7 +57,7 @@
>> >
>> > #if STACKVM /* Need to access args downwards from first arg */
>> >   if (numArgs < 0)
>> > -     for (i = size = 0; --i > numArgs;) {
>> > +     for (i = size = 0; --i >= numArgs;) {
>> >               sqInt arg = argVector[i];
>> >               if (isSmallInt(arg)) {
>> >                       *(long *)argvec = intVal(arg);
>> >
>>
>> - Bert -
>>
>>
>
>
>
> --
> best,
> Eliot
>
>



--
Best regards,
Igor Stasenko AKA sig.