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

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

Issue 8528010: Changes to pass the current isolate to all runtime and native calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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
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 9
10 namespace dart { 10 namespace dart {
11 11
12 class ApiState; 12 class ApiState;
13 class LocalHandle; 13 class LocalHandle;
14 class Object; 14 class Object;
15 class PersistentHandle; 15 class PersistentHandle;
16 class RawObject; 16 class RawObject;
17 17
18
19 #define DARTSCOPE(isolate) \
20 ASSERT(isolate != NULL); \
21 Zone zone(isolate); \
22 HANDLESCOPE(isolate); \
23
18 class Api : AllStatic { 24 class Api : AllStatic {
19 public: 25 public:
20 // Creates a new local handle. 26 // Creates a new local handle.
21 static Dart_Handle NewLocalHandle(const Object& object); 27 static Dart_Handle NewLocalHandle(const Object& object);
22 28
23 // Unwraps the raw object from the handle. 29 // Unwraps the raw object from the handle.
24 static RawObject* UnwrapHandle(Dart_Handle object); 30 static RawObject* UnwrapHandle(Dart_Handle object);
25 31
26 // Validates and converts the passed in handle as a local handle. 32 // Validates and converts the passed in handle as a local handle.
27 static LocalHandle* UnwrapAsLocalHandle(const ApiState& state, 33 static LocalHandle* UnwrapAsLocalHandle(const ApiState& state,
(...skipping 21 matching lines...) Expand all
49 // Allocates space in the local zone. 55 // Allocates space in the local zone.
50 static uword Allocate(intptr_t size); 56 static uword Allocate(intptr_t size);
51 57
52 // Reallocates space in the local zone. 58 // Reallocates space in the local zone.
53 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); 59 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size);
54 }; 60 };
55 61
56 } // namespace dart. 62 } // namespace dart.
57 63
58 #endif // VM_DART_API_IMPL_H_ 64 #endif // VM_DART_API_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698