| Index: runtime/bin/dartutils.cc
|
| ===================================================================
|
| --- runtime/bin/dartutils.cc (revision 23447)
|
| +++ runtime/bin/dartutils.cc (working copy)
|
| @@ -876,7 +876,7 @@
|
| int32_t max = 0x3fffffff; // 1073741823
|
| ASSERT(min <= value && value < max);
|
| Dart_CObject object;
|
| - object.type = Dart_CObject::kInt32;
|
| + object.type = Dart_CObject_kInt32;
|
| object.value.as_int32 = value;
|
| return Dart_PostCObject(port_id, &object);
|
| }
|
| @@ -953,9 +953,9 @@
|
| // objects. As these will be used by different threads the use of
|
| // these depends on the fact that the marking internally in the
|
| // Dart_CObject structure is not marking simple value objects.
|
| -Dart_CObject CObject::api_null_ = { Dart_CObject::kNull , { 0 } };
|
| -Dart_CObject CObject::api_true_ = { Dart_CObject::kBool , { true } };
|
| -Dart_CObject CObject::api_false_ = { Dart_CObject::kBool, { false } };
|
| +Dart_CObject CObject::api_null_ = { Dart_CObject_kNull , { 0 } };
|
| +Dart_CObject CObject::api_true_ = { Dart_CObject_kBool , { true } };
|
| +Dart_CObject CObject::api_false_ = { Dart_CObject_kBool, { false } };
|
| CObject CObject::null_ = CObject(&api_null_);
|
| CObject CObject::true_ = CObject(&api_true_);
|
| CObject CObject::false_ = CObject(&api_false_);
|
| @@ -981,7 +981,7 @@
|
| }
|
|
|
|
|
| -Dart_CObject* CObject::New(Dart_CObject::Type type, int additional_bytes) {
|
| +Dart_CObject* CObject::New(Dart_CObject_Type type, int additional_bytes) {
|
| Dart_CObject* cobject = reinterpret_cast<Dart_CObject*>(
|
| Dart_ScopeAllocate(sizeof(Dart_CObject) + additional_bytes));
|
| cobject->type = type;
|
| @@ -990,14 +990,14 @@
|
|
|
|
|
| Dart_CObject* CObject::NewInt32(int32_t value) {
|
| - Dart_CObject* cobject = New(Dart_CObject::kInt32);
|
| + Dart_CObject* cobject = New(Dart_CObject_kInt32);
|
| cobject->value.as_int32 = value;
|
| return cobject;
|
| }
|
|
|
|
|
| Dart_CObject* CObject::NewInt64(int64_t value) {
|
| - Dart_CObject* cobject = New(Dart_CObject::kInt64);
|
| + Dart_CObject* cobject = New(Dart_CObject_kInt64);
|
| cobject->value.as_int64 = value;
|
| return cobject;
|
| }
|
| @@ -1005,21 +1005,21 @@
|
|
|
| Dart_CObject* CObject::NewIntptr(intptr_t value) {
|
| // Pointer values passed as intptr_t are always send as int64_t.
|
| - Dart_CObject* cobject = New(Dart_CObject::kInt64);
|
| + Dart_CObject* cobject = New(Dart_CObject_kInt64);
|
| cobject->value.as_int64 = value;
|
| return cobject;
|
| }
|
|
|
|
|
| Dart_CObject* CObject::NewDouble(double value) {
|
| - Dart_CObject* cobject = New(Dart_CObject::kDouble);
|
| + Dart_CObject* cobject = New(Dart_CObject_kDouble);
|
| cobject->value.as_double = value;
|
| return cobject;
|
| }
|
|
|
|
|
| Dart_CObject* CObject::NewString(int length) {
|
| - Dart_CObject* cobject = New(Dart_CObject::kString, length + 1);
|
| + Dart_CObject* cobject = New(Dart_CObject_kString, length + 1);
|
| cobject->value.as_string = reinterpret_cast<char*>(cobject + 1);
|
| return cobject;
|
| }
|
| @@ -1035,7 +1035,7 @@
|
|
|
| Dart_CObject* CObject::NewArray(int length) {
|
| Dart_CObject* cobject =
|
| - New(Dart_CObject::kArray, length * sizeof(Dart_CObject*)); // NOLINT
|
| + New(Dart_CObject_kArray, length * sizeof(Dart_CObject*)); // NOLINT
|
| cobject->value.as_array.length = length;
|
| cobject->value.as_array.values =
|
| reinterpret_cast<Dart_CObject**>(cobject + 1);
|
| @@ -1044,8 +1044,8 @@
|
|
|
|
|
| Dart_CObject* CObject::NewUint8Array(int length) {
|
| - Dart_CObject* cobject = New(Dart_CObject::kTypedData, length);
|
| - cobject->value.as_typed_data.type = Dart_CObject::kUint8Array;
|
| + Dart_CObject* cobject = New(Dart_CObject_kTypedData, length);
|
| + cobject->value.as_typed_data.type = Dart_TypedData_kUint8;
|
| cobject->value.as_typed_data.length = length;
|
| cobject->value.as_typed_data.values = reinterpret_cast<uint8_t*>(cobject + 1);
|
| return cobject;
|
| @@ -1055,8 +1055,8 @@
|
| Dart_CObject* CObject::NewExternalUint8Array(
|
| int64_t length, uint8_t* data, void* peer,
|
| Dart_WeakPersistentHandleFinalizer callback) {
|
| - Dart_CObject* cobject = New(Dart_CObject::kExternalTypedData);
|
| - cobject->value.as_external_typed_data.type = Dart_CObject::kUint8Array;
|
| + Dart_CObject* cobject = New(Dart_CObject_kExternalTypedData);
|
| + cobject->value.as_external_typed_data.type = Dart_TypedData_kUint8;
|
| cobject->value.as_external_typed_data.length = length;
|
| cobject->value.as_external_typed_data.data = data;
|
| cobject->value.as_external_typed_data.peer = peer;
|
| @@ -1072,7 +1072,7 @@
|
|
|
|
|
| void CObject::FreeIOBufferData(Dart_CObject* cobject) {
|
| - ASSERT(cobject->type == Dart_CObject::kExternalTypedData);
|
| + ASSERT(cobject->type == Dart_CObject_kExternalTypedData);
|
| cobject->value.as_external_typed_data.callback(
|
| NULL, cobject->value.as_external_typed_data.peer);
|
| cobject->value.as_external_typed_data.data = NULL;
|
|
|