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

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

Issue 12340050: Add DISALLOW_COPY_AND_ASSIGN to subclasses of ValueObject and make ValueObject copyable. Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 BoolScope(bool* addr, bool value) : _addr(addr), _value(*addr) { 55 BoolScope(bool* addr, bool value) : _addr(addr), _value(*addr) {
56 *_addr = value; 56 *_addr = value;
57 } 57 }
58 ~BoolScope() { 58 ~BoolScope() {
59 *_addr = _value; 59 *_addr = _value;
60 } 60 }
61 61
62 private: 62 private:
63 bool* _addr; 63 bool* _addr;
64 bool _value; 64 bool _value;
65
66 DISALLOW_COPY_AND_ASSIGN(BoolScope);
65 }; 67 };
66 68
67 69
68 class ScavengerVisitor : public ObjectPointerVisitor { 70 class ScavengerVisitor : public ObjectPointerVisitor {
69 public: 71 public:
70 explicit ScavengerVisitor(Isolate* isolate, Scavenger* scavenger) 72 explicit ScavengerVisitor(Isolate* isolate, Scavenger* scavenger)
71 : ObjectPointerVisitor(isolate), 73 : ObjectPointerVisitor(isolate),
72 scavenger_(scavenger), 74 scavenger_(scavenger),
73 heap_(scavenger->heap_), 75 heap_(scavenger->heap_),
74 vm_heap_(Dart::vm_isolate()->heap()), 76 vm_heap_(Dart::vm_isolate()->heap()),
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 PeerTable::iterator it = peer_table_.find(raw_obj); 706 PeerTable::iterator it = peer_table_.find(raw_obj);
705 return (it == peer_table_.end()) ? NULL : it->second; 707 return (it == peer_table_.end()) ? NULL : it->second;
706 } 708 }
707 709
708 710
709 int64_t Scavenger::PeerCount() const { 711 int64_t Scavenger::PeerCount() const {
710 return static_cast<int64_t>(peer_table_.size()); 712 return static_cast<int64_t>(peer_table_.size());
711 } 713 }
712 714
713 } // namespace dart 715 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698