| Index: runtime/vm/dart_api_message.cc
|
| diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc
|
| index 3624242d25aab309b5bec2ead99351ed60b64600..23fd0f7afb7ae19321d03c237a339bb6a0823fc6 100644
|
| --- a/runtime/vm/dart_api_message.cc
|
| +++ b/runtime/vm/dart_api_message.cc
|
| @@ -88,6 +88,19 @@ Dart_CObject* ApiMessageReader::AllocateDartCObjectInt64(int64_t val) {
|
| }
|
|
|
|
|
| +Dart_CObject* ApiMessageReader::AllocateDartCObjectBigint(intptr_t length) {
|
| + // Allocate a Dart_CObject structure followed by an array of chars
|
| + // for the bigint hex string content. The pointer to the bigint
|
| + // content is set up to this area.
|
| + Dart_CObject* value =
|
| + reinterpret_cast<Dart_CObject*>(
|
| + alloc_(NULL, 0, sizeof(Dart_CObject) + length + 1));
|
| + value->value.as_bigint = reinterpret_cast<char*>(value) + sizeof(*value);
|
| + value->type = Dart_CObject::kBigint;
|
| + return value;
|
| +}
|
| +
|
| +
|
| Dart_CObject* ApiMessageReader::AllocateDartCObjectDouble(double val) {
|
| Dart_CObject* value = AllocateDartCObject(Dart_CObject::kDouble);
|
| value->value.as_double = val;
|
| @@ -206,6 +219,18 @@ Dart_CObject* ApiMessageReader::ReadInlinedObject(intptr_t object_id) {
|
| }
|
| break;
|
| }
|
| + case ObjectStore::kBigintClass: {
|
| + // Read in the hex string representation of the bigint.
|
| + intptr_t len = ReadIntptrValue();
|
| + Dart_CObject* object = AllocateDartCObjectBigint(len);
|
| + char* p = object->value.as_bigint;
|
| + for (intptr_t i = 0; i < len; i++) {
|
| + p[i] = Read<uint8_t>();
|
| + }
|
| + p[len] = '\0';
|
| + return object;
|
| + break;
|
| + }
|
| case ObjectStore::kDoubleClass: {
|
| // Read the double value for the object.
|
| Dart_CObject* object = AllocateDartCObjectDouble(Read<double>());
|
|
|