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

Side by Side Diff: src/objects.h

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e Created 8 years, 1 month 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/ic.h ('k') | src/objects-debug.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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 \ 272 \
273 V(ACCESSOR_INFO_TYPE) \ 273 V(ACCESSOR_INFO_TYPE) \
274 V(ACCESSOR_PAIR_TYPE) \ 274 V(ACCESSOR_PAIR_TYPE) \
275 V(ACCESS_CHECK_INFO_TYPE) \ 275 V(ACCESS_CHECK_INFO_TYPE) \
276 V(INTERCEPTOR_INFO_TYPE) \ 276 V(INTERCEPTOR_INFO_TYPE) \
277 V(CALL_HANDLER_INFO_TYPE) \ 277 V(CALL_HANDLER_INFO_TYPE) \
278 V(FUNCTION_TEMPLATE_INFO_TYPE) \ 278 V(FUNCTION_TEMPLATE_INFO_TYPE) \
279 V(OBJECT_TEMPLATE_INFO_TYPE) \ 279 V(OBJECT_TEMPLATE_INFO_TYPE) \
280 V(SIGNATURE_INFO_TYPE) \ 280 V(SIGNATURE_INFO_TYPE) \
281 V(TYPE_SWITCH_INFO_TYPE) \ 281 V(TYPE_SWITCH_INFO_TYPE) \
282 V(ALLOCATION_SITE_INFO_TYPE) \
282 V(SCRIPT_TYPE) \ 283 V(SCRIPT_TYPE) \
283 V(CODE_CACHE_TYPE) \ 284 V(CODE_CACHE_TYPE) \
284 V(POLYMORPHIC_CODE_CACHE_TYPE) \ 285 V(POLYMORPHIC_CODE_CACHE_TYPE) \
285 V(TYPE_FEEDBACK_INFO_TYPE) \ 286 V(TYPE_FEEDBACK_INFO_TYPE) \
286 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ 287 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \
287 \ 288 \
288 V(FIXED_ARRAY_TYPE) \ 289 V(FIXED_ARRAY_TYPE) \
289 V(FIXED_DOUBLE_ARRAY_TYPE) \ 290 V(FIXED_DOUBLE_ARRAY_TYPE) \
290 V(SHARED_FUNCTION_INFO_TYPE) \ 291 V(SHARED_FUNCTION_INFO_TYPE) \
291 \ 292 \
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 V(ACCESSOR_INFO, AccessorInfo, accessor_info) \ 426 V(ACCESSOR_INFO, AccessorInfo, accessor_info) \
426 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \ 427 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \
427 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \ 428 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \
428 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \ 429 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \
429 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \ 430 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \
430 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ 431 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \
431 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ 432 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \
432 V(SIGNATURE_INFO, SignatureInfo, signature_info) \ 433 V(SIGNATURE_INFO, SignatureInfo, signature_info) \
433 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \ 434 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \
434 V(SCRIPT, Script, script) \ 435 V(SCRIPT, Script, script) \
436 V(ALLOCATION_SITE_INFO, AllocationSiteInfo, allocation_site_info) \
435 V(CODE_CACHE, CodeCache, code_cache) \ 437 V(CODE_CACHE, CodeCache, code_cache) \
436 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \ 438 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \
437 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ 439 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \
438 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) 440 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry)
439 441
440 #ifdef ENABLE_DEBUGGER_SUPPORT 442 #ifdef ENABLE_DEBUGGER_SUPPORT
441 #define STRUCT_LIST_DEBUGGER(V) \ 443 #define STRUCT_LIST_DEBUGGER(V) \
442 V(DEBUG_INFO, DebugInfo, debug_info) \ 444 V(DEBUG_INFO, DebugInfo, debug_info) \
443 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) 445 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info)
444 #else 446 #else
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 // Structs. 582 // Structs.
581 ACCESSOR_INFO_TYPE, 583 ACCESSOR_INFO_TYPE,
582 ACCESSOR_PAIR_TYPE, 584 ACCESSOR_PAIR_TYPE,
583 ACCESS_CHECK_INFO_TYPE, 585 ACCESS_CHECK_INFO_TYPE,
584 INTERCEPTOR_INFO_TYPE, 586 INTERCEPTOR_INFO_TYPE,
585 CALL_HANDLER_INFO_TYPE, 587 CALL_HANDLER_INFO_TYPE,
586 FUNCTION_TEMPLATE_INFO_TYPE, 588 FUNCTION_TEMPLATE_INFO_TYPE,
587 OBJECT_TEMPLATE_INFO_TYPE, 589 OBJECT_TEMPLATE_INFO_TYPE,
588 SIGNATURE_INFO_TYPE, 590 SIGNATURE_INFO_TYPE,
589 TYPE_SWITCH_INFO_TYPE, 591 TYPE_SWITCH_INFO_TYPE,
592 ALLOCATION_SITE_INFO_TYPE,
590 SCRIPT_TYPE, 593 SCRIPT_TYPE,
591 CODE_CACHE_TYPE, 594 CODE_CACHE_TYPE,
592 POLYMORPHIC_CODE_CACHE_TYPE, 595 POLYMORPHIC_CODE_CACHE_TYPE,
593 TYPE_FEEDBACK_INFO_TYPE, 596 TYPE_FEEDBACK_INFO_TYPE,
594 ALIASED_ARGUMENTS_ENTRY_TYPE, 597 ALIASED_ARGUMENTS_ENTRY_TYPE,
595 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT 598 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT
596 // is defined. However as include/v8.h contain some of the instance type 599 // is defined. However as include/v8.h contain some of the instance type
597 // constants always having them avoids them getting different numbers 600 // constants always having them avoids them getting different numbers
598 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. 601 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not.
599 DEBUG_INFO_TYPE, 602 DEBUG_INFO_TYPE,
(...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after
4149 // Accessors for global property cells holding the cache values. 4152 // Accessors for global property cells holding the cache values.
4150 inline JSGlobalPropertyCell* Cell(int index); 4153 inline JSGlobalPropertyCell* Cell(int index);
4151 inline void SetCell(int index, JSGlobalPropertyCell* cell); 4154 inline void SetCell(int index, JSGlobalPropertyCell* cell);
4152 4155
4153 // The object that indicates an uninitialized cache. 4156 // The object that indicates an uninitialized cache.
4154 static inline Handle<Object> UninitializedSentinel(Isolate* isolate); 4157 static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
4155 4158
4156 // The object that indicates a megamorphic state. 4159 // The object that indicates a megamorphic state.
4157 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate); 4160 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
4158 4161
4162 // The object that indicates a monomorphic state of Array with a specific
4163 // ElementsKind.
4164 static inline Handle<Object> MonomorphicArraySentinel(
4165 ElementsKind elements_kind);
4166
4159 // A raw version of the uninitialized sentinel that's safe to read during 4167 // A raw version of the uninitialized sentinel that's safe to read during
4160 // garbage collection (e.g., for patching the cache). 4168 // garbage collection (e.g., for patching the cache).
4161 static inline Object* RawUninitializedSentinel(Heap* heap); 4169 static inline Object* RawUninitializedSentinel(Heap* heap);
4162 4170
4163 // Casting. 4171 // Casting.
4164 static inline TypeFeedbackCells* cast(Object* obj); 4172 static inline TypeFeedbackCells* cast(Object* obj);
4165 4173
4166 static const int kForInFastCaseMarker = 0; 4174 static const int kForInFastCaseMarker = 0;
4167 static const int kForInSlowCaseMarker = 1; 4175 static const int kForInSlowCaseMarker = 1;
4168 }; 4176 };
(...skipping 4539 matching lines...) Expand 10 before | Expand all | Expand 10 after
8708 } 8716 }
8709 void TypeSwitchInfoPrint(FILE* out); 8717 void TypeSwitchInfoPrint(FILE* out);
8710 #endif 8718 #endif
8711 DECLARE_VERIFIER(TypeSwitchInfo) 8719 DECLARE_VERIFIER(TypeSwitchInfo)
8712 8720
8713 static const int kTypesOffset = Struct::kHeaderSize; 8721 static const int kTypesOffset = Struct::kHeaderSize;
8714 static const int kSize = kTypesOffset + kPointerSize; 8722 static const int kSize = kTypesOffset + kPointerSize;
8715 }; 8723 };
8716 8724
8717 8725
8726 class AllocationSiteInfo: public Struct {
8727 public:
8728 DECL_ACCESSORS(payload, Object)
8729
8730 static inline AllocationSiteInfo* cast(Object* obj);
8731
8732 #ifdef OBJECT_PRINT
8733 inline void AllocationSiteInfoPrint() {
8734 AllocationSiteInfoPrint(stdout);
8735 }
8736 void AllocationSiteInfoPrint(FILE* out);
8737 #endif
8738 #ifdef DEBUG
8739 void AllocationSiteInfoVerify();
8740 #endif
8741
8742 static const int kPayloadOffset = HeapObject::kHeaderSize;
8743 static const int kSize = kPayloadOffset + kPointerSize;
8744
8745 private:
8746 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo);
8747 };
8748
8749
8718 #ifdef ENABLE_DEBUGGER_SUPPORT 8750 #ifdef ENABLE_DEBUGGER_SUPPORT
8719 // The DebugInfo class holds additional information for a function being 8751 // The DebugInfo class holds additional information for a function being
8720 // debugged. 8752 // debugged.
8721 class DebugInfo: public Struct { 8753 class DebugInfo: public Struct {
8722 public: 8754 public:
8723 // The shared function info for the source being debugged. 8755 // The shared function info for the source being debugged.
8724 DECL_ACCESSORS(shared, SharedFunctionInfo) 8756 DECL_ACCESSORS(shared, SharedFunctionInfo)
8725 // Code object for the original code. 8757 // Code object for the original code.
8726 DECL_ACCESSORS(original_code, Code) 8758 DECL_ACCESSORS(original_code, Code)
8727 // Code object for the patched code. This code object is the code object 8759 // Code object for the patched code. This code object is the code object
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
8955 } else { 8987 } else {
8956 value &= ~(1 << bit_position); 8988 value &= ~(1 << bit_position);
8957 } 8989 }
8958 return value; 8990 return value;
8959 } 8991 }
8960 }; 8992 };
8961 8993
8962 } } // namespace v8::internal 8994 } } // namespace v8::internal
8963 8995
8964 #endif // V8_OBJECTS_H_ 8996 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698