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

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

Issue 11028145: Changed StackZone and ApiZone to be containers for Zone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor tweak to use RawError instead of RawObject. 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/snapshot_test.cc » ('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 StackZone* zone = Isolate::Current()->current_zone(); 26 Zone* 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 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 // Write out the class and tags information. 2306 // Write out the class and tags information.
2307 writer->WriteIndexedObject(kWeakPropertyCid); 2307 writer->WriteIndexedObject(kWeakPropertyCid);
2308 writer->WriteIntptrValue(writer->GetObjectTags(this)); 2308 writer->WriteIntptrValue(writer->GetObjectTags(this));
2309 2309
2310 // Write out all the other fields. 2310 // Write out all the other fields.
2311 writer->Write<RawObject*>(ptr()->key_); 2311 writer->Write<RawObject*>(ptr()->key_);
2312 writer->Write<RawObject*>(ptr()->value_); 2312 writer->Write<RawObject*>(ptr()->value_);
2313 } 2313 }
2314 2314
2315 } // namespace dart 2315 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698