Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: runtime/include/dart_api.h

Issue 8372094: Renaming Array -> List in the VM API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 * \param str A string. 750 * \param str A string.
751 * \param utf8 Returns the String represented as a utf8 encoded C 751 * \param utf8 Returns the String represented as a utf8 encoded C
752 * string. This C string is scope allocated and is only valid until 752 * string. This C string is scope allocated and is only valid until
753 * the next call to Dart_ExitScope. 753 * the next call to Dart_ExitScope.
754 * 754 *
755 * \return A valid handle if no error occurs during the operation. 755 * \return A valid handle if no error occurs during the operation.
756 */ 756 */
757 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, 757 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str,
758 const char** utf8); 758 const char** utf8);
759 759
760 // --- Arrays --- 760 // --- Lists ---
761 761
762 /** 762 /**
763 * Is this object an Array? 763 * Is this object a List?
764 */ 764 */
765 DART_EXPORT bool Dart_IsArray(Dart_Handle object); 765 DART_EXPORT bool Dart_IsList(Dart_Handle object);
766 // TODO(turnidge): Rename Array -> List.
767 766
768 /** 767 /**
769 * Returns an Array of the desired length. 768 * Returns a List of the desired length.
770 * 769 *
771 * \param length The length of the array. 770 * \param length The length of the list.
772 * 771 *
773 * \return The Array object if no errors occurs. Otherwise returns 772 * \return The List object if no errors occurs. Otherwise returns
774 * an invalid handle. 773 * an invalid handle.
775 */ 774 */
776 DART_EXPORT Dart_Handle Dart_NewArray(intptr_t length); 775 DART_EXPORT Dart_Handle Dart_NewList(intptr_t length);
777 // TODO(turnidge): Rename Array -> List.
778 776
779 /** 777 /**
780 * Gets the length of an Array. 778 * Gets the length of a List.
781 * 779 *
782 * \param array An Array. 780 * \param list A List.
783 * \param length Returns the length of the Array. 781 * \param length Returns the length of the List.
784 * 782 *
785 * \return A valid handle if no error occurs during the operation. 783 * \return A valid handle if no error occurs during the operation.
786 */ 784 */
787 DART_EXPORT Dart_Handle Dart_GetLength(Dart_Handle array, intptr_t* length); 785 DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* length);
788 // TODO(turnidge): Rename Array -> List.
789 786
790 /** 787 /**
791 * Gets the Object at some index of an Array. 788 * Gets the Object at some index of a List.
792 * 789 *
793 * If the index is out of bounds, an error occurs. 790 * If the index is out of bounds, an error occurs.
794 * 791 *
795 * \param array An Array. 792 * \param list A List.
796 * \param index A valid index into the Array. 793 * \param index A valid index into the List.
797 * 794 *
798 * \return The Object in the Array at the specified index if no errors 795 * \return The Object in the List at the specified index if no errors
799 * occurs. Otherwise returns an invalid handle. 796 * occurs. Otherwise returns an invalid handle.
800 */ 797 */
801 DART_EXPORT Dart_Handle Dart_ArrayGetAt(Dart_Handle array, 798 DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list,
802 intptr_t index); 799 intptr_t index);
803 // TODO(turnidge): Rename Array -> List.
804 800
805 /** 801 /**
806 * Sets the Object at some index of an Array. 802 * Sets the Object at some index of a List.
807 * 803 *
808 * If the index is out of bounds, an error occurs. 804 * If the index is out of bounds, an error occurs.
809 * 805 *
810 * \param array An Array. 806 * \param array A List.
811 * \param index A valid index into the Array. 807 * \param index A valid index into the List.
812 * \param value The Object to put in the Array. 808 * \param value The Object to put in the List.
813 * 809 *
814 * \return A valid handle if no error occurs during the operation. 810 * \return A valid handle if no error occurs during the operation.
815 */ 811 */
816 DART_EXPORT Dart_Handle Dart_ArraySetAt(Dart_Handle array, 812 DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list,
817 intptr_t index, 813 intptr_t index,
818 Dart_Handle value); 814 Dart_Handle value);
819 // TODO(turnidge): Rename Array -> List.
820 815
821 // TODO(turnidge): Figure out what this is for. 816 DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list,
822 DART_EXPORT Dart_Handle Dart_ArrayGet(Dart_Handle array, 817 intptr_t offset,
823 intptr_t offset, 818 uint8_t* native_array,
824 uint8_t* native_array, 819 intptr_t length);
825 intptr_t length);
826 820
827 // TODO(turnidge): Figure out what this is for. 821 DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
828 DART_EXPORT Dart_Handle Dart_ArraySet(Dart_Handle array, 822 intptr_t offset,
829 intptr_t offset, 823 uint8_t* native_array,
830 uint8_t* native_array, 824 intptr_t length);
831 intptr_t length);
832 825
833 // --- Closures --- 826 // --- Closures ---
834 827
835 /** 828 /**
836 * Is this object a Closure? 829 * Is this object a Closure?
837 */ 830 */
838 DART_EXPORT bool Dart_IsClosure(Dart_Handle object); 831 DART_EXPORT bool Dart_IsClosure(Dart_Handle object);
839 832
840 /** 833 /**
841 * Invokes a Closure with the given arguments. 834 * Invokes a Closure with the given arguments.
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1110
1118 // --- Profiling support ---- 1111 // --- Profiling support ----
1119 1112
1120 // External pprof support for gathering and dumping symbolic 1113 // External pprof support for gathering and dumping symbolic
1121 // information that can be used for better profile reports for 1114 // information that can be used for better profile reports for
1122 // dynamically generated code. 1115 // dynamically generated code.
1123 DART_EXPORT void Dart_InitPprofSupport(); 1116 DART_EXPORT void Dart_InitPprofSupport();
1124 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1117 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1125 1118
1126 #endif // INCLUDE_DART_API_H_ 1119 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698