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

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

Issue 8888031: Use specialized unwrapping methods for reading Double and Bool values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « no previous file | 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 * \param value true or false. 707 * \param value true or false.
708 * 708 *
709 * \return The Boolean object if no error occurs. Otherwise returns 709 * \return The Boolean object if no error occurs. Otherwise returns
710 * an error handle. 710 * an error handle.
711 */ 711 */
712 DART_EXPORT Dart_Handle Dart_NewBoolean(bool value); 712 DART_EXPORT Dart_Handle Dart_NewBoolean(bool value);
713 713
714 /** 714 /**
715 * Gets the value of a Boolean 715 * Gets the value of a Boolean
716 * 716 *
717 * \param bool_object A Boolean 717 * \param boolean_obj A Boolean
718 * \param value Returns the value of the Boolean. 718 * \param value Returns the value of the Boolean.
719 * 719 *
720 * \return A valid handle if no error occurs during the operation. 720 * \return A valid handle if no error occurs during the operation.
721 */ 721 */
722 DART_EXPORT Dart_Handle Dart_BooleanValue(Dart_Handle bool_object, bool* value); 722 DART_EXPORT Dart_Handle Dart_BooleanValue(Dart_Handle boolean_obj, bool* value);
723 723
724 // --- Doubles --- 724 // --- Doubles ---
725 725
726 /** 726 /**
727 * Is this object a Double? 727 * Is this object a Double?
728 */ 728 */
729 DART_EXPORT bool Dart_IsDouble(Dart_Handle object); 729 DART_EXPORT bool Dart_IsDouble(Dart_Handle object);
730 730
731 /** 731 /**
732 * Returns a Double with the provided value. 732 * Returns a Double with the provided value.
733 * 733 *
734 * \param value A double. 734 * \param value A double.
735 * 735 *
736 * \return The Double object if no error occurs. Otherwise returns 736 * \return The Double object if no error occurs. Otherwise returns
737 * an error handle. 737 * an error handle.
738 */ 738 */
739 DART_EXPORT Dart_Handle Dart_NewDouble(double value); 739 DART_EXPORT Dart_Handle Dart_NewDouble(double value);
740 740
741 /** 741 /**
742 * Gets the value of a Double 742 * Gets the value of a Double
743 * 743 *
744 * \param bool_object A Double 744 * \param double_obj A Double
745 * \param value Returns the value of the Double. 745 * \param value Returns the value of the Double.
746 * 746 *
747 * \return A valid handle if no error occurs during the operation. 747 * \return A valid handle if no error occurs during the operation.
748 */ 748 */
749 DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle integer, double* result); 749 DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle double_obj, double* value);
750 750
751 // --- Strings --- 751 // --- Strings ---
752 752
753 /** 753 /**
754 * Is this object a String? 754 * Is this object a String?
755 */ 755 */
756 DART_EXPORT bool Dart_IsString(Dart_Handle object); 756 DART_EXPORT bool Dart_IsString(Dart_Handle object);
757 757
758 /** 758 /**
759 * Is this object a String whose codepoints all fit into 8 bits? 759 * Is this object a String whose codepoints all fit into 8 bits?
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 1321
1322 // --- Profiling support ---- 1322 // --- Profiling support ----
1323 1323
1324 // External pprof support for gathering and dumping symbolic 1324 // External pprof support for gathering and dumping symbolic
1325 // information that can be used for better profile reports for 1325 // information that can be used for better profile reports for
1326 // dynamically generated code. 1326 // dynamically generated code.
1327 DART_EXPORT void Dart_InitPprofSupport(); 1327 DART_EXPORT void Dart_InitPprofSupport();
1328 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1328 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1329 1329
1330 #endif // INCLUDE_DART_API_H_ 1330 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698