Chromium Code Reviews| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 | 666 |
| 667 /** | 667 /** |
| 668 * Exits a scope. | 668 * Exits a scope. |
| 669 * | 669 * |
| 670 * The previous scope (if any) becomes the current scope. | 670 * The previous scope (if any) becomes the current scope. |
| 671 * | 671 * |
| 672 * Requires there to be a current isolate. | 672 * Requires there to be a current isolate. |
| 673 */ | 673 */ |
| 674 DART_EXPORT void Dart_ExitScope(); | 674 DART_EXPORT void Dart_ExitScope(); |
| 675 | 675 |
| 676 /** | |
| 677 * The Dart VM uses "zone allocation" for temporary structures. Zones | |
|
turnidge
2012/02/17 19:27:52
We should probably change the word zone to scope i
| |
| 678 * support very fast allocation of small chunks of memory. The chunks | |
| 679 * cannot be deallocated individually, but instead zones support | |
| 680 * deallocating all chunks in one fast operation. | |
| 681 * | |
| 682 * This function makes it possible for the embedder to allocate | |
| 683 * temporary data in the VMs zone allocator. | |
| 684 * | |
| 685 * Zone allocation is possible: | |
| 686 * 1. when inside a scope where local handles can be allocated | |
| 687 * 2. when processing a message from a native port in a native port | |
| 688 * handler | |
| 689 * | |
| 690 * All the memory allocated this way will be reclaimed either on the | |
| 691 * next call to Dart_ExitScope or when the native port handler exits. | |
| 692 * | |
| 693 * \param size Size of the memory to allocate. | |
| 694 * | |
| 695 * \return A pointer to the allocated memory. NULL if allocation | |
| 696 * failed. Failure might due to is no current VM zone. | |
| 697 */ | |
| 698 DART_EXPORT uint8_t* Dart_ScopeAllocate(intptr_t size); | |
| 699 | |
| 676 // --- Objects ---- | 700 // --- Objects ---- |
| 677 | 701 |
| 678 /** | 702 /** |
| 679 * Returns the null object. | 703 * Returns the null object. |
| 680 * | 704 * |
| 681 * Requires there to be a current isolate. | 705 * Requires there to be a current isolate. |
| 682 * | 706 * |
| 683 * \return A handle to the null object. | 707 * \return A handle to the null object. |
| 684 */ | 708 */ |
| 685 DART_EXPORT Dart_Handle Dart_Null(); | 709 DART_EXPORT Dart_Handle Dart_Null(); |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1804 | 1828 |
| 1805 // --- Profiling support ---- | 1829 // --- Profiling support ---- |
| 1806 | 1830 |
| 1807 // External pprof support for gathering and dumping symbolic | 1831 // External pprof support for gathering and dumping symbolic |
| 1808 // information that can be used for better profile reports for | 1832 // information that can be used for better profile reports for |
| 1809 // dynamically generated code. | 1833 // dynamically generated code. |
| 1810 DART_EXPORT void Dart_InitPprofSupport(); | 1834 DART_EXPORT void Dart_InitPprofSupport(); |
| 1811 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1835 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1812 | 1836 |
| 1813 #endif // INCLUDE_DART_API_H_ | 1837 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |