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

Side by Side Diff: src/mark-compact.h

Issue 19495002: Use private field chunk_ (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 friend class Heap; 951 friend class Heap;
952 }; 952 };
953 953
954 954
955 class MarkBitCellIterator BASE_EMBEDDED { 955 class MarkBitCellIterator BASE_EMBEDDED {
956 public: 956 public:
957 explicit MarkBitCellIterator(MemoryChunk* chunk) 957 explicit MarkBitCellIterator(MemoryChunk* chunk)
958 : chunk_(chunk) { 958 : chunk_(chunk) {
959 last_cell_index_ = Bitmap::IndexToCell( 959 last_cell_index_ = Bitmap::IndexToCell(
960 Bitmap::CellAlignIndex( 960 Bitmap::CellAlignIndex(
961 chunk->AddressToMarkbitIndex(chunk->area_end()))); 961 chunk_->AddressToMarkbitIndex(chunk_->area_end())));
962 cell_base_ = chunk->area_start(); 962 cell_base_ = chunk_->area_start();
963 cell_index_ = Bitmap::IndexToCell( 963 cell_index_ = Bitmap::IndexToCell(
964 Bitmap::CellAlignIndex( 964 Bitmap::CellAlignIndex(
965 chunk->AddressToMarkbitIndex(cell_base_))); 965 chunk_->AddressToMarkbitIndex(cell_base_)));
966 cells_ = chunk->markbits()->cells(); 966 cells_ = chunk_->markbits()->cells();
967 } 967 }
968 968
969 inline bool Done() { return cell_index_ == last_cell_index_; } 969 inline bool Done() { return cell_index_ == last_cell_index_; }
970 970
971 inline bool HasNext() { return cell_index_ < last_cell_index_ - 1; } 971 inline bool HasNext() { return cell_index_ < last_cell_index_ - 1; }
972 972
973 inline MarkBit::CellType* CurrentCell() { 973 inline MarkBit::CellType* CurrentCell() {
974 ASSERT(cell_index_ == Bitmap::IndexToCell(Bitmap::CellAlignIndex( 974 ASSERT(cell_index_ == Bitmap::IndexToCell(Bitmap::CellAlignIndex(
975 chunk_->AddressToMarkbitIndex(cell_base_)))); 975 chunk_->AddressToMarkbitIndex(cell_base_))));
976 return &cells_[cell_index_]; 976 return &cells_[cell_index_];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 private: 1010 private:
1011 MarkCompactCollector* collector_; 1011 MarkCompactCollector* collector_;
1012 }; 1012 };
1013 1013
1014 1014
1015 const char* AllocationSpaceName(AllocationSpace space); 1015 const char* AllocationSpaceName(AllocationSpace space);
1016 1016
1017 } } // namespace v8::internal 1017 } } // namespace v8::internal
1018 1018
1019 #endif // V8_MARK_COMPACT_H_ 1019 #endif // V8_MARK_COMPACT_H_
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