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

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

Issue 2083103002: Remove some uses of STL map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/vm/source_report.cc ('k') | no next file » | 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) 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 #ifndef VM_ZONE_H_ 5 #ifndef VM_ZONE_H_
6 #define VM_ZONE_H_ 6 #define VM_ZONE_H_
7 7
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/handles.h" 10 #include "vm/handles.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Structure for managing handles allocation. 169 // Structure for managing handles allocation.
170 VMHandles handles_; 170 VMHandles handles_;
171 171
172 // Used for chaining zones in order to allow unwinding of stacks. 172 // Used for chaining zones in order to allow unwinding of stacks.
173 Zone* previous_; 173 Zone* previous_;
174 174
175 friend class StackZone; 175 friend class StackZone;
176 friend class ApiZone; 176 friend class ApiZone;
177 template<typename T, typename B, typename Allocator> 177 template<typename T, typename B, typename Allocator>
178 friend class BaseGrowableArray; 178 friend class BaseGrowableArray;
179 template<typename T, typename B, typename Allocator>
180 friend class BaseDirectChainedHashMap;
179 DISALLOW_COPY_AND_ASSIGN(Zone); 181 DISALLOW_COPY_AND_ASSIGN(Zone);
180 }; 182 };
181 183
182 184
183 class StackZone : public StackResource { 185 class StackZone : public StackResource {
184 public: 186 public:
185 // Create an empty zone and set is at the current zone for the Thread. 187 // Create an empty zone and set is at the current zone for the Thread.
186 explicit StackZone(Thread* thread) : StackResource(thread), zone_() { 188 explicit StackZone(Thread* thread) : StackResource(thread), zone_() {
187 if (FLAG_trace_zones) { 189 if (FLAG_trace_zones) {
188 OS::PrintErr("*** Starting a new Stack zone 0x%" Px "(0x%" Px ")\n", 190 OS::PrintErr("*** Starting a new Stack zone 0x%" Px "(0x%" Px ")\n",
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 memmove(reinterpret_cast<void*>(new_data), 287 memmove(reinterpret_cast<void*>(new_data),
286 reinterpret_cast<void*>(old_data), 288 reinterpret_cast<void*>(old_data),
287 old_len * kElementSize); 289 old_len * kElementSize);
288 } 290 }
289 return new_data; 291 return new_data;
290 } 292 }
291 293
292 } // namespace dart 294 } // namespace dart
293 295
294 #endif // VM_ZONE_H_ 296 #endif // VM_ZONE_H_
OLDNEW
« no previous file with comments | « runtime/vm/source_report.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698