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

Side by Side Diff: src/objects.h

Issue 23444029: Add OptimizedCodeList and DeoptimizedCodeList to native contexts. Both lists are weak. This makes i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed final comments. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.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 4795 matching lines...) Expand 10 before | Expand all | Expand 10 after
4806 // [relocation_info]: Code relocation information 4806 // [relocation_info]: Code relocation information
4807 DECL_ACCESSORS(relocation_info, ByteArray) 4807 DECL_ACCESSORS(relocation_info, ByteArray)
4808 void InvalidateRelocation(); 4808 void InvalidateRelocation();
4809 4809
4810 // [handler_table]: Fixed array containing offsets of exception handlers. 4810 // [handler_table]: Fixed array containing offsets of exception handlers.
4811 DECL_ACCESSORS(handler_table, FixedArray) 4811 DECL_ACCESSORS(handler_table, FixedArray)
4812 4812
4813 // [deoptimization_data]: Array containing data for deopt. 4813 // [deoptimization_data]: Array containing data for deopt.
4814 DECL_ACCESSORS(deoptimization_data, FixedArray) 4814 DECL_ACCESSORS(deoptimization_data, FixedArray)
4815 4815
4816 // [type_feedback_info]: Struct containing type feedback information for 4816 // [type_feedback_info]: This field stores various things, depending on the
4817 // unoptimized code. Optimized code can temporarily store the head of 4817 // kind of the code object.
4818 // the list of code to be deoptimized during mark-compact GC. 4818 // FUNCTION => type feedback information.
4819 // STUBs can use this slot to store arbitrary information as a Smi. 4819 // STUB => various things, e.g. a SMI
4820 // Will contain either a TypeFeedbackInfo object, or JSFunction object, 4820 // OPTIMIZED_FUNCTION => the next_code_link for optimized code list.
4821 // or undefined, or a Smi.
4822 DECL_ACCESSORS(type_feedback_info, Object) 4821 DECL_ACCESSORS(type_feedback_info, Object)
4823 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value); 4822 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value);
4824 inline int stub_info(); 4823 inline int stub_info();
4825 inline void set_stub_info(int info); 4824 inline void set_stub_info(int info);
4826 4825
4827 // Used during GC to code a list of code objects to deoptimize. 4826 // [next_code_link]: Link for lists of optimized or deoptimized code.
4828 inline Object* code_to_deoptimize_link(); 4827 // Note that storage for this field is overlapped with typefeedback_info.
4829 inline void set_code_to_deoptimize_link(Object* value); 4828 DECL_ACCESSORS(next_code_link, Object)
4830 inline Object** code_to_deoptimize_link_slot();
4831 4829
4832 // [gc_metadata]: Field used to hold GC related metadata. The contents of this 4830 // [gc_metadata]: Field used to hold GC related metadata. The contents of this
4833 // field does not have to be traced during garbage collection since 4831 // field does not have to be traced during garbage collection since
4834 // it is only used by the garbage collector itself. 4832 // it is only used by the garbage collector itself.
4835 DECL_ACCESSORS(gc_metadata, Object) 4833 DECL_ACCESSORS(gc_metadata, Object)
4836 4834
4837 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age 4835 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age
4838 // at the moment when this object was created. 4836 // at the moment when this object was created.
4839 inline void set_ic_age(int count); 4837 inline void set_ic_age(int count);
4840 inline int ic_age(); 4838 inline int ic_age();
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
5139 static const int kMaxLoopNestingMarker = 6; 5137 static const int kMaxLoopNestingMarker = 6;
5140 5138
5141 // Layout description. 5139 // Layout description.
5142 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 5140 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
5143 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 5141 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
5144 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; 5142 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
5145 static const int kDeoptimizationDataOffset = 5143 static const int kDeoptimizationDataOffset =
5146 kHandlerTableOffset + kPointerSize; 5144 kHandlerTableOffset + kPointerSize;
5147 static const int kTypeFeedbackInfoOffset = 5145 static const int kTypeFeedbackInfoOffset =
5148 kDeoptimizationDataOffset + kPointerSize; 5146 kDeoptimizationDataOffset + kPointerSize;
5147 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset; // Shared.
5149 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize; 5148 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize;
5150 static const int kICAgeOffset = 5149 static const int kICAgeOffset =
5151 kGCMetadataOffset + kPointerSize; 5150 kGCMetadataOffset + kPointerSize;
5152 static const int kFlagsOffset = kICAgeOffset + kIntSize; 5151 static const int kFlagsOffset = kICAgeOffset + kIntSize;
5153 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; 5152 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize;
5154 static const int kKindSpecificFlags2Offset = 5153 static const int kKindSpecificFlags2Offset =
5155 kKindSpecificFlags1Offset + kIntSize; 5154 kKindSpecificFlags1Offset + kIntSize;
5156 // Note: We might be able to squeeze this into the flags above. 5155 // Note: We might be able to squeeze this into the flags above.
5157 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; 5156 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
5158 5157
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
7012 // not have one. Note that this method does not copy the initial map 7011 // not have one. Note that this method does not copy the initial map
7013 // if it has one already, but simply replaces it with the new value. 7012 // if it has one already, but simply replaces it with the new value.
7014 // Instances created afterwards will have a map whose [[class]] is 7013 // Instances created afterwards will have a map whose [[class]] is
7015 // set to 'value', but there is no guarantees on instances created 7014 // set to 'value', but there is no guarantees on instances created
7016 // before. 7015 // before.
7017 void SetInstanceClassName(String* name); 7016 void SetInstanceClassName(String* name);
7018 7017
7019 // Returns if this function has been compiled to native code yet. 7018 // Returns if this function has been compiled to native code yet.
7020 inline bool is_compiled(); 7019 inline bool is_compiled();
7021 7020
7022 // [next_function_link]: Field for linking functions. This list is treated as 7021 // [next_function_link]: Links functions into various lists, e.g. the list
7023 // a weak list by the GC. 7022 // of optimized functions hanging off the native_context. The CodeFlusher
7023 // uses this link to chain together flushing candidates. Treated weakly
7024 // by the garbage collector.
7024 DECL_ACCESSORS(next_function_link, Object) 7025 DECL_ACCESSORS(next_function_link, Object)
7025 7026
7026 // Prints the name of the function using PrintF. 7027 // Prints the name of the function using PrintF.
7027 void PrintName(FILE* out = stdout); 7028 void PrintName(FILE* out = stdout);
7028 7029
7029 // Casting. 7030 // Casting.
7030 static inline JSFunction* cast(Object* obj); 7031 static inline JSFunction* cast(Object* obj);
7031 7032
7032 // Iterates the objects, including code objects indirectly referenced 7033 // Iterates the objects, including code objects indirectly referenced
7033 // through pointers to the first instruction in the code object. 7034 // through pointers to the first instruction in the code object.
(...skipping 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after
10174 } else { 10175 } else {
10175 value &= ~(1 << bit_position); 10176 value &= ~(1 << bit_position);
10176 } 10177 }
10177 return value; 10178 return value;
10178 } 10179 }
10179 }; 10180 };
10180 10181
10181 } } // namespace v8::internal 10182 } } // namespace v8::internal
10182 10183
10183 #endif // V8_OBJECTS_H_ 10184 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698