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

Side by Side Diff: src/objects.h

Issue 11316218: Simplify and fix code aging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comment and rebased. Created 8 years 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/mips/lithium-codegen-mips.cc ('k') | src/objects.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 // 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 4307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4318 // [gc_metadata]: Field used to hold GC related metadata. The contents of this 4318 // [gc_metadata]: Field used to hold GC related metadata. The contents of this
4319 // field does not have to be traced during garbage collection since 4319 // field does not have to be traced during garbage collection since
4320 // it is only used by the garbage collector itself. 4320 // it is only used by the garbage collector itself.
4321 DECL_ACCESSORS(gc_metadata, Object) 4321 DECL_ACCESSORS(gc_metadata, Object)
4322 4322
4323 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age 4323 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age
4324 // at the moment when this object was created. 4324 // at the moment when this object was created.
4325 inline void set_ic_age(int count); 4325 inline void set_ic_age(int count);
4326 inline int ic_age(); 4326 inline int ic_age();
4327 4327
4328 // [prologue_offset]: Offset of the function prologue, used for aging
4329 // FUNCTIONs and OPTIMIZED_FUNCTIONs.
4330 inline int prologue_offset();
4331 inline void set_prologue_offset(int offset);
4332
4328 // Unchecked accessors to be used during GC. 4333 // Unchecked accessors to be used during GC.
4329 inline ByteArray* unchecked_relocation_info(); 4334 inline ByteArray* unchecked_relocation_info();
4330 inline FixedArray* unchecked_deoptimization_data(); 4335 inline FixedArray* unchecked_deoptimization_data();
4331 4336
4332 inline int relocation_size(); 4337 inline int relocation_size();
4333 4338
4334 // [flags]: Various code flags. 4339 // [flags]: Various code flags.
4335 inline Flags flags(); 4340 inline Flags flags();
4336 inline void set_flags(Flags flags); 4341 inline void set_flags(Flags flags);
4337 4342
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
4586 kHandlerTableOffset + kPointerSize; 4591 kHandlerTableOffset + kPointerSize;
4587 static const int kTypeFeedbackInfoOffset = 4592 static const int kTypeFeedbackInfoOffset =
4588 kDeoptimizationDataOffset + kPointerSize; 4593 kDeoptimizationDataOffset + kPointerSize;
4589 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize; 4594 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize;
4590 static const int kICAgeOffset = 4595 static const int kICAgeOffset =
4591 kGCMetadataOffset + kPointerSize; 4596 kGCMetadataOffset + kPointerSize;
4592 static const int kFlagsOffset = kICAgeOffset + kIntSize; 4597 static const int kFlagsOffset = kICAgeOffset + kIntSize;
4593 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; 4598 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize;
4594 static const int kKindSpecificFlags2Offset = 4599 static const int kKindSpecificFlags2Offset =
4595 kKindSpecificFlags1Offset + kIntSize; 4600 kKindSpecificFlags1Offset + kIntSize;
4601 // Note: We might be able to squeeze this into the flags above.
4602 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
4596 4603
4597 static const int kHeaderPaddingStart = kKindSpecificFlags2Offset + kIntSize; 4604 static const int kHeaderPaddingStart = kPrologueOffset + kIntSize;
4598 4605
4599 // Add padding to align the instruction start following right after 4606 // Add padding to align the instruction start following right after
4600 // the Code object header. 4607 // the Code object header.
4601 static const int kHeaderSize = 4608 static const int kHeaderSize =
4602 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; 4609 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
4603 4610
4604 // Byte offsets within kKindSpecificFlags1Offset. 4611 // Byte offsets within kKindSpecificFlags1Offset.
4605 static const int kOptimizableOffset = kKindSpecificFlags1Offset; 4612 static const int kOptimizableOffset = kKindSpecificFlags1Offset;
4606 static const int kCheckTypeOffset = kKindSpecificFlags1Offset; 4613 static const int kCheckTypeOffset = kKindSpecificFlags1Offset;
4607 4614
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
4681 4688
4682 // Code aging 4689 // Code aging
4683 byte* FindCodeAgeSequence(); 4690 byte* FindCodeAgeSequence();
4684 static void GetCodeAgeAndParity(Code* code, Age* age, 4691 static void GetCodeAgeAndParity(Code* code, Age* age,
4685 MarkingParity* parity); 4692 MarkingParity* parity);
4686 static void GetCodeAgeAndParity(byte* sequence, Age* age, 4693 static void GetCodeAgeAndParity(byte* sequence, Age* age,
4687 MarkingParity* parity); 4694 MarkingParity* parity);
4688 static Code* GetCodeAgeStub(Age age, MarkingParity parity); 4695 static Code* GetCodeAgeStub(Age age, MarkingParity parity);
4689 4696
4690 // Code aging -- platform-specific 4697 // Code aging -- platform-specific
4691 byte* FindPlatformCodeAgeSequence();
4692 static void PatchPlatformCodeAge(byte* sequence, Age age, 4698 static void PatchPlatformCodeAge(byte* sequence, Age age,
4693 MarkingParity parity); 4699 MarkingParity parity);
4694 4700
4695 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 4701 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
4696 }; 4702 };
4697 4703
4698 4704
4699 // All heap objects have a Map that describes their structure. 4705 // All heap objects have a Map that describes their structure.
4700 // A Map contains information about: 4706 // A Map contains information about:
4701 // - Size information about the object 4707 // - Size information about the object
(...skipping 4301 matching lines...) Expand 10 before | Expand all | Expand 10 after
9003 } else { 9009 } else {
9004 value &= ~(1 << bit_position); 9010 value &= ~(1 << bit_position);
9005 } 9011 }
9006 return value; 9012 return value;
9007 } 9013 }
9008 }; 9014 };
9009 9015
9010 } } // namespace v8::internal 9016 } } // namespace v8::internal
9011 9017
9012 #endif // V8_OBJECTS_H_ 9018 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698