Chromium Code Reviews| Index: runtime/vm/dart_entry.cc |
| diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc |
| index 880046533839020af52f698d5deacca0b02927ed..9e5e9327090981a69a6f0ef5967aa8ab4ffd2bf7 100644 |
| --- a/runtime/vm/dart_entry.cc |
| +++ b/runtime/vm/dart_entry.cc |
| @@ -509,6 +509,24 @@ RawObject* DartLibraryCalls::Equals(const Instance& left, |
| return result.raw(); |
| } |
| +// On success, returns a RawInstance. On failure, a RawError. |
| +RawObject* DartLibraryCalls::IdentityHashCode(const Instance& object) { |
| + const int kNumArguments = 1; |
| + Thread* thread = Thread::Current(); |
| + Zone* zone = thread->zone(); |
| + const Library& libcore = Library::Handle(zone, Library::CoreLibrary()); |
| + ASSERT(!libcore.IsNull()); |
| + const Function& function = Function::Handle( |
| + zone, libcore.LookupFunctionAllowPrivate(Symbols::identityHashCode())); |
| + ASSERT(!function.IsNull()); |
| + const Array& args = Array::Handle(Array::New(kNumArguments)); |
|
rmacnak
2017/07/19 01:00:24
Handle(zone,
alexmarkov
2017/07/19 17:54:19
Done.
|
| + args.SetAt(0, object); |
| + const Object& result = |
| + Object::Handle(DartEntry::InvokeFunction(function, args)); |
| + ASSERT(result.IsInstance() || result.IsError()); |
| + return result.raw(); |
| +} |
| + |
| RawObject* DartLibraryCalls::LookupHandler(Dart_Port port_id) { |
| Thread* thread = Thread::Current(); |
| Zone* zone = thread->zone(); |