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

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

Issue 850183005: Introduce simple Thread class to support gradual refactoring of interfaces. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« runtime/vm/zone.h ('K') | « runtime/vm/zone.h ('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 #include "vm/zone.h" 5 #include "vm/zone.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/handles_impl.h" 10 #include "vm/handles_impl.h"
11 #include "vm/heap.h" 11 #include "vm/heap.h"
12 #include "vm/isolate.h" 12 #include "vm/isolate.h"
13 #include "vm/os.h" 13 #include "vm/os.h"
14 #include "vm/thread.h"
14 15
15 namespace dart { 16 namespace dart {
16 17
17 DEFINE_DEBUG_FLAG(bool, trace_zones, 18 DEFINE_DEBUG_FLAG(bool, trace_zones,
18 false, "Traces allocation sizes in the zone."); 19 false, "Traces allocation sizes in the zone.");
19 20
20 21
21 // Zone segments represent chunks of memory: They have starting 22 // Zone segments represent chunks of memory: They have starting
22 // address encoded in the this pointer and a size in bytes. They are 23 // address encoded in the this pointer and a size in bytes. They are
23 // chained together to form the backing storage for an expanding zone. 24 // chained together to form the backing storage for an expanding zone.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 char* buffer = Alloc<char>(len + 1); 210 char* buffer = Alloc<char>(len + 1);
210 va_list args2; 211 va_list args2;
211 va_start(args2, format); 212 va_start(args2, format);
212 OS::VSNPrint(buffer, (len + 1), format, args2); 213 OS::VSNPrint(buffer, (len + 1), format, args2);
213 va_end(args2); 214 va_end(args2);
214 215
215 return buffer; 216 return buffer;
216 } 217 }
217 218
218 219
220 Zone* Zone::Current() {
221 return Thread::Current()->current_zone();
222 }
223
219 } // namespace dart 224 } // namespace dart
OLDNEW
« runtime/vm/zone.h ('K') | « runtime/vm/zone.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698