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

Unified Diff: runtime/include/dart_api.h

Issue 9235063: Implementation of message reader for converting a message snapshot into a C structure (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | runtime/vm/snapshot.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 1fc3f4e26902ed9ac4c475f8e3b0515973b04509..6e9be59cc82224bb5f0d85fce1856076d8921c63 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -1360,4 +1360,28 @@ DART_EXPORT Dart_Handle Dart_SetNativeResolver(
DART_EXPORT void Dart_InitPprofSupport();
DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
+// --- Message encoding/decoding ----
+
+struct Dart_Value {
turnidge 2012/01/26 19:48:30 I'm wondering about what to name this struct. Dar
Søren Gjesse 2012/01/27 14:40:03 The reason for the name Dart_Value is that it is j
+ enum Type {
+ kNull,
+ kBool,
+ kInt32,
siva 2012/01/27 01:56:52 We would need a kInt64 type too?
Søren Gjesse 2012/01/27 14:40:03 I think we do. I have only added the types needed
+ kDouble,
+ kString,
+ kArray
+ };
+ Type type;
+ union {
+ bool bl;
+ int32_t int32;
+ double dbl;
+ char* str;
turnidge 2012/01/26 19:48:30 I might prefer names like "bool_value", "int32_val
siva 2012/01/27 01:56:52 The code is going to look as follows: Data_Value m
Søren Gjesse 2012/01/27 14:40:03 Changed to value.asXXX as suggested by Siva.
Søren Gjesse 2012/01/27 14:40:03 I like the value.asXXX - used value.as_xxx to stic
+ struct {
+ int len;
+ Dart_Value** values;
+ } array;
+ } data;
+};
+
#endif // INCLUDE_DART_API_H_
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | runtime/vm/snapshot.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698