| Index: runtime/vm/dart_api_state.h
|
| diff --git a/runtime/vm/dart_api_state.h b/runtime/vm/dart_api_state.h
|
| index b222449b79960f9592741a0e203fcdaf2118e7c8..71b4524dad9e3bd2d36babd7ff1de56a0449932c 100644
|
| --- a/runtime/vm/dart_api_state.h
|
| +++ b/runtime/vm/dart_api_state.h
|
| @@ -121,7 +121,6 @@ class ApiZone {
|
| DISALLOW_COPY_AND_ASSIGN(ApiZone);
|
| };
|
|
|
| -
|
| // Implementation of local handles which are handed out from every
|
| // dart API call, these handles are valid only in the present scope
|
| // and are destroyed when a Dart_ExitScope() is called.
|
| @@ -143,12 +142,10 @@ class LocalHandle {
|
| DISALLOW_COPY_AND_ASSIGN(LocalHandle);
|
| };
|
|
|
| -
|
| // A distinguished callback which indicates that a persistent handle
|
| // should not be deleted from the dart api.
|
| void ProtectedHandleCallback(void* peer);
|
|
|
| -
|
| // Implementation of persistent handles which are handed out through the
|
| // dart API.
|
| class PersistentHandle {
|
| @@ -187,7 +184,6 @@ class PersistentHandle {
|
| DISALLOW_COPY_AND_ASSIGN(PersistentHandle);
|
| };
|
|
|
| -
|
| // Implementation of persistent handles which are handed out through the
|
| // dart API.
|
| class FinalizablePersistentHandle {
|
| @@ -338,7 +334,6 @@ class FinalizablePersistentHandle {
|
| DISALLOW_COPY_AND_ASSIGN(FinalizablePersistentHandle);
|
| };
|
|
|
| -
|
| // Local handles repository structure.
|
| static const int kLocalHandleSizeInWords = sizeof(LocalHandle) / kWordSize;
|
| static const int kLocalHandlesPerChunk = 64;
|
| @@ -365,7 +360,6 @@ class LocalHandles : Handles<kLocalHandleSizeInWords,
|
| }
|
| }
|
|
|
| -
|
| // Visit all object pointers stored in the various handles.
|
| void VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| Handles<kLocalHandleSizeInWords, kLocalHandlesPerChunk,
|
| @@ -397,7 +391,6 @@ class LocalHandles : Handles<kLocalHandleSizeInWords,
|
| DISALLOW_COPY_AND_ASSIGN(LocalHandles);
|
| };
|
|
|
| -
|
| // Persistent handles repository structure.
|
| static const int kPersistentHandleSizeInWords =
|
| sizeof(PersistentHandle) / kWordSize;
|
| @@ -486,7 +479,6 @@ class PersistentHandles : Handles<kPersistentHandleSizeInWords,
|
| DISALLOW_COPY_AND_ASSIGN(PersistentHandles);
|
| };
|
|
|
| -
|
| // Finalizable persistent handles repository structure.
|
| static const int kFinalizablePersistentHandleSizeInWords =
|
| sizeof(FinalizablePersistentHandle) / kWordSize;
|
| @@ -502,9 +494,7 @@ class FinalizablePersistentHandles
|
| kFinalizablePersistentHandlesPerChunk,
|
| kOffsetOfRawPtrInFinalizablePersistentHandle>(),
|
| free_list_(NULL) {}
|
| - ~FinalizablePersistentHandles() {
|
| - free_list_ = NULL;
|
| - }
|
| + ~FinalizablePersistentHandles() { free_list_ = NULL; }
|
|
|
| // Accessors.
|
| FinalizablePersistentHandle* free_list() const { return free_list_; }
|
| @@ -571,7 +561,6 @@ class FinalizablePersistentHandles
|
| DISALLOW_COPY_AND_ASSIGN(FinalizablePersistentHandles);
|
| };
|
|
|
| -
|
| // Structure used for the implementation of local scopes used in dart_api.
|
| // These local scopes manage handles and memory allocated in the scope.
|
| class ApiLocalScope {
|
| @@ -611,7 +600,6 @@ class ApiLocalScope {
|
| DISALLOW_COPY_AND_ASSIGN(ApiLocalScope);
|
| };
|
|
|
| -
|
| class ApiNativeScope {
|
| public:
|
| ApiNativeScope() {
|
| @@ -662,7 +650,6 @@ class ApiNativeScope {
|
| ApiZone zone_;
|
| };
|
|
|
| -
|
| // Api growable arrays use a zone for allocation. The constructor
|
| // picks the zone from the current isolate if in an isolate
|
| // environment. When outside an isolate environment it picks the zone
|
| @@ -681,7 +668,6 @@ class ApiGrowableArray : public BaseGrowableArray<T, ValueObject, Zone> {
|
| : BaseGrowableArray<T, ValueObject, Zone>(initial_capacity, zone) {}
|
| };
|
|
|
| -
|
| // Implementation of the API State used in dart api for maintaining
|
| // local scopes, persistent handles etc. These are setup on a per isolate
|
| // basis and destroyed when the isolate is shutdown.
|
| @@ -792,7 +778,6 @@ class ApiState {
|
| DISALLOW_COPY_AND_ASSIGN(ApiState);
|
| };
|
|
|
| -
|
| inline FinalizablePersistentHandle* FinalizablePersistentHandle::New(
|
| Isolate* isolate,
|
| const Object& object,
|
|
|