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

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

Issue 546053002: - Refactor the way X.fromEnvironment is implemented. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/lib/string.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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) { 262 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) {
263 args->SetReturnUnsafe(Integer::New(retval)); 263 args->SetReturnUnsafe(Integer::New(retval));
264 } 264 }
265 static void SetDoubleReturnValue(NativeArguments* args, double retval) { 265 static void SetDoubleReturnValue(NativeArguments* args, double retval) {
266 args->SetReturnUnsafe(Double::New(retval)); 266 args->SetReturnUnsafe(Double::New(retval));
267 } 267 }
268 static void SetWeakHandleReturnValue(NativeArguments* args, 268 static void SetWeakHandleReturnValue(NativeArguments* args,
269 Dart_WeakPersistentHandle retval); 269 Dart_WeakPersistentHandle retval);
270 270
271 static RawString* CallEnvironmentCallback(Isolate*, const String& name);
srdjan 2014/09/08 18:12:03 Isolate* isolate,
Ivan Posva 2014/09/08 18:16:34 Done.
272
271 private: 273 private:
272 static Dart_Handle InitNewHandle(Isolate* isolate, RawObject* raw); 274 static Dart_Handle InitNewHandle(Isolate* isolate, RawObject* raw);
273 275
274 // Thread local key used by the API. Currently holds the current 276 // Thread local key used by the API. Currently holds the current
275 // ApiNativeScope if any. 277 // ApiNativeScope if any.
276 static ThreadLocalKey api_native_key_; 278 static ThreadLocalKey api_native_key_;
277 static Dart_Handle true_handle_; 279 static Dart_Handle true_handle_;
278 static Dart_Handle false_handle_; 280 static Dart_Handle false_handle_;
279 static Dart_Handle null_handle_; 281 static Dart_Handle null_handle_;
280 static Dart_Handle empty_string_handle_; 282 static Dart_Handle empty_string_handle_;
(...skipping 27 matching lines...) Expand all
308 if (isolate->no_callback_scope_depth() != 0) { \ 310 if (isolate->no_callback_scope_depth() != 0) { \
309 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 311 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
310 } \ 312 } \
311 313
312 #define ASSERT_CALLBACK_STATE(isolate) \ 314 #define ASSERT_CALLBACK_STATE(isolate) \
313 ASSERT(isolate->no_callback_scope_depth() == 0) 315 ASSERT(isolate->no_callback_scope_depth() == 0)
314 316
315 } // namespace dart. 317 } // namespace dart.
316 318
317 #endif // VM_DART_API_IMPL_H_ 319 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698