Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| =================================================================== |
| --- runtime/vm/dart_api_impl.cc (revision 1230) |
| +++ runtime/vm/dart_api_impl.cc (working copy) |
| @@ -432,7 +432,7 @@ |
| } |
| -DART_EXPORT Dart_Handle Dart_ObjectToString(Dart_Handle object) { |
| +DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object) { |
| Zone zone; // Setup a VM zone as we are creating some handles. |
| HandleScope scope; // Setup a VM handle scope. |
| const Object& obj = Object::Handle(Api::UnwrapHandle(object)); |
| @@ -493,8 +493,8 @@ |
| } |
| -DART_EXPORT Dart_Handle Dart_Objects_Equal(Dart_Handle obj1, Dart_Handle obj2, |
| - bool* value) { |
| +DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, Dart_Handle obj2, |
| + bool* value) { |
| Zone zone; // Setup a VM zone as we are creating some handles. |
| HandleScope scope; // Setup a VM handle scope. |
| const Instance& expected = Instance::CheckedHandle(Api::UnwrapHandle(obj1)); |
| @@ -512,6 +512,17 @@ |
| } |
| +DART_EXPORT Dart_Handle Dart_IsSame(Dart_Handle obj1, Dart_Handle obj2, |
|
Ivan Posva
2011/11/07 23:48:30
I am wondering whether this function should just r
turnidge
2011/11/10 20:30:58
We have been discussing returning an error handle
|
| + bool* value) { |
| + Zone zone; // Setup a VM zone as we are creating some handles. |
| + HandleScope scope; // Setup a VM handle scope. |
| + const Object& expected = Object::Handle(Api::UnwrapHandle(obj1)); |
| + const Object& actual = Object::Handle(Api::UnwrapHandle(obj2)); |
| + *value = (expected.raw() == actual.raw()); |
| + return Api::Success(); |
| +} |
| + |
| + |
| DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, Dart_Handle name) { |
| Zone zone; // Setup a VM zone as we are creating some handles. |
| HandleScope scope; // Setup a VM handle scope. |
| @@ -536,7 +547,7 @@ |
| // TODO(iposva): This call actually implements IsInstanceOfClass. |
| // Do we also need a real Dart_IsInstanceOf, which should take an instance |
| // rather than an object and a type rather than a class? |
| -DART_EXPORT Dart_Handle Dart_IsInstanceOf(Dart_Handle object, |
| +DART_EXPORT Dart_Handle Dart_ObjectIsType(Dart_Handle object, |
| Dart_Handle clazz, |
| bool* value) { |
| Zone zone; // Setup a VM zone as we are creating some handles. |