Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: runtime/vm/snapshot.cc

Issue 9363023: Add support for big integers to the native message format (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from asiva@ Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 881613fa021114f22b5a60a970146eb1d84a072c..edaaa2b5c12d1a37c9dcc3801e3e2a35448554df 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -573,6 +573,20 @@ void MessageWriter::WriteCObject(Dart_CObject* object) {
case Dart_CObject::kInt64:
WriteInt64(object);
break;
+ case Dart_CObject::kBigint: {
+ // Write out the serialization header value for this object.
+ WriteInlinedHeader(object);
+ // Write out the class and tags information.
+ WriteObjectHeader(ObjectStore::kBigintClass, 0);
+ // Write hex string length and content
+ char* hex_string = object->value.as_bigint;
+ intptr_t len = strlen(hex_string);
+ WriteIntptrValue(len);
+ for (intptr_t i = 0; i < len; i++) {
+ Write<uint8_t>(hex_string[i]);
+ }
+ break;
+ }
case Dart_CObject::kDouble:
// Write out the serialization header value for this object.
WriteInlinedHeader(object);
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698