| OLD | NEW |
| 1 // Copyright (c) 2011, 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 |
| 11 * web applications. This reference describes the Dart embedding api, | 11 * web applications. This reference describes the Dart embedding api, |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? | 1353 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? |
| 1354 | 1354 |
| 1355 // --- Profiling support ---- | 1355 // --- Profiling support ---- |
| 1356 | 1356 |
| 1357 // External pprof support for gathering and dumping symbolic | 1357 // External pprof support for gathering and dumping symbolic |
| 1358 // information that can be used for better profile reports for | 1358 // information that can be used for better profile reports for |
| 1359 // dynamically generated code. | 1359 // dynamically generated code. |
| 1360 DART_EXPORT void Dart_InitPprofSupport(); | 1360 DART_EXPORT void Dart_InitPprofSupport(); |
| 1361 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1361 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1362 | 1362 |
| 1363 // --- Message encoding/decoding ---- |
| 1364 |
| 1365 /** |
| 1366 * A Dart_CObject is used for representing Dart objects as native C |
| 1367 * data outside the Dart heap. These objects are totally detached from |
| 1368 * the Dart heap. Only a subset of the Dart objects have a |
| 1369 * representation as a Dart_CObject. |
| 1370 */ |
| 1371 struct Dart_CObject { |
| 1372 enum Type { |
| 1373 kNull, |
| 1374 kBool, |
| 1375 kInt32, |
| 1376 kDouble, |
| 1377 kString, |
| 1378 kArray |
| 1379 }; |
| 1380 Type type; |
| 1381 union { |
| 1382 bool as_bool; |
| 1383 int32_t as_int32; |
| 1384 double as_double; |
| 1385 char* as_string; |
| 1386 struct { |
| 1387 int length; |
| 1388 Dart_CObject** values; |
| 1389 } as_array; |
| 1390 } value; |
| 1391 }; |
| 1392 |
| 1393 /** |
| 1394 * A Dart_CMessage is used for encoding and decoding messages from native code. |
| 1395 */ |
| 1396 struct Dart_CMessage { |
| 1397 Dart_CObject** message; |
| 1398 }; |
| 1399 |
| 1363 #endif // INCLUDE_DART_API_H_ | 1400 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |