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

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

Issue 12089049: Do not add smis to the store buffer when cloning objects. (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 | runtime/vm/raw_object.h » ('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/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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 UNREACHABLE(); 1293 UNREACHABLE();
1294 } 1294 }
1295 NoGCScope no_gc; 1295 NoGCScope no_gc;
1296 InitializeObject(address, cls_id, size); 1296 InitializeObject(address, cls_id, size);
1297 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag); 1297 RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
1298 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_)); 1298 ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
1299 return raw_obj; 1299 return raw_obj;
1300 } 1300 }
1301 1301
1302 1302
1303 class StoreBufferObjectPointerVisitor : public ObjectPointerVisitor { 1303 class StoreBufferObjectPointerVisitor : public ObjectPointerVisitor {
Ivan Posva 2013/01/29 17:55:09 How about renaming this to StoreBufferUpdateVisito
Florian Schneider 2013/01/29 20:04:19 Done.
1304 public: 1304 public:
1305 explicit StoreBufferObjectPointerVisitor(Isolate* isolate) : 1305 explicit StoreBufferObjectPointerVisitor(Isolate* isolate) :
1306 ObjectPointerVisitor(isolate) { 1306 ObjectPointerVisitor(isolate) {
1307 } 1307 }
1308 void VisitPointers(RawObject** first, RawObject** last) { 1308 void VisitPointers(RawObject** first, RawObject** last) {
1309 for (RawObject** curr = first; curr <= last; ++curr) { 1309 for (RawObject** curr = first; curr <= last; ++curr) {
1310 if ((*curr)->IsNewObject()) { 1310 if ((*curr)->IsHeapObject() && (*curr)->IsNewObject()) {
Ivan Posva 2013/01/29 17:55:09 RawObject* raw_obj = *curr; if (raw_obj->IsHeapObj
Florian Schneider 2013/01/29 20:04:19 Done.
1311 uword ptr = reinterpret_cast<uword>(curr); 1311 uword ptr = reinterpret_cast<uword>(curr);
1312 isolate()->store_buffer()->AddPointer(ptr); 1312 isolate()->store_buffer()->AddPointer(ptr);
1313 } 1313 }
1314 } 1314 }
1315 } 1315 }
1316 1316
1317 private: 1317 private:
1318 DISALLOW_COPY_AND_ASSIGN(StoreBufferObjectPointerVisitor); 1318 DISALLOW_COPY_AND_ASSIGN(StoreBufferObjectPointerVisitor);
1319 }; 1319 };
1320 1320
(...skipping 11483 matching lines...) Expand 10 before | Expand all | Expand 10 after
12804 } 12804 }
12805 return result.raw(); 12805 return result.raw();
12806 } 12806 }
12807 12807
12808 12808
12809 const char* WeakProperty::ToCString() const { 12809 const char* WeakProperty::ToCString() const {
12810 return "_WeakProperty"; 12810 return "_WeakProperty";
12811 } 12811 }
12812 12812
12813 } // namespace dart 12813 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698