| Index: src/type-info.cc
|
| diff --git a/src/type-info.cc b/src/type-info.cc
|
| index 1e298452c1bf479e0bd2814f0120940e81704d3b..3a879511f569ef8d497ea81841ab8b3f0ae75ab8 100644
|
| --- a/src/type-info.cc
|
| +++ b/src/type-info.cc
|
| @@ -388,8 +388,7 @@ Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) {
|
| if (!object->IsCode()) return handle(Type::Any(), isolate());
|
| Handle<Code> code = Handle<Code>::cast(object);
|
| ASSERT(code->is_unary_op_stub());
|
| - return UnaryOpIC::TypeInfoToType(
|
| - static_cast<UnaryOpIC::TypeInfo>(code->unary_op_type()), isolate());
|
| + return UnaryOpStub(code->extra_ic_state()).GetType(isolate());
|
| }
|
|
|
|
|
| @@ -690,4 +689,16 @@ void TypeFeedbackOracle::SetInfo(TypeFeedbackId ast_id, Object* target) {
|
| #endif
|
| }
|
|
|
| +
|
| +Representation Representation::FromType(TypeInfo info) {
|
| + if (info.IsUninitialized()) return Representation::None();
|
| + // TODO(verwaest): Return Smi rather than Integer32.
|
| + if (info.IsSmi()) return Representation::Integer32();
|
| + if (info.IsInteger32()) return Representation::Integer32();
|
| + if (info.IsDouble()) return Representation::Double();
|
| + if (info.IsNumber()) return Representation::Double();
|
| + return Representation::Tagged();
|
| +}
|
| +
|
| +
|
| } } // namespace v8::internal
|
|
|