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

Side by Side Diff: src/objects.h

Issue 256653004: Always include debugger support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Makefile Created 6 years, 8 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/mips/macro-assembler-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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 // A struct is a simple object a set of object-valued fields. Including an 547 // A struct is a simple object a set of object-valued fields. Including an
548 // object type in this causes the compiler to generate most of the boilerplate 548 // object type in this causes the compiler to generate most of the boilerplate
549 // code for the class including allocation and garbage collection routines, 549 // code for the class including allocation and garbage collection routines,
550 // casts and predicates. All you need to define is the class, methods and 550 // casts and predicates. All you need to define is the class, methods and
551 // object verification routines. Easy, no? 551 // object verification routines. Easy, no?
552 // 552 //
553 // Note that for subtle reasons related to the ordering or numerical values of 553 // Note that for subtle reasons related to the ordering or numerical values of
554 // type tags, elements in this list have to be added to the INSTANCE_TYPE_LIST 554 // type tags, elements in this list have to be added to the INSTANCE_TYPE_LIST
555 // manually. 555 // manually.
556 #define STRUCT_LIST_ALL(V) \ 556 #define STRUCT_LIST(V) \
557 V(BOX, Box, box) \ 557 V(BOX, Box, box) \
558 V(DECLARED_ACCESSOR_DESCRIPTOR, \ 558 V(DECLARED_ACCESSOR_DESCRIPTOR, \
559 DeclaredAccessorDescriptor, \ 559 DeclaredAccessorDescriptor, \
560 declared_accessor_descriptor) \ 560 declared_accessor_descriptor) \
561 V(DECLARED_ACCESSOR_INFO, DeclaredAccessorInfo, declared_accessor_info) \ 561 V(DECLARED_ACCESSOR_INFO, DeclaredAccessorInfo, declared_accessor_info) \
562 V(EXECUTABLE_ACCESSOR_INFO, ExecutableAccessorInfo, executable_accessor_info)\ 562 V(EXECUTABLE_ACCESSOR_INFO, ExecutableAccessorInfo, executable_accessor_info)\
563 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \ 563 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \
564 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \ 564 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \
565 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \ 565 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \
566 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \ 566 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \
567 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ 567 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \
568 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ 568 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \
569 V(SIGNATURE_INFO, SignatureInfo, signature_info) \ 569 V(SIGNATURE_INFO, SignatureInfo, signature_info) \
570 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \ 570 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \
571 V(SCRIPT, Script, script) \ 571 V(SCRIPT, Script, script) \
572 V(ALLOCATION_SITE, AllocationSite, allocation_site) \ 572 V(ALLOCATION_SITE, AllocationSite, allocation_site) \
573 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ 573 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \
574 V(CODE_CACHE, CodeCache, code_cache) \ 574 V(CODE_CACHE, CodeCache, code_cache) \
575 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \ 575 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \
576 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ 576 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \
577 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) 577 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \
578
579 #ifdef ENABLE_DEBUGGER_SUPPORT
580 #define STRUCT_LIST_DEBUGGER(V) \
581 V(DEBUG_INFO, DebugInfo, debug_info) \ 578 V(DEBUG_INFO, DebugInfo, debug_info) \
582 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) 579 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info)
583 #else
584 #define STRUCT_LIST_DEBUGGER(V)
585 #endif
586
587 #define STRUCT_LIST(V) \
588 STRUCT_LIST_ALL(V) \
589 STRUCT_LIST_DEBUGGER(V)
590 580
591 // We use the full 8 bits of the instance_type field to encode heap object 581 // We use the full 8 bits of the instance_type field to encode heap object
592 // instance types. The high-order bit (bit 7) is set if the object is not a 582 // instance types. The high-order bit (bit 7) is set if the object is not a
593 // string, and cleared if it is a string. 583 // string, and cleared if it is a string.
594 const uint32_t kIsNotStringMask = 0x80; 584 const uint32_t kIsNotStringMask = 0x80;
595 const uint32_t kStringTag = 0x0; 585 const uint32_t kStringTag = 0x0;
596 const uint32_t kNotStringTag = 0x80; 586 const uint32_t kNotStringTag = 0x80;
597 587
598 // Bit 6 indicates that the object is an internalized string (if set) or not. 588 // Bit 6 indicates that the object is an internalized string (if set) or not.
599 // Bit 7 has to be clear as well. 589 // Bit 7 has to be clear as well.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 SIGNATURE_INFO_TYPE, 744 SIGNATURE_INFO_TYPE,
755 TYPE_SWITCH_INFO_TYPE, 745 TYPE_SWITCH_INFO_TYPE,
756 ALLOCATION_SITE_TYPE, 746 ALLOCATION_SITE_TYPE,
757 ALLOCATION_MEMENTO_TYPE, 747 ALLOCATION_MEMENTO_TYPE,
758 SCRIPT_TYPE, 748 SCRIPT_TYPE,
759 CODE_CACHE_TYPE, 749 CODE_CACHE_TYPE,
760 POLYMORPHIC_CODE_CACHE_TYPE, 750 POLYMORPHIC_CODE_CACHE_TYPE,
761 TYPE_FEEDBACK_INFO_TYPE, 751 TYPE_FEEDBACK_INFO_TYPE,
762 ALIASED_ARGUMENTS_ENTRY_TYPE, 752 ALIASED_ARGUMENTS_ENTRY_TYPE,
763 BOX_TYPE, 753 BOX_TYPE,
764 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT
765 // is defined. However as include/v8.h contain some of the instance type
766 // constants always having them avoids them getting different numbers
767 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not.
768 DEBUG_INFO_TYPE, 754 DEBUG_INFO_TYPE,
769 BREAK_POINT_INFO_TYPE, 755 BREAK_POINT_INFO_TYPE,
770 756
771 FIXED_ARRAY_TYPE, 757 FIXED_ARRAY_TYPE,
772 CONSTANT_POOL_ARRAY_TYPE, 758 CONSTANT_POOL_ARRAY_TYPE,
773 SHARED_FUNCTION_INFO_TYPE, 759 SHARED_FUNCTION_INFO_TYPE,
774 760
775 JS_MESSAGE_OBJECT_TYPE, 761 JS_MESSAGE_OBJECT_TYPE,
776 762
777 // All the following types are subtypes of JSReceiver, which corresponds to 763 // All the following types are subtypes of JSReceiver, which corresponds to
(...skipping 10268 matching lines...) Expand 10 before | Expand all | Expand 10 after
11046 11032
11047 // Dispatched behavior. 11033 // Dispatched behavior.
11048 DECLARE_PRINTER(TypeSwitchInfo) 11034 DECLARE_PRINTER(TypeSwitchInfo)
11049 DECLARE_VERIFIER(TypeSwitchInfo) 11035 DECLARE_VERIFIER(TypeSwitchInfo)
11050 11036
11051 static const int kTypesOffset = Struct::kHeaderSize; 11037 static const int kTypesOffset = Struct::kHeaderSize;
11052 static const int kSize = kTypesOffset + kPointerSize; 11038 static const int kSize = kTypesOffset + kPointerSize;
11053 }; 11039 };
11054 11040
11055 11041
11056 #ifdef ENABLE_DEBUGGER_SUPPORT
11057 // The DebugInfo class holds additional information for a function being 11042 // The DebugInfo class holds additional information for a function being
11058 // debugged. 11043 // debugged.
11059 class DebugInfo: public Struct { 11044 class DebugInfo: public Struct {
11060 public: 11045 public:
11061 // The shared function info for the source being debugged. 11046 // The shared function info for the source being debugged.
11062 DECL_ACCESSORS(shared, SharedFunctionInfo) 11047 DECL_ACCESSORS(shared, SharedFunctionInfo)
11063 // Code object for the original code. 11048 // Code object for the original code.
11064 DECL_ACCESSORS(original_code, Code) 11049 DECL_ACCESSORS(original_code, Code)
11065 // Code object for the patched code. This code object is the code object 11050 // Code object for the patched code. This code object is the code object
11066 // currently active for the function. 11051 // currently active for the function.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
11150 static const int kSourcePositionIndex = kCodePositionIndex + kPointerSize; 11135 static const int kSourcePositionIndex = kCodePositionIndex + kPointerSize;
11151 static const int kStatementPositionIndex = 11136 static const int kStatementPositionIndex =
11152 kSourcePositionIndex + kPointerSize; 11137 kSourcePositionIndex + kPointerSize;
11153 static const int kBreakPointObjectsIndex = 11138 static const int kBreakPointObjectsIndex =
11154 kStatementPositionIndex + kPointerSize; 11139 kStatementPositionIndex + kPointerSize;
11155 static const int kSize = kBreakPointObjectsIndex + kPointerSize; 11140 static const int kSize = kBreakPointObjectsIndex + kPointerSize;
11156 11141
11157 private: 11142 private:
11158 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); 11143 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo);
11159 }; 11144 };
11160 #endif // ENABLE_DEBUGGER_SUPPORT
11161 11145
11162 11146
11163 #undef DECL_BOOLEAN_ACCESSORS 11147 #undef DECL_BOOLEAN_ACCESSORS
11164 #undef DECL_ACCESSORS 11148 #undef DECL_ACCESSORS
11165 #undef DECLARE_VERIFIER 11149 #undef DECLARE_VERIFIER
11166 11150
11167 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ 11151 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
11168 V(kStringTable, "string_table", "(Internalized strings)") \ 11152 V(kStringTable, "string_table", "(Internalized strings)") \
11169 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ 11153 V(kExternalStringsTable, "external_strings_table", "(External strings)") \
11170 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ 11154 V(kStrongRootList, "strong_root_list", "(Strong roots)") \
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
11289 } else { 11273 } else {
11290 value &= ~(1 << bit_position); 11274 value &= ~(1 << bit_position);
11291 } 11275 }
11292 return value; 11276 return value;
11293 } 11277 }
11294 }; 11278 };
11295 11279
11296 } } // namespace v8::internal 11280 } } // namespace v8::internal
11297 11281
11298 #endif // V8_OBJECTS_H_ 11282 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698