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

Side by Side Diff: src/objects.h

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A few more review comments Created 7 years, 11 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/ia32/macro-assembler-ia32.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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 \ 284 \
285 V(ACCESSOR_INFO_TYPE) \ 285 V(ACCESSOR_INFO_TYPE) \
286 V(ACCESSOR_PAIR_TYPE) \ 286 V(ACCESSOR_PAIR_TYPE) \
287 V(ACCESS_CHECK_INFO_TYPE) \ 287 V(ACCESS_CHECK_INFO_TYPE) \
288 V(INTERCEPTOR_INFO_TYPE) \ 288 V(INTERCEPTOR_INFO_TYPE) \
289 V(CALL_HANDLER_INFO_TYPE) \ 289 V(CALL_HANDLER_INFO_TYPE) \
290 V(FUNCTION_TEMPLATE_INFO_TYPE) \ 290 V(FUNCTION_TEMPLATE_INFO_TYPE) \
291 V(OBJECT_TEMPLATE_INFO_TYPE) \ 291 V(OBJECT_TEMPLATE_INFO_TYPE) \
292 V(SIGNATURE_INFO_TYPE) \ 292 V(SIGNATURE_INFO_TYPE) \
293 V(TYPE_SWITCH_INFO_TYPE) \ 293 V(TYPE_SWITCH_INFO_TYPE) \
294 V(ALLOCATION_SITE_INFO_TYPE) \
294 V(SCRIPT_TYPE) \ 295 V(SCRIPT_TYPE) \
295 V(CODE_CACHE_TYPE) \ 296 V(CODE_CACHE_TYPE) \
296 V(POLYMORPHIC_CODE_CACHE_TYPE) \ 297 V(POLYMORPHIC_CODE_CACHE_TYPE) \
297 V(TYPE_FEEDBACK_INFO_TYPE) \ 298 V(TYPE_FEEDBACK_INFO_TYPE) \
298 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ 299 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \
299 \ 300 \
300 V(FIXED_ARRAY_TYPE) \ 301 V(FIXED_ARRAY_TYPE) \
301 V(FIXED_DOUBLE_ARRAY_TYPE) \ 302 V(FIXED_DOUBLE_ARRAY_TYPE) \
302 V(SHARED_FUNCTION_INFO_TYPE) \ 303 V(SHARED_FUNCTION_INFO_TYPE) \
303 \ 304 \
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 V(ACCESSOR_INFO, AccessorInfo, accessor_info) \ 438 V(ACCESSOR_INFO, AccessorInfo, accessor_info) \
438 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \ 439 V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \
439 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \ 440 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \
440 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \ 441 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \
441 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \ 442 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \
442 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ 443 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \
443 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ 444 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \
444 V(SIGNATURE_INFO, SignatureInfo, signature_info) \ 445 V(SIGNATURE_INFO, SignatureInfo, signature_info) \
445 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \ 446 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \
446 V(SCRIPT, Script, script) \ 447 V(SCRIPT, Script, script) \
448 V(ALLOCATION_SITE_INFO, AllocationSiteInfo, allocation_site_info) \
447 V(CODE_CACHE, CodeCache, code_cache) \ 449 V(CODE_CACHE, CodeCache, code_cache) \
448 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \ 450 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \
449 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ 451 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \
450 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) 452 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry)
451 453
452 #ifdef ENABLE_DEBUGGER_SUPPORT 454 #ifdef ENABLE_DEBUGGER_SUPPORT
453 #define STRUCT_LIST_DEBUGGER(V) \ 455 #define STRUCT_LIST_DEBUGGER(V) \
454 V(DEBUG_INFO, DebugInfo, debug_info) \ 456 V(DEBUG_INFO, DebugInfo, debug_info) \
455 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) 457 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info)
456 #else 458 #else
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // Structs. 601 // Structs.
600 ACCESSOR_INFO_TYPE, 602 ACCESSOR_INFO_TYPE,
601 ACCESSOR_PAIR_TYPE, 603 ACCESSOR_PAIR_TYPE,
602 ACCESS_CHECK_INFO_TYPE, 604 ACCESS_CHECK_INFO_TYPE,
603 INTERCEPTOR_INFO_TYPE, 605 INTERCEPTOR_INFO_TYPE,
604 CALL_HANDLER_INFO_TYPE, 606 CALL_HANDLER_INFO_TYPE,
605 FUNCTION_TEMPLATE_INFO_TYPE, 607 FUNCTION_TEMPLATE_INFO_TYPE,
606 OBJECT_TEMPLATE_INFO_TYPE, 608 OBJECT_TEMPLATE_INFO_TYPE,
607 SIGNATURE_INFO_TYPE, 609 SIGNATURE_INFO_TYPE,
608 TYPE_SWITCH_INFO_TYPE, 610 TYPE_SWITCH_INFO_TYPE,
611 ALLOCATION_SITE_INFO_TYPE,
609 SCRIPT_TYPE, 612 SCRIPT_TYPE,
610 CODE_CACHE_TYPE, 613 CODE_CACHE_TYPE,
611 POLYMORPHIC_CODE_CACHE_TYPE, 614 POLYMORPHIC_CODE_CACHE_TYPE,
612 TYPE_FEEDBACK_INFO_TYPE, 615 TYPE_FEEDBACK_INFO_TYPE,
613 ALIASED_ARGUMENTS_ENTRY_TYPE, 616 ALIASED_ARGUMENTS_ENTRY_TYPE,
614 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT 617 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT
615 // is defined. However as include/v8.h contain some of the instance type 618 // is defined. However as include/v8.h contain some of the instance type
616 // constants always having them avoids them getting different numbers 619 // constants always having them avoids them getting different numbers
617 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. 620 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not.
618 DEBUG_INFO_TYPE, 621 DEBUG_INFO_TYPE,
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 inline MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( 2008 inline MUST_USE_RESULT MaybeObject* GetElementsTransitionMap(
2006 Isolate* isolate, 2009 Isolate* isolate,
2007 ElementsKind elements_kind); 2010 ElementsKind elements_kind);
2008 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow( 2011 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow(
2009 ElementsKind elements_kind); 2012 ElementsKind elements_kind);
2010 2013
2011 static Handle<Object> TransitionElementsKind(Handle<JSObject> object, 2014 static Handle<Object> TransitionElementsKind(Handle<JSObject> object,
2012 ElementsKind to_kind); 2015 ElementsKind to_kind);
2013 2016
2014 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); 2017 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind);
2018 MUST_USE_RESULT MaybeObject* PossiblyTransitionArrayBoilerplate(
2019 ElementsKind to_kind);
2015 2020
2016 // Replaces an existing transition with a transition to a map with a FIELD. 2021 // Replaces an existing transition with a transition to a map with a FIELD.
2017 MUST_USE_RESULT MaybeObject* ConvertTransitionToMapTransition( 2022 MUST_USE_RESULT MaybeObject* ConvertTransitionToMapTransition(
2018 int transition_index, 2023 int transition_index,
2019 String* name, 2024 String* name,
2020 Object* new_value, 2025 Object* new_value,
2021 PropertyAttributes attributes); 2026 PropertyAttributes attributes);
2022 2027
2023 // Converts a descriptor of any other type to a real field, backed by the 2028 // Converts a descriptor of any other type to a real field, backed by the
2024 // properties array. 2029 // properties array.
(...skipping 4865 matching lines...) Expand 10 before | Expand all | Expand 10 after
6890 class ICsWithTypeInfoCountField: public BitField<int, 0, 6895 class ICsWithTypeInfoCountField: public BitField<int, 0,
6891 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT 6896 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT
6892 class InlinedTypeChangeChecksum: public BitField<int, 6897 class InlinedTypeChangeChecksum: public BitField<int,
6893 kSmiValueSize - kTypeChangeChecksumBits, 6898 kSmiValueSize - kTypeChangeChecksumBits,
6894 kTypeChangeChecksumBits> {}; // NOLINT 6899 kTypeChangeChecksumBits> {}; // NOLINT
6895 6900
6896 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo); 6901 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo);
6897 }; 6902 };
6898 6903
6899 6904
6905 enum AllocationSiteInfoMode {
6906 DONT_TRACK_ALLOCATION_SITE_INFO,
6907 TRACK_ALLOCATION_SITE_INFO
6908 };
6909
6910
6911 class AllocationSiteInfo: public Struct {
6912 public:
6913 DECL_ACCESSORS(payload, Object)
6914
6915 static inline AllocationSiteInfo* cast(Object* obj);
6916
6917 DECLARE_PRINTER(AllocationSiteInfo)
6918 DECLARE_VERIFIER(AllocationSiteInfo)
6919
6920 // Returns NULL if no AllocationSiteInfo is available for object.
6921 static AllocationSiteInfo* FindForJSObject(JSObject* object);
6922
6923 static const int kPayloadOffset = HeapObject::kHeaderSize;
6924 static const int kSize = kPayloadOffset + kPointerSize;
6925
6926 private:
6927 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo);
6928 };
6929
6930
6900 // Representation of a slow alias as part of a non-strict arguments objects. 6931 // Representation of a slow alias as part of a non-strict arguments objects.
6901 // For fast aliases (if HasNonStrictArgumentsElements()): 6932 // For fast aliases (if HasNonStrictArgumentsElements()):
6902 // - the parameter map contains an index into the context 6933 // - the parameter map contains an index into the context
6903 // - all attributes of the element have default values 6934 // - all attributes of the element have default values
6904 // For slow aliases (if HasDictionaryArgumentsElements()): 6935 // For slow aliases (if HasDictionaryArgumentsElements()):
6905 // - the parameter map contains no fast alias mapping (i.e. the hole) 6936 // - the parameter map contains no fast alias mapping (i.e. the hole)
6906 // - this struct (in the slow backing store) contains an index into the context 6937 // - this struct (in the slow backing store) contains an index into the context
6907 // - all attributes are available as part if the property details 6938 // - all attributes are available as part if the property details
6908 class AliasedArgumentsEntry: public Struct { 6939 class AliasedArgumentsEntry: public Struct {
6909 public: 6940 public:
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
8885 } else { 8916 } else {
8886 value &= ~(1 << bit_position); 8917 value &= ~(1 << bit_position);
8887 } 8918 }
8888 return value; 8919 return value;
8889 } 8920 }
8890 }; 8921 };
8891 8922
8892 } } // namespace v8::internal 8923 } } // namespace v8::internal
8893 8924
8894 #endif // V8_OBJECTS_H_ 8925 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698