help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Fun/Crashes with newer GCC on Debian


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Fun/Crashes with newer GCC on Debian
Date: Sat, 12 Oct 2013 18:13:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 11/10/2013 15:08, Holger Hans Peter Freyther ha scritto:
> On Fri, Oct 11, 2013 at 08:08:57AM +0200, Holger Hans Peter Freyther wrote:
> 
>> pools.st:
>> UndefinedObject>>#executeStatements.
> 
> 
> diff --git a/libgst/gst-parse.c b/libgst/gst-parse.c
> index 1ad0512..91cb03a 100644
> --- a/libgst/gst-parse.c
> +++ b/libgst/gst-parse.c
> @@ -1961,7 +1961,10 @@ parse_compile_time_constant (gst_parser *p)
>  
>    return _gst_make_method (&location, loc(p, 0),
>                             NULL, temps, NULL, statements, NULL,
> -                           _gst_current_parser->currentClass,
> +                           IS_NIL(_gst_current_parser->currentClass)
> +                             ?
> +                               _gst_undefined_object_class :
> +                               _gst_current_parser->currentClass,
>                             _gst_nil_oop,
>                             false);
>  }
> 
>  [
>    ##(Exception printNl)
>  ]

compile_compile_time_constant always uses nil as the receiver.
I think you should:

(1) in parse_compile_time_constant, change the class to the metaclass
for _gst_current_parser->currentClass

(2) in compile_compile_time_constant, change the receiver to the
instance class of the method's class (aka METACLASS_INSTANCE).

> 
>> exceptions.st:
>>
>> NIL is casted to a method context in disable_non_unwind_contexts.
>> I have added this. Judging from the loop above this patch, I assume
>> that newContextOOP will in deed be NIL at the bottom of the stack.
>>
>> @@ -1232,13 +1232,15 @@ disable_non_unwind_contexts (OOP returnContextOOP)
>>      }
>>  
>>    /* Skip any disabled methods.  */
>> -  while UNCOMMON (CONTEXT_FLAGS (newContext)
>> -                  == (MCF_IS_METHOD_CONTEXT | MCF_IS_DISABLED_CONTEXT))
>> +  while UNCOMMON (/*!IS_NIL(newContextOOP) &&*/ (CONTEXT_FLAGS (newContext)
>> +                  == (MCF_IS_METHOD_CONTEXT | MCF_IS_DISABLED_CONTEXT)))
>>      {
>>        oldContext = newContext;
>>  
>>        /* Descend in the chain...  */
>>        newContextOOP = oldContext->parentContext;
>> +      if (IS_NIL(newContextOOP))
>> +       break;
> 
> 
> I need to return.. maybe return false? I don't know...

Yeah, return false and set *chain = _gst_nil_oop too.

Paolo

> 
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-smalltalk
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]