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

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

Issue 387483002: Revert "Precisely sweeping of scan-on-scavenge pages." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/objects.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 Address HeapObject::address() { 1473 Address HeapObject::address() {
1474 return reinterpret_cast<Address>(this) - kHeapObjectTag; 1474 return reinterpret_cast<Address>(this) - kHeapObjectTag;
1475 } 1475 }
1476 1476
1477 1477
1478 int HeapObject::Size() { 1478 int HeapObject::Size() {
1479 return SizeFromMap(map()); 1479 return SizeFromMap(map());
1480 } 1480 }
1481 1481
1482 1482
1483 bool HeapObject::ContainsPointers() {
1484 InstanceType type = map()->instance_type();
1485 if (type <= LAST_NAME_TYPE) {
1486 if (type == SYMBOL_TYPE) {
1487 return true;
1488 }
1489 ASSERT(type < FIRST_NONSTRING_TYPE);
1490 // There are four string representations: sequential strings, external
1491 // strings, cons strings, and sliced strings.
1492 // Only the latter two contain non-map-word pointers to heap objects.
1493 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag);
1494 }
1495 return (type > LAST_DATA_TYPE);
1496 }
1497
1498
1499 void HeapObject::IteratePointers(ObjectVisitor* v, int start, int end) { 1483 void HeapObject::IteratePointers(ObjectVisitor* v, int start, int end) {
1500 v->VisitPointers(reinterpret_cast<Object**>(FIELD_ADDR(this, start)), 1484 v->VisitPointers(reinterpret_cast<Object**>(FIELD_ADDR(this, start)),
1501 reinterpret_cast<Object**>(FIELD_ADDR(this, end))); 1485 reinterpret_cast<Object**>(FIELD_ADDR(this, end)));
1502 } 1486 }
1503 1487
1504 1488
1505 void HeapObject::IteratePointer(ObjectVisitor* v, int offset) { 1489 void HeapObject::IteratePointer(ObjectVisitor* v, int offset) {
1506 v->VisitPointer(reinterpret_cast<Object**>(FIELD_ADDR(this, offset))); 1490 v->VisitPointer(reinterpret_cast<Object**>(FIELD_ADDR(this, offset)));
1507 } 1491 }
1508 1492
(...skipping 5677 matching lines...) Expand 10 before | Expand all | Expand 10 after
7186 #undef READ_SHORT_FIELD 7170 #undef READ_SHORT_FIELD
7187 #undef WRITE_SHORT_FIELD 7171 #undef WRITE_SHORT_FIELD
7188 #undef READ_BYTE_FIELD 7172 #undef READ_BYTE_FIELD
7189 #undef WRITE_BYTE_FIELD 7173 #undef WRITE_BYTE_FIELD
7190 #undef NOBARRIER_READ_BYTE_FIELD 7174 #undef NOBARRIER_READ_BYTE_FIELD
7191 #undef NOBARRIER_WRITE_BYTE_FIELD 7175 #undef NOBARRIER_WRITE_BYTE_FIELD
7192 7176
7193 } } // namespace v8::internal 7177 } } // namespace v8::internal
7194 7178
7195 #endif // V8_OBJECTS_INL_H_ 7179 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698