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

Side by Side Diff: vm/scavenger.cc

Issue 11348026: - GrowableArray::RemoveLast returns the value being removed (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 1 month 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 | « 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 while (PromotedStackHasMore()) { 520 while (PromotedStackHasMore()) {
521 RawObject* raw_object = RawObject::FromAddr(PopFromPromotedStack()); 521 RawObject* raw_object = RawObject::FromAddr(PopFromPromotedStack());
522 // Resolve or copy all objects referred to by the current object. This 522 // Resolve or copy all objects referred to by the current object. This
523 // can potentially push more objects on this stack as well as add more 523 // can potentially push more objects on this stack as well as add more
524 // objects to be resolved in the to space. 524 // objects to be resolved in the to space.
525 raw_object->VisitPointers(visitor); 525 raw_object->VisitPointers(visitor);
526 } 526 }
527 } 527 }
528 while (!delayed_weak_stack->is_empty()) { 528 while (!delayed_weak_stack->is_empty()) {
529 // Pop the delayed weak object from the stack and visit its pointers. 529 // Pop the delayed weak object from the stack and visit its pointers.
530 RawObject* weak_property = delayed_weak_stack->Last(); 530 RawObject* weak_property = delayed_weak_stack->RemoveLast();
531 delayed_weak_stack->RemoveLast();
532 weak_property->VisitPointers(visitor); 531 weak_property->VisitPointers(visitor);
533 } 532 }
534 } 533 }
535 } 534 }
536 535
537 536
538 uword Scavenger::ProcessWeakProperty(RawWeakProperty* raw_weak, 537 uword Scavenger::ProcessWeakProperty(RawWeakProperty* raw_weak,
539 ScavengerVisitor* visitor) { 538 ScavengerVisitor* visitor) {
540 // The fate of the weak property is determined by its key. 539 // The fate of the weak property is determined by its key.
541 RawObject* raw_key = raw_weak->ptr()->key_; 540 RawObject* raw_key = raw_weak->ptr()->key_;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 PeerTable::iterator it = peer_table_.find(raw_obj); 665 PeerTable::iterator it = peer_table_.find(raw_obj);
667 return (it == peer_table_.end()) ? NULL : it->second; 666 return (it == peer_table_.end()) ? NULL : it->second;
668 } 667 }
669 668
670 669
671 int64_t Scavenger::PeerCount() const { 670 int64_t Scavenger::PeerCount() const {
672 return static_cast<int64_t>(peer_table_.size()); 671 return static_cast<int64_t>(peer_table_.size());
673 } 672 }
674 673
675 } // namespace dart 674 } // namespace dart
OLDNEW
« no previous file with comments | « vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698