OLD | NEW |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 ASSERT(__temp_isolate__ != NULL); \ | 55 ASSERT(__temp_isolate__ != NULL); \ |
56 Zone zone(__temp_isolate__); \ | 56 Zone zone(__temp_isolate__); \ |
57 HANDLESCOPE(__temp_isolate__); | 57 HANDLESCOPE(__temp_isolate__); |
58 | 58 |
59 #define DARTSCOPE(isolate) \ | 59 #define DARTSCOPE(isolate) \ |
60 Isolate* __temp_isolate__ = (isolate); \ | 60 Isolate* __temp_isolate__ = (isolate); \ |
61 CHECK_ISOLATE_SCOPE(__temp_isolate__); \ | 61 CHECK_ISOLATE_SCOPE(__temp_isolate__); \ |
62 Zone zone(__temp_isolate__); \ | 62 Zone zone(__temp_isolate__); \ |
63 HANDLESCOPE(__temp_isolate__); | 63 HANDLESCOPE(__temp_isolate__); |
64 | 64 |
| 65 |
| 66 const char* CheckIsolateState(Isolate *isolate, |
| 67 bool generating_snapshot = false); |
| 68 |
| 69 void SetupErrorResult(Dart_Handle* handle); |
| 70 |
| 71 |
65 class Api : AllStatic { | 72 class Api : AllStatic { |
66 public: | 73 public: |
67 // Creates a new local handle. | 74 // Creates a new local handle. |
68 static Dart_Handle NewLocalHandle(const Object& object); | 75 static Dart_Handle NewLocalHandle(const Object& object); |
69 | 76 |
70 // Unwraps the raw object from the handle. | 77 // Unwraps the raw object from the handle. |
71 static RawObject* UnwrapHandle(Dart_Handle object); | 78 static RawObject* UnwrapHandle(Dart_Handle object); |
72 | 79 |
73 // Unwraps a raw Type from the handle. The handle will be null if | 80 // Unwraps a raw Type from the handle. The handle will be null if |
74 // the object was not of the requested Type. | 81 // the object was not of the requested Type. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // Allocates space in the local zone. | 119 // Allocates space in the local zone. |
113 static uword Allocate(intptr_t size); | 120 static uword Allocate(intptr_t size); |
114 | 121 |
115 // Reallocates space in the local zone. | 122 // Reallocates space in the local zone. |
116 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); | 123 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); |
117 }; | 124 }; |
118 | 125 |
119 } // namespace dart. | 126 } // namespace dart. |
120 | 127 |
121 #endif // VM_DART_API_IMPL_H_ | 128 #endif // VM_DART_API_IMPL_H_ |
OLD | NEW |