Chromium Code Reviews| Index: src/type-info.cc |
| diff --git a/src/type-info.cc b/src/type-info.cc |
| index ae5bf9719dc62524ba6aee564265b281aa57b8a0..37e2f2bad5cfbdcb1b26f45d5a6bf616aa68c367 100644 |
| --- a/src/type-info.cc |
| +++ b/src/type-info.cc |
| @@ -356,9 +356,11 @@ void TypeFeedbackOracle::CompareType(TypeFeedbackId id, |
| Handle<Type>* left_type, |
| Handle<Type>* right_type, |
| Handle<Type>* combined_type) { |
| - *left_type = *right_type = *combined_type = handle(Type::Any(), isolate_); |
| Handle<Object> info = GetInfo(id); |
| - if (!info->IsCode()) return; |
| + if (!info->IsCode()) { |
| + *left_type = *right_type = *combined_type = handle(Type::None(), isolate_); |
|
rossberg
2013/07/02 15:33:50
Can we add a comment here explaining why this can
Jakob Kummerow
2013/07/02 16:29:54
Done.
|
| + return; |
| + } |
| Handle<Code> code = Handle<Code>::cast(info); |
| Handle<Map> map; |
| @@ -387,7 +389,9 @@ void TypeFeedbackOracle::CompareType(TypeFeedbackId id, |
| Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) { |
| Handle<Object> object = GetInfo(id); |
| - if (!object->IsCode()) return handle(Type::Any(), isolate()); |
| + if (!object->IsCode()) { |
| + return handle(Type::None(), isolate()); |
| + } |
| Handle<Code> code = Handle<Code>::cast(object); |
| ASSERT(code->is_unary_op_stub()); |
| return UnaryOpIC::TypeInfoToType( |
| @@ -401,10 +405,12 @@ void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, |
| Handle<Type>* result, |
| Maybe<int>* fixed_right_arg) { |
| Handle<Object> object = GetInfo(id); |
| - *left = *right = *result = handle(Type::Any(), isolate_); |
| - if (!object->IsCode()) return; |
| + if (!object->IsCode()) { |
| + *left = *right = *result = handle(Type::None(), isolate_); |
|
rossberg
2013/07/02 15:33:50
Same here.
Jakob Kummerow
2013/07/02 16:29:54
Done.
|
| + return; |
| + } |
| Handle<Code> code = Handle<Code>::cast(object); |
| - if (!code->is_binary_op_stub()) return; |
| + ASSERT(code->is_binary_op_stub()); |
| int minor_key = code->stub_info(); |
| BinaryOpIC::StubInfoToType(minor_key, left, right, result, isolate()); |