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

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

Issue 10368004: Properly set the element type of literal lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/parser.cc ('k') | tests/language/list_literal4_test.dart » ('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/visitor.h" 9 #include "vm/visitor.h"
10 10
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/list_literal4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698