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

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

Issue 9691005: Implement spawnFunction from the new isolate api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
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/isolate.h" 10 #include "vm/isolate.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 237
238 void Zone::VisitObjectPointers(ObjectPointerVisitor* visitor) { 238 void Zone::VisitObjectPointers(ObjectPointerVisitor* visitor) {
239 Zone* zone = this; 239 Zone* zone = this;
240 while (zone != NULL) { 240 while (zone != NULL) {
241 zone->handles()->VisitObjectPointers(visitor); 241 zone->handles()->VisitObjectPointers(visitor);
242 zone = zone->previous_; 242 zone = zone->previous_;
243 } 243 }
244 } 244 }
245 245
246
247 char* Zone::PrintToString(const char* format, ...) {
248 va_list args;
249 va_start(args, format);
250 intptr_t len = OS::VSNPrint(NULL, 0, format, args);
251 va_end(args);
252
253 char* buffer = reinterpret_cast<char*>(Allocate(len + 1));
254 va_list args2;
255 va_start(args2, format);
256 OS::VSNPrint(buffer, (len + 1), format, args2);
257 va_end(args2);
258
259 return buffer;
260 }
261
262
246 } // namespace dart 263 } // namespace dart
OLDNEW
« lib/isolate/isolate_api.dart ('K') | « runtime/vm/zone.h ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698