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

Side by Side Diff: runtime/vm/dart_api_impl.h

Issue 8761007: Stop using void* types in the dart embedding api. (Closed) Base URL: http://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 | « runtime/vm/dart.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 VM_DART_API_IMPL_H_ 5 #ifndef VM_DART_API_IMPL_H_
6 #define VM_DART_API_IMPL_H_ 6 #define VM_DART_API_IMPL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 10
(...skipping 24 matching lines...) Expand all
35 #undef DECLARE_UNWRAP 35 #undef DECLARE_UNWRAP
36 36
37 // Validates and converts the passed in handle as a local handle. 37 // Validates and converts the passed in handle as a local handle.
38 static LocalHandle* UnwrapAsLocalHandle(const ApiState& state, 38 static LocalHandle* UnwrapAsLocalHandle(const ApiState& state,
39 Dart_Handle object); 39 Dart_Handle object);
40 40
41 // Validates and converts the passed in handle as a persistent handle. 41 // Validates and converts the passed in handle as a persistent handle.
42 static PersistentHandle* UnwrapAsPersistentHandle(const ApiState& state, 42 static PersistentHandle* UnwrapAsPersistentHandle(const ApiState& state,
43 Dart_Handle object); 43 Dart_Handle object);
44 44
45 // Cast the internal Isolate* type to the external Dart_Isolate type.
46 static Dart_Isolate CastIsolate(Isolate* isolate);
47
48 // Cast a message byte array to the external Dart_Message type.
49 static Dart_Message CastMessage(uint8_t* message);
50
45 // Gets the handle used to designate successful return. 51 // Gets the handle used to designate successful return.
46 static Dart_Handle Success(); 52 static Dart_Handle Success();
47 53
48 // Generates a handle used to designate an error return. 54 // Generates a handle used to designate an error return.
49 static Dart_Handle Error(const char* format, ...); 55 static Dart_Handle Error(const char* format, ...);
50 56
51 // Generates an error handle from an unhandled exception. 57 // Generates an error handle from an unhandled exception.
52 static Dart_Handle ErrorFromException(const Object& obj); 58 static Dart_Handle ErrorFromException(const Object& obj);
53 59
54 // Gets a handle to Null. 60 // Gets a handle to Null.
55 static Dart_Handle Null(); 61 static Dart_Handle Null();
56 62
57 // Gets a handle to True. 63 // Gets a handle to True.
58 static Dart_Handle True(); 64 static Dart_Handle True();
59 65
60 // Gets a handle to False 66 // Gets a handle to False
61 static Dart_Handle False(); 67 static Dart_Handle False();
62 68
63 // Allocates space in the local zone. 69 // Allocates space in the local zone.
64 static uword Allocate(intptr_t size); 70 static uword Allocate(intptr_t size);
65 71
66 // Reallocates space in the local zone. 72 // Reallocates space in the local zone.
67 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); 73 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size);
68 }; 74 };
69 75
70 } // namespace dart. 76 } // namespace dart.
71 77
72 #endif // VM_DART_API_IMPL_H_ 78 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698