| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/port.h" | 5 #include "vm/port.h" |
| 6 | 6 |
| 7 #include "platform/utils.h" | 7 #include "platform/utils.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/message.h" | 10 #include "vm/message_handler.h" |
| 11 #include "vm/thread.h" | 11 #include "vm/thread.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 DECLARE_FLAG(bool, trace_isolates); | 15 DECLARE_FLAG(bool, trace_isolates); |
| 16 | 16 |
| 17 Mutex* PortMap::mutex_ = NULL; | 17 Mutex* PortMap::mutex_ = NULL; |
| 18 PortMap::Entry* PortMap::map_ = NULL; | 18 PortMap::Entry* PortMap::map_ = NULL; |
| 19 MessageHandler* PortMap::deleted_entry_ = reinterpret_cast<MessageHandler*>(1); | 19 MessageHandler* PortMap::deleted_entry_ = reinterpret_cast<MessageHandler*>(1); |
| 20 intptr_t PortMap::capacity_ = 0; | 20 intptr_t PortMap::capacity_ = 0; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // TODO(iposva): Verify whether we want to keep exponentially growing. | 224 // TODO(iposva): Verify whether we want to keep exponentially growing. |
| 225 ASSERT(Utils::IsPowerOfTwo(kInitialCapacity)); | 225 ASSERT(Utils::IsPowerOfTwo(kInitialCapacity)); |
| 226 map_ = new Entry[kInitialCapacity]; | 226 map_ = new Entry[kInitialCapacity]; |
| 227 memset(map_, 0, kInitialCapacity * sizeof(Entry)); | 227 memset(map_, 0, kInitialCapacity * sizeof(Entry)); |
| 228 capacity_ = kInitialCapacity; | 228 capacity_ = kInitialCapacity; |
| 229 used_ = 0; | 229 used_ = 0; |
| 230 deleted_ = 0; | 230 deleted_ = 0; |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace dart | 233 } // namespace dart |
| OLD | NEW |