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

Side by Side Diff: src/objects-visiting.h

Issue 6715028: Preserve marking bits across scavenges if incremental marker is running. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: fix review comments, add more tracing Created 9 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 | « src/mark-compact.cc ('k') | src/spaces.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords); 135 base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords);
136 136
137 return Min(specialization, generic); 137 return Min(specialization, generic);
138 } 138 }
139 }; 139 };
140 140
141 141
142 template<typename Callback> 142 template<typename Callback>
143 class VisitorDispatchTable { 143 class VisitorDispatchTable {
144 public: 144 public:
145 void CopyFrom(VisitorDispatchTable* other) {
146 memcpy(callbacks_,
147 other->callbacks_,
148 kPointerSize*StaticVisitorBase::kVisitorIdCount);
149 }
150
145 inline Callback GetVisitor(Map* map) { 151 inline Callback GetVisitor(Map* map) {
146 return callbacks_[map->visitor_id()]; 152 return callbacks_[map->visitor_id()];
147 } 153 }
148 154
149 void Register(StaticVisitorBase::VisitorId id, Callback callback) { 155 void Register(StaticVisitorBase::VisitorId id, Callback callback) {
150 ASSERT(id < StaticVisitorBase::kVisitorIdCount); // id is unsigned. 156 ASSERT(id < StaticVisitorBase::kVisitorIdCount); // id is unsigned.
151 callbacks_[id] = callback; 157 callbacks_[id] = callback;
152 } 158 }
153 159
154 template<typename Visitor, 160 template<typename Visitor,
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 399
394 for (; !it.done(); it.next()) { 400 for (; !it.done(); it.next()) {
395 it.rinfo()->template Visit<StaticVisitor>(); 401 it.rinfo()->template Visit<StaticVisitor>();
396 } 402 }
397 } 403 }
398 404
399 405
400 } } // namespace v8::internal 406 } } // namespace v8::internal
401 407
402 #endif // V8_OBJECTS_VISITING_H_ 408 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698