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

Unified Diff: src/objects-visiting.h

Issue 6794050: Revert "[Arguments] Merge (7442,7496] from bleeding_edge." (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-visiting.h
diff --git a/src/objects-visiting.h b/src/objects-visiting.h
index da955da614f42cd7148f92794afa7b9f9339408e..42f90608c35032452fc83b909ef13cd7d9000f61 100644
--- a/src/objects-visiting.h
+++ b/src/objects-visiting.h
@@ -141,22 +141,13 @@ class StaticVisitorBase : public AllStatic {
template<typename Callback>
class VisitorDispatchTable {
public:
- void CopyFrom(VisitorDispatchTable* other) {
- // We are not using memcpy to guarantee that during update
- // every element of callbacks_ array will remain correct
- // pointer (memcpy might be implemented as a byte copying loop).
- for (int i = 0; i < StaticVisitorBase::kVisitorIdCount; i++) {
- NoBarrier_Store(&callbacks_[i], other->callbacks_[i]);
- }
- }
-
inline Callback GetVisitor(Map* map) {
- return reinterpret_cast<Callback>(callbacks_[map->visitor_id()]);
+ return callbacks_[map->visitor_id()];
}
void Register(StaticVisitorBase::VisitorId id, Callback callback) {
ASSERT(id < StaticVisitorBase::kVisitorIdCount); // id is unsigned.
- callbacks_[id] = reinterpret_cast<AtomicWord>(callback);
+ callbacks_[id] = callback;
}
template<typename Visitor,
@@ -188,7 +179,7 @@ class VisitorDispatchTable {
}
private:
- AtomicWord callbacks_[StaticVisitorBase::kVisitorIdCount];
+ Callback callbacks_[StaticVisitorBase::kVisitorIdCount];
};
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698