Chromium Code Reviews| 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 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
| |
| 1366 enum Type { | |
| 1367 kNull, | |
| 1368 kBool, | |
| 1369 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
| |
| 1370 kDouble, | |
| 1371 kString, | |
| 1372 kArray | |
| 1373 }; | |
| 1374 Type type; | |
| 1375 union { | |
| 1376 bool bl; | |
| 1377 int32_t int32; | |
| 1378 double dbl; | |
| 1379 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
| |
| 1380 struct { | |
| 1381 int len; | |
| 1382 Dart_Value** values; | |
| 1383 } array; | |
| 1384 } data; | |
| 1385 }; | |
| 1386 | |
| 1363 #endif // INCLUDE_DART_API_H_ | 1387 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |