| OLD | NEW |
| 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 |
| 11 * web applications. This reference describes the Dart embedding api, | 11 * web applications. This reference describes the Dart embedding api, |
| 12 * which is used to embed the Dart Virtual Machine within an | 12 * which is used to embed the Dart Virtual Machine within an |
| 13 * application. | 13 * application. |
| 14 * | 14 * |
| 15 * This reference is generated from the header include/dart_api.h. | 15 * This reference is generated from the header include/dart_api.h. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 #ifdef __cplusplus | 18 #ifdef __cplusplus |
| 19 #define DART_EXTERN_C extern "C" | 19 #define DART_EXTERN_C extern "C" |
| 20 #else | 20 #else |
| 21 #define DART_EXTERN_C | 21 #define DART_EXTERN_C |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to |
| 25 // enable platform independent printf format specifiers. |
| 26 #ifndef __STDC_FORMAT_MACROS |
| 27 #define __STDC_FORMAT_MACROS |
| 28 #endif |
| 29 |
| 24 #if defined(__CYGWIN__) | 30 #if defined(__CYGWIN__) |
| 25 #error Tool chain and platform not supported. | 31 #error Tool chain and platform not supported. |
| 26 #elif defined(_WIN32) | 32 #elif defined(_WIN32) |
| 27 typedef signed __int8 int8_t; | 33 typedef signed __int8 int8_t; |
| 28 typedef signed __int16 int16_t; | 34 typedef signed __int16 int16_t; |
| 29 typedef signed __int32 int32_t; | 35 typedef signed __int32 int32_t; |
| 30 typedef signed __int64 int64_t; | 36 typedef signed __int64 int64_t; |
| 31 typedef unsigned __int8 uint8_t; | 37 typedef unsigned __int8 uint8_t; |
| 32 typedef unsigned __int16 uint16_t; | 38 typedef unsigned __int16 uint16_t; |
| 33 typedef unsigned __int32 uint32_t; | 39 typedef unsigned __int32 uint32_t; |
| 34 typedef unsigned __int64 uint64_t; | 40 typedef unsigned __int64 uint64_t; |
| 35 #if defined(DART_SHARED_LIB) | 41 #if defined(DART_SHARED_LIB) |
| 36 #define DART_EXPORT DART_EXTERN_C __declspec(dllexport) | 42 #define DART_EXPORT DART_EXTERN_C __declspec(dllexport) |
| 37 #else | 43 #else |
| 38 #define DART_EXPORT DART_EXTERN_C | 44 #define DART_EXPORT DART_EXTERN_C |
| 39 #endif | 45 #endif |
| 40 #else | 46 #else |
| 41 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to | |
| 42 // enable platform independent printf format specifiers. | |
| 43 #ifndef __STDC_FORMAT_MACROS | |
| 44 #define __STDC_FORMAT_MACROS | |
| 45 #endif | |
| 46 #include <inttypes.h> | 47 #include <inttypes.h> |
| 47 #include <stdbool.h> | 48 #include <stdbool.h> |
| 48 #if __GNUC__ >= 4 | 49 #if __GNUC__ >= 4 |
| 49 #if defined(DART_SHARED_LIB) | 50 #if defined(DART_SHARED_LIB) |
| 50 #define DART_EXPORT DART_EXTERN_C __attribute__ ((visibility("default"))) | 51 #define DART_EXPORT DART_EXTERN_C __attribute__ ((visibility("default"))) |
| 51 #else | 52 #else |
| 52 #define DART_EXPORT DART_EXTERN_C | 53 #define DART_EXPORT DART_EXTERN_C |
| 53 #endif | 54 #endif |
| 54 #else | 55 #else |
| 55 #error Tool chain not supported. | 56 #error Tool chain not supported. |
| (...skipping 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2611 | 2612 |
| 2612 typedef void (*Dart_FileWriterFunction)(const char* buffer, int64_t num_bytes); | 2613 typedef void (*Dart_FileWriterFunction)(const char* buffer, int64_t num_bytes); |
| 2613 | 2614 |
| 2614 // Support for generating symbol maps for use by the Linux perf tool. | 2615 // Support for generating symbol maps for use by the Linux perf tool. |
| 2615 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function); | 2616 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function); |
| 2616 | 2617 |
| 2617 // Support for generating flow graph compiler debugging output into a file. | 2618 // Support for generating flow graph compiler debugging output into a file. |
| 2618 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function); | 2619 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function); |
| 2619 | 2620 |
| 2620 #endif // INCLUDE_DART_API_H_ | 2621 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |