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

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

Issue 23072026: fix cpp11 compile errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/compiler_stats.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return Api::NewError("%s expects argument '%s' to be non-null.", \ 79 return Api::NewError("%s expects argument '%s' to be non-null.", \
80 CURRENT_FUNC, #parameter); 80 CURRENT_FUNC, #parameter);
81 81
82 82
83 #define CHECK_LENGTH(length, max_elements) \ 83 #define CHECK_LENGTH(length, max_elements) \
84 do { \ 84 do { \
85 intptr_t len = (length); \ 85 intptr_t len = (length); \
86 intptr_t max = (max_elements); \ 86 intptr_t max = (max_elements); \
87 if (len < 0 || len > max) { \ 87 if (len < 0 || len > max) { \
88 return Api::NewError( \ 88 return Api::NewError( \
89 "%s expects argument '%s' to be in the range [0..%"Pd"].", \ 89 "%s expects argument '%s' to be in the range [0..%" Pd "].", \
90 CURRENT_FUNC, #length, max); \ 90 CURRENT_FUNC, #length, max); \
91 } \ 91 } \
92 } while (0) 92 } while (0)
93 93
94 94
95 class Api : AllStatic { 95 class Api : AllStatic {
96 public: 96 public:
97 // Creates a new local handle. 97 // Creates a new local handle.
98 static Dart_Handle NewHandle(Isolate* isolate, RawObject* raw); 98 static Dart_Handle NewHandle(Isolate* isolate, RawObject* raw);
99 99
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (isolate->no_callback_scope_depth() != 0) { \ 249 if (isolate->no_callback_scope_depth() != 0) { \
250 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 250 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
251 } \ 251 } \
252 252
253 #define ASSERT_CALLBACK_STATE(isolate) \ 253 #define ASSERT_CALLBACK_STATE(isolate) \
254 ASSERT(isolate->no_callback_scope_depth() == 0) 254 ASSERT(isolate->no_callback_scope_depth() == 0)
255 255
256 } // namespace dart. 256 } // namespace dart.
257 257
258 #endif // VM_DART_API_IMPL_H_ 258 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698