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

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

Issue 20867003: More cleanup regarding the maximum non-large object allocation size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/heap.cc ('k') | src/spaces.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 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // For visitors that allow specialization by size calculate VisitorId based 134 // For visitors that allow specialization by size calculate VisitorId based
135 // on size, base visitor id and generic visitor id. 135 // on size, base visitor id and generic visitor id.
136 static VisitorId GetVisitorIdForSize(VisitorId base, 136 static VisitorId GetVisitorIdForSize(VisitorId base,
137 VisitorId generic, 137 VisitorId generic,
138 int object_size) { 138 int object_size) {
139 ASSERT((base == kVisitDataObject) || 139 ASSERT((base == kVisitDataObject) ||
140 (base == kVisitStruct) || 140 (base == kVisitStruct) ||
141 (base == kVisitJSObject)); 141 (base == kVisitJSObject));
142 ASSERT(IsAligned(object_size, kPointerSize)); 142 ASSERT(IsAligned(object_size, kPointerSize));
143 ASSERT(kMinObjectSizeInWords * kPointerSize <= object_size); 143 ASSERT(kMinObjectSizeInWords * kPointerSize <= object_size);
144 ASSERT(object_size < Page::kMaxNonCodeHeapObjectSize); 144 ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
145 145
146 const VisitorId specialization = static_cast<VisitorId>( 146 const VisitorId specialization = static_cast<VisitorId>(
147 base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords); 147 base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords);
148 148
149 return Min(specialization, generic); 149 return Min(specialization, generic);
150 } 150 }
151 }; 151 };
152 152
153 153
154 template<typename Callback> 154 template<typename Callback>
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 469
470 template<typename StaticVisitor> 470 template<typename StaticVisitor>
471 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback> 471 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback>
472 StaticMarkingVisitor<StaticVisitor>::table_; 472 StaticMarkingVisitor<StaticVisitor>::table_;
473 473
474 474
475 } } // namespace v8::internal 475 } } // namespace v8::internal
476 476
477 #endif // V8_OBJECTS_VISITING_H_ 477 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698