| Index: src/types.cc
|
| diff --git a/src/types.cc b/src/types.cc
|
| index 22a108b7206b0bd657ae57e90af4c20a11770190..0d2615b02d2a17bcc271a0411be7afd4dbeb3ec5 100644
|
| --- a/src/types.cc
|
| +++ b/src/types.cc
|
| @@ -455,4 +455,13 @@ Type* Type::Optional(Handle<Type> type) {
|
| : Union(type, Undefined()->handle_via_isolate_of(*type));
|
| }
|
|
|
| +
|
| +Representation Representation::FromType(Handle<Type> type) {
|
| + if (type->Is(Type::None())) return Representation::None();
|
| + if (type->Is(Type::Integer32())) return Representation::Integer32();
|
| + if (type->Is(Type::Number())) return Representation::Double();
|
| + return Representation::Tagged();
|
| +}
|
| +
|
| +
|
| } } // namespace v8::internal
|
|
|