Displaying 7 results from an estimated 7 matches for "do_something_cool".
2011 Jul 27
3
[LLVMdev] Proposal for better assertions in LLVM
wrapping the macro's body in:
do { ... } while (false)
would make the the macro a proper statement so that:
if (cond)
ASSERT(some_other_cond);
else
do_something_cool ();
compiles as expected.
IMO, it would work as such
#define ASSERT_STM(cond,expr)
On Tue, Jul 26, 2011 at 6:36 PM, Reid Kleckner <reid.kleckner at gmail.com>wrote:
> He wants to be able to resume execution from the debugger after
> assertion failure.
>
> Reid
>
> On T...
2011 Jul 27
0
[LLVMdev] Proposal for better assertions in LLVM
...)
On Tue, Jul 26, 2011 at 7:57 PM, Nathan Jeffords <blunted2night at gmail.com>wrote:
> wrapping the macro's body in:
>
> do { ... } while (false)
>
> would make the the macro a proper statement so that:
>
> if (cond)
> ASSERT(some_other_cond);
> else
> do_something_cool ();
>
> compiles as expected.
>
> IMO, it would work as such
>
> #define ASSERT_STM(cond,expr)
>
>
> On Tue, Jul 26, 2011 at 6:36 PM, Reid Kleckner <reid.kleckner at gmail.com>wrote:
>
>> He wants to be able to resume execution from the debugger after
>&...
2010 Apr 29
1
Setting a message on a model -without- errors.add_to_base
...ove into
observers) running on a few models. Based on what these callbacks do
to the data (it''s implementing business rules), I''d like to add some
type of message on the state of the model *without* invalidating it.
For example:
class Order < ActiveRecord::Base
after_save :do_something_cool
private
def do_something_cool
# manipulates the order object in some way based on business rules
errors.add_to_base("Message about what we did to your order to
match said business rules")
end
end
I''d prefer to do this without calling errors.add_to_base, because it...
2011 Jul 27
1
[LLVMdev] Proposal for better assertions in LLVM
...effords <blunted2night at gmail.com>wrote:
>
>> wrapping the macro's body in:
>>
>> do { ... } while (false)
>>
>> would make the the macro a proper statement so that:
>>
>> if (cond)
>> ASSERT(some_other_cond);
>> else
>> do_something_cool ();
>>
>> compiles as expected.
>>
>> IMO, it would work as such
>>
>> #define ASSERT_STM(cond,expr)
>>
>>
>> On Tue, Jul 26, 2011 at 6:36 PM, Reid Kleckner <reid.kleckner at gmail.com>wrote:
>>
>>> He wants to be able to re...
2011 Jul 27
2
[LLVMdev] Proposal for better assertions in LLVM
Hi-
> Yep, but tripping the debugger is highly non-portable.
You're suggesting that inline asm is more portable than calling abort?
Alistair
2011 Jul 27
0
[LLVMdev] Proposal for better assertions in LLVM
He wants to be able to resume execution from the debugger after
assertion failure.
Reid
On Tue, Jul 26, 2011 at 8:07 PM, Alistair Lynn <arplynn at gmail.com> wrote:
> Hi-
>
>> Yep, but tripping the debugger is highly non-portable.
>
> You're suggesting that inline asm is more portable than calling abort?
>
> Alistair
>
>
2011 Jul 27
5
[LLVMdev] Proposal for better assertions in LLVM
...effords <blunted2night at gmail.com>wrote:
>
>> wrapping the macro's body in:
>>
>> do { ... } while (false)
>>
>> would make the the macro a proper statement so that:
>>
>> if (cond)
>> ASSERT(some_other_cond);
>> else
>> do_something_cool ();
>>
>> compiles as expected.
>>
>> IMO, it would work as such
>>
>> #define ASSERT_STM(cond,expr)
>>
>>
>> On Tue, Jul 26, 2011 at 6:36 PM, Reid Kleckner <reid.kleckner at gmail.com>wrote:
>>
>>> He wants to be able to re...