Chromium Code Reviews| Index: runtime/include/dart_api.h |
| =================================================================== |
| --- runtime/include/dart_api.h (revision 1230) |
| +++ runtime/include/dart_api.h (working copy) |
| @@ -461,11 +461,10 @@ |
| * the conversion. If an error does occur, an invalid handle is |
| * returned. |
| */ |
| -DART_EXPORT Dart_Handle Dart_ObjectToString(Dart_Handle object); |
| -// TODO(turnidge): Consider shortening name to Dart_ToString. |
| +DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object); |
|
Ivan Posva
2011/11/07 23:10:45
Dart_ToString and Dart_IsSame are functions that s
turnidge
2011/11/07 23:35:19
Moved.
|
| /** |
| - * Returns true if the two objects are equal. |
| + * Checks if the two objects are equal. |
| * |
| * The result of the comparison is returned through the 'equal' |
| * parameter. The return value itself is used to indicate success or |
| @@ -477,14 +476,28 @@ |
| * |
| * \return A valid handle if no error occurs during the comparison. |
| */ |
| -DART_EXPORT Dart_Handle Dart_Objects_Equal(Dart_Handle obj1, |
| - Dart_Handle obj2, |
| - bool* equal); |
| -// TODO(turnidge): Consider renaming for consistency. Maybe just |
| -// Dart_Equals. |
| -// TODO(turnidge): Need to add identity equality function. |
| +DART_EXPORT Dart_Handle Dart_Equals(Dart_Handle obj1, |
|
Ivan Posva
2011/11/07 23:10:45
This should really be Dart_ObjectEquals to be cons
turnidge
2011/11/07 23:35:19
Done.
|
| + Dart_Handle obj2, |
| + bool* equal); |
| /** |
| + * Checks if the two objects are the same object |
| + * |
| + * The result of the comparison is returned through the 'identical' |
| + * parameter. The return value itself is used to indicate success or |
| + * failure, not identity. |
| + * |
| + * \param obj1 An object to be compared. |
| + * \param obj2 An object to be compared. |
| + * \param equal Returns the result of the equality comparison. |
| + * |
| + * \return A valid handle if no error occurs during the comparison. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_TripleEquals(Dart_Handle obj1, |
|
Ivan Posva
2011/11/07 23:10:45
Dart_IsSame as discussed offline.
turnidge
2011/11/07 23:35:19
Done.
|
| + Dart_Handle obj2, |
| + bool* identical); |
| + |
| +/** |
| * Is this object an instance of some type? |
| * |
| * The result of the test is returned through the 'instanceif' parameter. |
| @@ -496,9 +509,9 @@ |
| * |
| * \return A valid handle if no error occurs during the operation. |
| */ |
| -DART_EXPORT Dart_Handle Dart_IsInstanceOf(Dart_Handle object, |
| - Dart_Handle type, |
| - bool* instanceof); |
| +DART_EXPORT Dart_Handle Dart_IsType(Dart_Handle object, |
|
Ivan Posva
2011/11/07 23:10:45
Dart_ObjectIsType, again to be consistent.
turnidge
2011/11/07 23:35:19
Done.
|
| + Dart_Handle type, |
| + bool* instanceof); |
| // --- Numbers ---- |
| @@ -1011,9 +1024,8 @@ |
| * \return An invalid handle if the exception was not thrown. |
| * Otherwise the function does not return. |
| */ |
| -DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception, |
| +DART_EXPORT Dart_Handle Dart_RethrowException(Dart_Handle exception, |
| Dart_Handle stacktrace); |
| -// TODO(turnidge): ReThrow -> Rethrow. |
| // --- Native functions --- |