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

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

Issue 10905251: Lazy peer API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months 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') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 2604 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
2605 2605
2606 typedef void (*Dart_FileWriterFunction)(const char* buffer, int64_t num_bytes); 2606 typedef void (*Dart_FileWriterFunction)(const char* buffer, int64_t num_bytes);
2607 2607
2608 // Support for generating symbol maps for use by the Linux perf tool. 2608 // Support for generating symbol maps for use by the Linux perf tool.
2609 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function); 2609 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function);
2610 2610
2611 // Support for generating flow graph compiler debugging output into a file. 2611 // Support for generating flow graph compiler debugging output into a file.
2612 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function); 2612 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function);
2613 2613
2614 // --- Peers ---
2615
2616 /**
cshapiro 2012/09/15 01:23:41 I will add a comment here that peers are intended
2617 * Every heap allocated object has a lazily allocated field known as
2618 * its peer.
siva 2012/09/14 00:03:46 Do we really want to allow peer fields for every h
cshapiro 2012/09/15 01:23:41 I have limited this to types which are not subtype
2619 */
2620
2621 /**
2622 * Returns the value of peer field in 'peer'. Sets 'peer' to NULL and
2623 * returns an error if the peer field has not been allocated.
siva 2012/09/14 00:03:46 Why do you return an error if there is no peer fie
cshapiro 2012/09/15 01:23:41 I am confused. You can use second form. The alte
2624 *
2625 * \param object A heap allocated object.
2626 * \param peer An out parameter that returns the value of the peer
2627 * field.
2628 *
2629 * \return Success if 'object' is heap allocated and has its peer
2630 * field allocated.
2631 */
2632 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer);
2633
2634 /**
2635 * Sets or replaces the value in the peer field of 'object'. If
2636 * 'peer' is NULL the peer field is deallocated.
siva 2012/09/14 00:03:46 I find the notion of deleting a peer field by call
cshapiro 2012/09/15 01:23:41 The peer field being deleted is an implementation
2637 *
2638 * \param object A heap allocated object.
2639 * \param peer A value to store in the peer field.
2640 *
2641 * \return Success if 'object' is heap allocated.
2642 */
2643 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2644
2645 /**
2646 * Returns true if object has its peer field set.
2647 */
2648 DART_EXPORT bool Dart_HasPeer(Dart_Handle object);
siva 2012/09/14 00:03:46 This call would not be needed if we go with the su
cshapiro 2012/09/15 01:23:41 It's gone. Done.
2649
2614 #endif // INCLUDE_DART_API_H_ 2650 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698