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

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

Issue 154393003: Implement eager instantiation and canonicalization of type arguments at run (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 : BaseReader(buffer, size), 148 : BaseReader(buffer, size),
149 kind_(kind), 149 kind_(kind),
150 isolate_(isolate), 150 isolate_(isolate),
151 cls_(Class::Handle()), 151 cls_(Class::Handle()),
152 obj_(Object::Handle()), 152 obj_(Object::Handle()),
153 array_(Array::Handle()), 153 array_(Array::Handle()),
154 field_(Field::Handle()), 154 field_(Field::Handle()),
155 str_(String::Handle()), 155 str_(String::Handle()),
156 library_(Library::Handle()), 156 library_(Library::Handle()),
157 type_(AbstractType::Handle()), 157 type_(AbstractType::Handle()),
158 type_arguments_(AbstractTypeArguments::Handle()), 158 type_arguments_(TypeArguments::Handle()),
159 tokens_(Array::Handle()), 159 tokens_(Array::Handle()),
160 stream_(TokenStream::Handle()), 160 stream_(TokenStream::Handle()),
161 data_(ExternalTypedData::Handle()), 161 data_(ExternalTypedData::Handle()),
162 error_(UnhandledException::Handle()), 162 error_(UnhandledException::Handle()),
163 backward_references_((kind == Snapshot::kFull) ? 163 backward_references_((kind == Snapshot::kFull) ?
164 kNumInitialReferencesInFullSnapshot : 164 kNumInitialReferencesInFullSnapshot :
165 kNumInitialReferences) { 165 kNumInitialReferences) {
166 } 166 }
167 167
168 168
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 ASSERT(library != Library::null()); 1354 ASSERT(library != Library::null());
1355 WriteObjectImpl(library->ptr()->url_); 1355 WriteObjectImpl(library->ptr()->url_);
1356 WriteObjectImpl(cls->ptr()->name_); 1356 WriteObjectImpl(cls->ptr()->name_);
1357 } 1357 }
1358 1358
1359 1359
1360 void SnapshotWriter::ArrayWriteTo(intptr_t object_id, 1360 void SnapshotWriter::ArrayWriteTo(intptr_t object_id,
1361 intptr_t array_kind, 1361 intptr_t array_kind,
1362 intptr_t tags, 1362 intptr_t tags,
1363 RawSmi* length, 1363 RawSmi* length,
1364 RawAbstractTypeArguments* type_arguments, 1364 RawTypeArguments* type_arguments,
1365 RawObject* data[]) { 1365 RawObject* data[]) {
1366 intptr_t len = Smi::Value(length); 1366 intptr_t len = Smi::Value(length);
1367 1367
1368 // Write out the serialization header value for this object. 1368 // Write out the serialization header value for this object.
1369 WriteInlinedObjectHeader(object_id); 1369 WriteInlinedObjectHeader(object_id);
1370 1370
1371 // Write out the class and tags information. 1371 // Write out the class and tags information.
1372 WriteIndexedObject(array_kind); 1372 WriteIndexedObject(array_kind);
1373 WriteIntptrValue(tags); 1373 WriteIntptrValue(tags);
1374 1374
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 NoGCScope no_gc; 1531 NoGCScope no_gc;
1532 WriteObject(obj.raw()); 1532 WriteObject(obj.raw());
1533 UnmarkAll(); 1533 UnmarkAll();
1534 } else { 1534 } else {
1535 ThrowException(exception_type(), exception_msg()); 1535 ThrowException(exception_type(), exception_msg());
1536 } 1536 }
1537 } 1537 }
1538 1538
1539 1539
1540 } // namespace dart 1540 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698