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

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

Issue 9535013: Merge r10809 from the bleeding_edge to the 3.8 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
Patch Set: Created 8 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/platform.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // For visitors that allow specialization by size calculate VisitorId based 128 // For visitors that allow specialization by size calculate VisitorId based
129 // on size, base visitor id and generic visitor id. 129 // on size, base visitor id and generic visitor id.
130 static VisitorId GetVisitorIdForSize(VisitorId base, 130 static VisitorId GetVisitorIdForSize(VisitorId base,
131 VisitorId generic, 131 VisitorId generic,
132 int object_size) { 132 int object_size) {
133 ASSERT((base == kVisitDataObject) || 133 ASSERT((base == kVisitDataObject) ||
134 (base == kVisitStruct) || 134 (base == kVisitStruct) ||
135 (base == kVisitJSObject)); 135 (base == kVisitJSObject));
136 ASSERT(IsAligned(object_size, kPointerSize)); 136 ASSERT(IsAligned(object_size, kPointerSize));
137 ASSERT(kMinObjectSizeInWords * kPointerSize <= object_size); 137 ASSERT(kMinObjectSizeInWords * kPointerSize <= object_size);
138 ASSERT(object_size < Page::kMaxHeapObjectSize); 138 ASSERT(object_size < Page::kMaxNonCodeHeapObjectSize);
139 139
140 const VisitorId specialization = static_cast<VisitorId>( 140 const VisitorId specialization = static_cast<VisitorId>(
141 base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords); 141 base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords);
142 142
143 return Min(specialization, generic); 143 return Min(specialization, generic);
144 } 144 }
145 }; 145 };
146 146
147 147
148 template<typename Callback> 148 template<typename Callback>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 344
345 template<typename StaticVisitor> 345 template<typename StaticVisitor>
346 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback> 346 VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback>
347 StaticNewSpaceVisitor<StaticVisitor>::table_; 347 StaticNewSpaceVisitor<StaticVisitor>::table_;
348 348
349 349
350 } } // namespace v8::internal 350 } } // namespace v8::internal
351 351
352 #endif // V8_OBJECTS_VISITING_H_ 352 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698