| OLD | NEW |
| 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/visitor.h" | 9 #include "vm/visitor.h" |
| 10 | 10 |
| (...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1773 array = reader->NewGrowableObjectArray(); | 1773 array = reader->NewGrowableObjectArray(); |
| 1774 } else { | 1774 } else { |
| 1775 array = GrowableObjectArray::New(0); | 1775 array = GrowableObjectArray::New(0); |
| 1776 } | 1776 } |
| 1777 reader->AddBackwardReference(object_id, &array); | 1777 reader->AddBackwardReference(object_id, &array); |
| 1778 intptr_t length = reader->ReadSmiValue(); | 1778 intptr_t length = reader->ReadSmiValue(); |
| 1779 array.SetLength(length); | 1779 array.SetLength(length); |
| 1780 Array& contents = Array::Handle(); | 1780 Array& contents = Array::Handle(); |
| 1781 contents ^= reader->ReadObject(); | 1781 contents ^= reader->ReadObject(); |
| 1782 array.SetData(contents); | 1782 array.SetData(contents); |
| 1783 const AbstractTypeArguments& type_arguments = |
| 1784 AbstractTypeArguments::Handle(contents.GetTypeArguments()); |
| 1785 array.SetTypeArguments(type_arguments); |
| 1783 return array.raw(); | 1786 return array.raw(); |
| 1784 } | 1787 } |
| 1785 | 1788 |
| 1786 | 1789 |
| 1787 void RawGrowableObjectArray::WriteTo(SnapshotWriter* writer, | 1790 void RawGrowableObjectArray::WriteTo(SnapshotWriter* writer, |
| 1788 intptr_t object_id, | 1791 intptr_t object_id, |
| 1789 Snapshot::Kind kind) { | 1792 Snapshot::Kind kind) { |
| 1790 ASSERT(writer != NULL); | 1793 ASSERT(writer != NULL); |
| 1791 | 1794 |
| 1792 // Write out the serialization header value for this object. | 1795 // Write out the serialization header value for this object. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 writer->Write<RawObject*>(ptr()->num_bracket_expressions_); | 1993 writer->Write<RawObject*>(ptr()->num_bracket_expressions_); |
| 1991 writer->WriteObject(ptr()->pattern_); | 1994 writer->WriteObject(ptr()->pattern_); |
| 1992 writer->WriteIntptrValue(ptr()->type_); | 1995 writer->WriteIntptrValue(ptr()->type_); |
| 1993 writer->WriteIntptrValue(ptr()->flags_); | 1996 writer->WriteIntptrValue(ptr()->flags_); |
| 1994 | 1997 |
| 1995 // Do not write out the data part which is native. | 1998 // Do not write out the data part which is native. |
| 1996 } | 1999 } |
| 1997 | 2000 |
| 1998 | 2001 |
| 1999 } // namespace dart | 2002 } // namespace dart |
| OLD | NEW |