OLD | NEW |
---|---|
1 // Copyright (c) 2011, 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 "platform/utils.h" |
6 | |
7 #include "vm/dart_api_impl.h" | 6 #include "vm/dart_api_impl.h" |
8 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
8 #include "vm/port.h" | |
Mads Ager (chromium)
2012/01/13 15:10:09
Move back?
Søren Gjesse
2012/01/16 10:53:00
Done.
| |
9 #include "vm/thread.h" | 9 #include "vm/thread.h" |
10 #include "vm/utils.h" | |
11 | 10 |
12 namespace dart { | 11 namespace dart { |
13 | 12 |
14 | 13 |
15 Mutex* PortMap::mutex_ = NULL; | 14 Mutex* PortMap::mutex_ = NULL; |
16 | 15 |
17 PortMap::Entry* PortMap::map_ = NULL; | 16 PortMap::Entry* PortMap::map_ = NULL; |
18 Isolate* PortMap::deleted_entry_ = reinterpret_cast<Isolate*>(1); | 17 Isolate* PortMap::deleted_entry_ = reinterpret_cast<Isolate*>(1); |
19 intptr_t PortMap::capacity_ = 0; | 18 intptr_t PortMap::capacity_ = 0; |
20 intptr_t PortMap::used_ = 0; | 19 intptr_t PortMap::used_ = 0; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 ASSERT(Utils::IsPowerOfTwo(kInitialCapacity)); | 232 ASSERT(Utils::IsPowerOfTwo(kInitialCapacity)); |
234 map_ = new Entry[kInitialCapacity]; | 233 map_ = new Entry[kInitialCapacity]; |
235 memset(map_, 0, kInitialCapacity * sizeof(Entry)); | 234 memset(map_, 0, kInitialCapacity * sizeof(Entry)); |
236 capacity_ = kInitialCapacity; | 235 capacity_ = kInitialCapacity; |
237 used_ = 0; | 236 used_ = 0; |
238 deleted_ = 0; | 237 deleted_ = 0; |
239 } | 238 } |
240 | 239 |
241 | 240 |
242 } // namespace dart | 241 } // namespace dart |
OLD | NEW |