| 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 |
| (...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1924 kCanonicalizeUrl | 1924 kCanonicalizeUrl |
| 1925 } Dart_LibraryTag; | 1925 } Dart_LibraryTag; |
| 1926 | 1926 |
| 1927 // TODO(turnidge): Document. | 1927 // TODO(turnidge): Document. |
| 1928 typedef Dart_Handle (*Dart_LibraryTagHandler)(Dart_LibraryTag tag, | 1928 typedef Dart_Handle (*Dart_LibraryTagHandler)(Dart_LibraryTag tag, |
| 1929 Dart_Handle library, | 1929 Dart_Handle library, |
| 1930 Dart_Handle url, | 1930 Dart_Handle url, |
| 1931 Dart_Handle import_map); | 1931 Dart_Handle import_map); |
| 1932 | 1932 |
| 1933 /** | 1933 /** |
| 1934 * Set library tag handler for the current isolate. This handler is used to | |
| 1935 * handle the various tags encountered while loading libraries or scripts in | |
| 1936 * the isolate. | |
| 1937 * | |
| 1938 * \param handler Handler code to be used for handling the various tags | |
| 1939 * encountered while loading libraries or scripts in the isolate. | |
| 1940 * | |
| 1941 * \return If no error occurs, the handler is set for the isolate. | |
| 1942 * Otherwise an error handle is returned. | |
| 1943 * | |
| 1944 * TODO(turnidge): Document. | |
| 1945 */ | |
| 1946 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( | |
| 1947 Dart_LibraryTagHandler handler); | |
| 1948 | |
| 1949 /** | |
| 1950 * Loads the root script for the current isolate. | 1934 * Loads the root script for the current isolate. |
| 1951 * | 1935 * |
| 1952 * TODO(turnidge): Document. | 1936 * TODO(turnidge): Document. |
| 1953 */ | 1937 */ |
| 1954 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 1938 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
| 1955 Dart_Handle source, | 1939 Dart_Handle source, |
| 1940 Dart_LibraryTagHandler handler, |
| 1956 Dart_Handle import_map); | 1941 Dart_Handle import_map); |
| 1957 | 1942 |
| 1958 /** | 1943 /** |
| 1959 * Loads the root script for current isolate from a snapshot. | 1944 * Loads the root script for current isolate from a snapshot. |
| 1960 * | 1945 * |
| 1961 * \param buffer A buffer which contains a snapshot of the script. | 1946 * \param buffer A buffer which contains a snapshot of the script. |
| 1962 * | 1947 * |
| 1963 * \return If no error occurs, the Library object corresponding to the root | 1948 * \return If no error occurs, the Library object corresponding to the root |
| 1964 * script is returned. Otherwise an error handle is returned. | 1949 * script is returned. Otherwise an error handle is returned. |
| 1965 **/ | 1950 **/ |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 | 2007 |
| 2023 // --- Profiling support ---- | 2008 // --- Profiling support ---- |
| 2024 | 2009 |
| 2025 // External pprof support for gathering and dumping symbolic | 2010 // External pprof support for gathering and dumping symbolic |
| 2026 // information that can be used for better profile reports for | 2011 // information that can be used for better profile reports for |
| 2027 // dynamically generated code. | 2012 // dynamically generated code. |
| 2028 DART_EXPORT void Dart_InitPprofSupport(); | 2013 DART_EXPORT void Dart_InitPprofSupport(); |
| 2029 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 2014 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 2030 | 2015 |
| 2031 #endif // INCLUDE_DART_API_H_ | 2016 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |