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

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

Issue 12207028: Save 0.00001% memory (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 if (!orig_field.IsNull()) { 1845 if (!orig_field.IsNull()) {
1846 return FormatPatchError("duplicate field: %s", member_name); 1846 return FormatPatchError("duplicate field: %s", member_name);
1847 } 1847 }
1848 new_list.SetAt(i, field); 1848 new_list.SetAt(i, field);
1849 } 1849 }
1850 for (intptr_t i = 0; i < orig_len; i++) { 1850 for (intptr_t i = 0; i < orig_len; i++) {
1851 field ^= orig_list.At(i); 1851 field ^= orig_list.At(i);
1852 new_list.SetAt(patch_len + i, field); 1852 new_list.SetAt(patch_len + i, field);
1853 } 1853 }
1854 SetFields(new_list); 1854 SetFields(new_list);
1855
1856 // The functions and fields in the patch class are no longer needed.
1857 patch.SetFunctions(Object::empty_array());
1858 patch.SetFields(Object::empty_array());
1855 return NULL; 1859 return NULL;
1856 } 1860 }
1857 1861
1858 1862
1859 void Class::SetFields(const Array& value) const { 1863 void Class::SetFields(const Array& value) const {
1860 ASSERT(!value.IsNull()); 1864 ASSERT(!value.IsNull());
1861 #if defined(DEBUG) 1865 #if defined(DEBUG)
1862 // Verify that all the fields in the array have this class as owner. 1866 // Verify that all the fields in the array have this class as owner.
1863 Field& field = Field::Handle(); 1867 Field& field = Field::Handle();
1864 intptr_t len = value.Length(); 1868 intptr_t len = value.Length();
(...skipping 10928 matching lines...) Expand 10 before | Expand all | Expand 10 after
12793 } 12797 }
12794 return result.raw(); 12798 return result.raw();
12795 } 12799 }
12796 12800
12797 12801
12798 const char* WeakProperty::ToCString() const { 12802 const char* WeakProperty::ToCString() const {
12799 return "_WeakProperty"; 12803 return "_WeakProperty";
12800 } 12804 }
12801 12805
12802 } // namespace dart 12806 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698