Yeah. Switches will behave the same as cascading if statements.

On Wed, Dec 11, 2013 at 1:41 PM, Vyacheslav Egorov <[email protected]>wrote:

> DBQ: Am I right in assuming that this will also fix
> https://code.google.com/p/v8/issues/detail?id=2684 ?
>
> Vyacheslav Egorov
>
>
> On Wed, Dec 11, 2013 at 1:21 PM, <[email protected]> wrote:
>
>> On 2013/12/11 11:58:46, Jakob wrote:
>>
>>> On 2013/12/11 11:35:26, rossberg wrote:
>>> > Yes, I assumed as much. Though I still wonder why we have to change the
>>>
>> types
>>
>>> to
>>> > Any at all then.
>>>
>>
>>  Because Type::None()->Is(Type::Receiver()) but not
>>> Type::Any()->Is(Type::Receiver()).
>>>
>>
>>  In the future, I think this logic should move into the (to-be written)
>>>
>> function
>>
>>> that returns the definitive type for an expression based on its bounds. I
>>>
>> think
>>
>>> it'll come quite naturally if we implement it roughly like:
>>>
>>
>>  Handle<Type> Expression::GetTypeForHydrogen(bool* want_soft_deopt) {
>>>    // If we have optimistic type information, use it.
>>>    if (!bounds().lower()->Is(Type::None())) return bounds().lower;
>>>    // Otherwise fall back to pessimistic mode.
>>>    if (Type::Any()->Is(bounds().upper)) *want_soft_deopt = true;
>>>    return bounds().upper;
>>> }
>>>
>>
>> Yes, right. (Though this function should better be named
>> ChooseType-something.)
>>
>>
>>
>> https://codereview.chromium.org/111573003/
>>
>> --
>> --
>> v8-dev mailing list
>> [email protected]
>> http://groups.google.com/group/v8-dev
>> ---You received this message because you are subscribed to the Google
>> Groups "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to