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

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

Issue 8585049: Add an interface for retrieving the value of unsigned 64-bit integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor consistency changes. 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 | « runtime/bin/dartutils.cc ('k') | runtime/vm/bigint_operations.h » ('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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 * 624 *
625 * \param integer An integer. 625 * \param integer An integer.
626 * \param fits Returns true if the integer fits into a 64-bit signed integer. 626 * \param fits Returns true if the integer fits into a 64-bit signed integer.
627 * 627 *
628 * \return A valid handle if no error occurs during the operation. 628 * \return A valid handle if no error occurs during the operation.
629 */ 629 */
630 DART_EXPORT Dart_Handle Dart_IntegerFitsIntoInt64(Dart_Handle integer, 630 DART_EXPORT Dart_Handle Dart_IntegerFitsIntoInt64(Dart_Handle integer,
631 bool* fits); 631 bool* fits);
632 632
633 /** 633 /**
634 * Does this Integer fit into a 64-bit unsigned integer?
635 *
636 * \param integer An integer.
637 * \param fits Returns true if the integer fits into a 64-bit unsigned integer.
638 *
639 * \return A valid handle if no error occurs during the operation.
640 */
641 DART_EXPORT Dart_Handle Dart_IntegerFitsIntoUint64(Dart_Handle integer,
642 bool* fits);
643
644 /**
634 * Returns an Integer with the provided value. 645 * Returns an Integer with the provided value.
635 * 646 *
636 * \param value The value of the integer. 647 * \param value The value of the integer.
637 * 648 *
638 * \return The Integer object if no error occurs. Otherwise returns 649 * \return The Integer object if no error occurs. Otherwise returns
639 * an error handle. 650 * an error handle.
640 */ 651 */
641 DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value); 652 DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value);
642 653
643 /** 654 /**
(...skipping 10 matching lines...) Expand all
654 /** 665 /**
655 * Gets the value of an Integer. 666 * Gets the value of an Integer.
656 * 667 *
657 * The integer must fit into a 64-bit signed integer, otherwise an error occurs. 668 * The integer must fit into a 64-bit signed integer, otherwise an error occurs.
658 * 669 *
659 * \param integer An Integer. 670 * \param integer An Integer.
660 * \param value Returns the value of the Integer. 671 * \param value Returns the value of the Integer.
661 * 672 *
662 * \return A valid handle if no error occurs during the operation. 673 * \return A valid handle if no error occurs during the operation.
663 */ 674 */
664 DART_EXPORT Dart_Handle Dart_IntegerValue(Dart_Handle integer, int64_t* value); 675 DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer,
676 int64_t* value);
677
678 /**
679 * Gets the value of an Integer.
680 *
681 * The integer must fit into a 64-bit unsigned integer, otherwise an
682 * error occurs.
683 *
684 * \param integer An Integer.
685 * \param value Returns the value of the Integer.
686 *
687 * \return A valid handle if no error occurs during the operation.
688 */
689 DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer,
690 uint64_t* value);
665 691
666 /** 692 /**
667 * Gets the value of an integer as a hexadecimal C string. 693 * Gets the value of an integer as a hexadecimal C string.
668 * 694 *
669 * \param integer An Integer. 695 * \param integer An Integer.
670 * \param value Returns the value of the Integer as a hexadecimal C 696 * \param value Returns the value of the Integer as a hexadecimal C
671 * string. This C string is scope allocated and is only valid until 697 * string. This C string is scope allocated and is only valid until
672 * the next call to Dart_ExitScope. 698 * the next call to Dart_ExitScope.
673 * 699 *
674 * \return A valid handle if no error occurs during the operation. 700 * \return A valid handle if no error occurs during the operation.
675 */ 701 */
676 DART_EXPORT Dart_Handle Dart_IntegerValueHexCString(Dart_Handle integer, 702 DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer,
677 const char** value); 703 const char** value);
678 704
679 // --- Booleans ---- 705 // --- Booleans ----
680 706
681 /** 707 /**
682 * Returns the True object. 708 * Returns the True object.
683 * 709 *
684 * Requires there to be a current isolate. 710 * Requires there to be a current isolate.
685 * 711 *
686 * \return A handle to the True object. 712 * \return A handle to the True object.
687 */ 713 */
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 1347
1322 // --- Profiling support ---- 1348 // --- Profiling support ----
1323 1349
1324 // External pprof support for gathering and dumping symbolic 1350 // External pprof support for gathering and dumping symbolic
1325 // information that can be used for better profile reports for 1351 // information that can be used for better profile reports for
1326 // dynamically generated code. 1352 // dynamically generated code.
1327 DART_EXPORT void Dart_InitPprofSupport(); 1353 DART_EXPORT void Dart_InitPprofSupport();
1328 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1354 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1329 1355
1330 #endif // INCLUDE_DART_API_H_ 1356 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/bigint_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698