Chromium Code Reviews| Index: runtime/lib/object.cc |
| =================================================================== |
| --- runtime/lib/object.cc (revision 12980) |
| +++ runtime/lib/object.cc (working copy) |
| @@ -55,4 +55,17 @@ |
| return Object::null(); |
| } |
| + |
| +DEFINE_NATIVE_ENTRY(Object_runtimeType, 1) { |
| + const Instance& instance = Instance::CheckedHandle(arguments->At(0)); |
| + const Type& type = Type::Handle(instance.GetType()); |
| + return type.Canonicalize(); |
| +} |
| + |
| + |
| +DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { |
| + const AbstractType& type = AbstractType::CheckedHandle(arguments->At(0)); |
| + return type.Name(); |
|
regis
2012/09/27 21:12:40
You may consider returning UserVisibleName() inste
Ivan Posva
2012/09/27 21:25:12
I specifically chose Name and not UserVisibleName
|
| +} |
| + |
| } // namespace dart |