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

Side by Side Diff: runtime/include/dart_api.h

Issue 9159066: Allocate a Dart_CMessage structure when decoding a message into C structures (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/snapshot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef INCLUDE_DART_API_H_ 5 #ifndef INCLUDE_DART_API_H_
6 #define INCLUDE_DART_API_H_ 6 #define INCLUDE_DART_API_H_
7 7
8 /** \mainpage Dart Embedding API Reference 8 /** \mainpage Dart Embedding API Reference
9 * 9 *
10 * Dart is a class-based programming language for creating structured 10 * Dart is a class-based programming language for creating structured
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? 1399 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver?
1400 1400
1401 // --- Profiling support ---- 1401 // --- Profiling support ----
1402 1402
1403 // External pprof support for gathering and dumping symbolic 1403 // External pprof support for gathering and dumping symbolic
1404 // information that can be used for better profile reports for 1404 // information that can be used for better profile reports for
1405 // dynamically generated code. 1405 // dynamically generated code.
1406 DART_EXPORT void Dart_InitPprofSupport(); 1406 DART_EXPORT void Dart_InitPprofSupport();
1407 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1407 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1408 1408
1409 // --- Message encoding/decoding ---- 1409 // --- Message sending/receiving from native code ----
1410 1410
1411 /** 1411 /**
1412 * A Dart_CObject is used for representing Dart objects as native C 1412 * A Dart_CObject is used for representing Dart objects as native C
1413 * data outside the Dart heap. These objects are totally detached from 1413 * data outside the Dart heap. These objects are totally detached from
1414 * the Dart heap. Only a subset of the Dart objects have a 1414 * the Dart heap. Only a subset of the Dart objects have a
1415 * representation as a Dart_CObject. 1415 * representation as a Dart_CObject.
1416 */ 1416 */
1417 struct Dart_CObject { 1417 struct Dart_CObject {
1418 enum Type { 1418 enum Type {
1419 kNull = 0, 1419 kNull = 0,
(...skipping 11 matching lines...) Expand all
1431 double as_double; 1431 double as_double;
1432 char* as_string; 1432 char* as_string;
1433 struct { 1433 struct {
1434 int length; 1434 int length;
1435 Dart_CObject** values; 1435 Dart_CObject** values;
1436 } as_array; 1436 } as_array;
1437 } value; 1437 } value;
1438 }; 1438 };
1439 1439
1440 /** 1440 /**
1441 * A Dart_CMessage is used for encoding and decoding messages from native code. 1441 * A Dart_CMessage is used for receiving and sending messages from
1442 * native code not running in an isolate. A message contains an object
1443 * graph represented as Dart_CObject structures rooted as the provided
1444 * root.
1445 *
1446 * For information on the lifetime of this data, when provided in
1447 * callbacks, see the documentation for the individual callbacks.
1442 */ 1448 */
1443 struct Dart_CMessage { 1449 struct Dart_CMessage {
1444 Dart_CObject** message; 1450 Dart_CObject* root;
1445 }; 1451 };
1446 1452
1453
1447 #endif // INCLUDE_DART_API_H_ 1454 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698