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

Side by Side Diff: src/objects.h

Issue 3397021: [Isolates] StaticVisitor::VisitPointer gets Heap* as additional argument (Closed)
Patch Set: Added CODE_POINTER_ALIGN per Vitaly's suggestion. Created 10 years, 3 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
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-visiting.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 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 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 int SourceStatementPosition(Address pc); 2987 int SourceStatementPosition(Address pc);
2988 2988
2989 // Casting. 2989 // Casting.
2990 static inline Code* cast(Object* obj); 2990 static inline Code* cast(Object* obj);
2991 2991
2992 // Dispatched behavior. 2992 // Dispatched behavior.
2993 int CodeSize() { return SizeFor(body_size()); } 2993 int CodeSize() { return SizeFor(body_size()); }
2994 inline void CodeIterateBody(ObjectVisitor* v); 2994 inline void CodeIterateBody(ObjectVisitor* v);
2995 2995
2996 template<typename StaticVisitor> 2996 template<typename StaticVisitor>
2997 inline void CodeIterateBody(); 2997 inline void CodeIterateBody(Heap* heap);
2998 #ifdef DEBUG 2998 #ifdef DEBUG
2999 void CodePrint(); 2999 void CodePrint();
3000 void CodeVerify(); 3000 void CodeVerify();
3001 #endif 3001 #endif
3002 // Code entry points are aligned to 32 bytes.
3003 static const int kCodeAlignmentBits = 5;
3004 static const int kCodeAlignment = 1 << kCodeAlignmentBits;
3005 static const int kCodeAlignmentMask = kCodeAlignment - 1;
3006 3002
3007 // Layout description. 3003 // Layout description.
3008 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 3004 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
3009 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 3005 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
3010 static const int kFlagsOffset = kRelocationInfoOffset + kPointerSize; 3006 static const int kFlagsOffset = kRelocationInfoOffset + kPointerSize;
3011 static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize; 3007 static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize;
3012 // Add padding to align the instruction start following right after 3008 // Add padding to align the instruction start following right after
3013 // the Code object header. 3009 // the Code object header.
3014 static const int kHeaderSize = 3010 static const int kHeaderSize =
3015 (kKindSpecificFlagsOffset + kIntSize + kCodeAlignmentMask) & 3011 (kKindSpecificFlagsOffset + kIntSize + kCodeAlignmentMask) &
(...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after
5588 } else { 5584 } else {
5589 value &= ~(1 << bit_position); 5585 value &= ~(1 << bit_position);
5590 } 5586 }
5591 return value; 5587 return value;
5592 } 5588 }
5593 }; 5589 };
5594 5590
5595 } } // namespace v8::internal 5591 } } // namespace v8::internal
5596 5592
5597 #endif // V8_OBJECTS_H_ 5593 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698