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

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

Issue 196443009: - First step in refactoring ports with the goal of moving (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « runtime/vm/custom_isolate_test.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/native_arguments.h" 9 #include "vm/native_arguments.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 #define RETURN_TYPE_ERROR(isolate, dart_handle, type) \ 77 #define RETURN_TYPE_ERROR(isolate, dart_handle, type) \
78 do { \ 78 do { \
79 const Object& tmp = \ 79 const Object& tmp = \
80 Object::Handle(isolate, Api::UnwrapHandle((dart_handle))); \ 80 Object::Handle(isolate, Api::UnwrapHandle((dart_handle))); \
81 if (tmp.IsNull()) { \ 81 if (tmp.IsNull()) { \
82 return Api::NewError("%s expects argument '%s' to be non-null.", \ 82 return Api::NewError("%s expects argument '%s' to be non-null.", \
83 CURRENT_FUNC, #dart_handle); \ 83 CURRENT_FUNC, #dart_handle); \
84 } else if (tmp.IsError()) { \ 84 } else if (tmp.IsError()) { \
85 return dart_handle; \ 85 return dart_handle; \
86 } else { \
87 return Api::NewError("%s expects argument '%s' to be of type %s.", \
88 CURRENT_FUNC, #dart_handle, #type); \
89 } \ 86 } \
87 return Api::NewError("%s expects argument '%s' to be of type %s.", \
88 CURRENT_FUNC, #dart_handle, #type); \
90 } while (0) 89 } while (0)
91 90
92 91
93 #define RETURN_NULL_ERROR(parameter) \ 92 #define RETURN_NULL_ERROR(parameter) \
94 return Api::NewError("%s expects argument '%s' to be non-null.", \ 93 return Api::NewError("%s expects argument '%s' to be non-null.", \
95 CURRENT_FUNC, #parameter); 94 CURRENT_FUNC, #parameter);
96 95
97 96
98 #define CHECK_LENGTH(length, max_elements) \ 97 #define CHECK_LENGTH(length, max_elements) \
99 do { \ 98 do { \
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 if (isolate->no_callback_scope_depth() != 0) { \ 279 if (isolate->no_callback_scope_depth() != 0) { \
281 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 280 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
282 } \ 281 } \
283 282
284 #define ASSERT_CALLBACK_STATE(isolate) \ 283 #define ASSERT_CALLBACK_STATE(isolate) \
285 ASSERT(isolate->no_callback_scope_depth() == 0) 284 ASSERT(isolate->no_callback_scope_depth() == 0)
286 285
287 } // namespace dart. 286 } // namespace dart.
288 287
289 #endif // VM_DART_API_IMPL_H_ 288 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/custom_isolate_test.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698