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

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

Issue 11040062: Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review changes Created 8 years, 2 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/runtime_entry.h » ('j') | 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/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/snapshot.h" 8 #include "vm/snapshot.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/visitor.h" 10 #include "vm/visitor.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 #define NEW_OBJECT(type) \ 14 #define NEW_OBJECT(type) \
15 ((kind == Snapshot::kFull) ? reader->New##type() : type::New()) 15 ((kind == Snapshot::kFull) ? reader->New##type() : type::New())
16 16
17 #define NEW_OBJECT_WITH_LEN(type, len) \ 17 #define NEW_OBJECT_WITH_LEN(type, len) \
18 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len)) 18 ((kind == Snapshot::kFull) ? reader->New##type(len) : type::New(len))
19 19
20 #define NEW_OBJECT_WITH_LEN_SPACE(type, len, kind) \ 20 #define NEW_OBJECT_WITH_LEN_SPACE(type, len, kind) \
21 ((kind == Snapshot::kFull) ? \ 21 ((kind == Snapshot::kFull) ? \
22 reader->New##type(len) : type::New(len, HEAP_SPACE(kind))) 22 reader->New##type(len) : type::New(len, HEAP_SPACE(kind)))
23 23
24 24
25 static uword BigintAllocator(intptr_t size) { 25 static uword BigintAllocator(intptr_t size) {
26 Zone* zone = Isolate::Current()->current_zone(); 26 StackZone* zone = Isolate::Current()->current_zone();
27 return zone->AllocUnsafe(size); 27 return zone->AllocUnsafe(size);
28 } 28 }
29 29
30 30
31 RawClass* Class::ReadFrom(SnapshotReader* reader, 31 RawClass* Class::ReadFrom(SnapshotReader* reader,
32 intptr_t object_id, 32 intptr_t object_id,
33 intptr_t tags, 33 intptr_t tags,
34 Snapshot::Kind kind) { 34 Snapshot::Kind kind) {
35 ASSERT(reader != NULL); 35 ASSERT(reader != NULL);
36 36
(...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 // Write out the class and tags information. 2328 // Write out the class and tags information.
2329 writer->WriteIndexedObject(kWeakPropertyCid); 2329 writer->WriteIndexedObject(kWeakPropertyCid);
2330 writer->WriteIntptrValue(writer->GetObjectTags(this)); 2330 writer->WriteIntptrValue(writer->GetObjectTags(this));
2331 2331
2332 // Write out all the other fields. 2332 // Write out all the other fields.
2333 writer->Write<RawObject*>(ptr()->key_); 2333 writer->Write<RawObject*>(ptr()->key_);
2334 writer->Write<RawObject*>(ptr()->value_); 2334 writer->Write<RawObject*>(ptr()->value_);
2335 } 2335 }
2336 2336
2337 } // namespace dart 2337 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/runtime_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698