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

Side by Side Diff: src/objects.h

Issue 7869009: Remove in-loop tracking for call ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/ic.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 inline int relocation_size(); 3646 inline int relocation_size();
3647 3647
3648 // [flags]: Various code flags. 3648 // [flags]: Various code flags.
3649 inline Flags flags(); 3649 inline Flags flags();
3650 inline void set_flags(Flags flags); 3650 inline void set_flags(Flags flags);
3651 3651
3652 // [flags]: Access to specific code flags. 3652 // [flags]: Access to specific code flags.
3653 inline Kind kind(); 3653 inline Kind kind();
3654 inline InlineCacheState ic_state(); // Only valid for IC stubs. 3654 inline InlineCacheState ic_state(); // Only valid for IC stubs.
3655 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. 3655 inline ExtraICState extra_ic_state(); // Only valid for IC stubs.
3656 inline InLoopFlag ic_in_loop(); // Only valid for IC stubs.
3657 inline PropertyType type(); // Only valid for monomorphic IC stubs. 3656 inline PropertyType type(); // Only valid for monomorphic IC stubs.
3658 inline int arguments_count(); // Only valid for call IC stubs. 3657 inline int arguments_count(); // Only valid for call IC stubs.
3659 3658
3660 // Testers for IC stub kinds. 3659 // Testers for IC stub kinds.
3661 inline bool is_inline_cache_stub(); 3660 inline bool is_inline_cache_stub();
3662 inline bool is_load_stub() { return kind() == LOAD_IC; } 3661 inline bool is_load_stub() { return kind() == LOAD_IC; }
3663 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 3662 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
3664 inline bool is_store_stub() { return kind() == STORE_IC; } 3663 inline bool is_store_stub() { return kind() == STORE_IC; }
3665 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 3664 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
3666 inline bool is_call_stub() { return kind() == CALL_IC; } 3665 inline bool is_call_stub() { return kind() == CALL_IC; }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3734 // Mark this code object as not having a stack check table. Assumes kind 3733 // Mark this code object as not having a stack check table. Assumes kind
3735 // is FUNCTION. 3734 // is FUNCTION.
3736 void SetNoStackCheckTable(); 3735 void SetNoStackCheckTable();
3737 3736
3738 // Find the first map in an IC stub. 3737 // Find the first map in an IC stub.
3739 Map* FindFirstMap(); 3738 Map* FindFirstMap();
3740 3739
3741 // Flags operations. 3740 // Flags operations.
3742 static inline Flags ComputeFlags( 3741 static inline Flags ComputeFlags(
3743 Kind kind, 3742 Kind kind,
3744 InLoopFlag in_loop = NOT_IN_LOOP,
3745 InlineCacheState ic_state = UNINITIALIZED, 3743 InlineCacheState ic_state = UNINITIALIZED,
3746 ExtraICState extra_ic_state = kNoExtraICState, 3744 ExtraICState extra_ic_state = kNoExtraICState,
3747 PropertyType type = NORMAL, 3745 PropertyType type = NORMAL,
3748 int argc = -1, 3746 int argc = -1,
3749 InlineCacheHolderFlag holder = OWN_MAP); 3747 InlineCacheHolderFlag holder = OWN_MAP);
3750 3748
3751 static inline Flags ComputeMonomorphicFlags( 3749 static inline Flags ComputeMonomorphicFlags(
3752 Kind kind, 3750 Kind kind,
3753 PropertyType type, 3751 PropertyType type,
3754 ExtraICState extra_ic_state = kNoExtraICState, 3752 ExtraICState extra_ic_state = kNoExtraICState,
3755 InlineCacheHolderFlag holder = OWN_MAP, 3753 InlineCacheHolderFlag holder = OWN_MAP,
3756 InLoopFlag in_loop = NOT_IN_LOOP,
3757 int argc = -1); 3754 int argc = -1);
3758 3755
3759 static inline InlineCacheState ExtractICStateFromFlags(Flags flags); 3756 static inline InlineCacheState ExtractICStateFromFlags(Flags flags);
3760 static inline InLoopFlag ExtractICInLoopFromFlags(Flags flags);
3761 static inline PropertyType ExtractTypeFromFlags(Flags flags); 3757 static inline PropertyType ExtractTypeFromFlags(Flags flags);
3762 static inline Kind ExtractKindFromFlags(Flags flags); 3758 static inline Kind ExtractKindFromFlags(Flags flags);
3763 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags); 3759 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags);
3764 static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags); 3760 static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags);
3765 static inline int ExtractArgumentsCountFromFlags(Flags flags); 3761 static inline int ExtractArgumentsCountFromFlags(Flags flags);
3766 3762
3767 static inline Flags RemoveTypeFromFlags(Flags flags); 3763 static inline Flags RemoveTypeFromFlags(Flags flags);
3768 3764
3769 // Convert a target address into a code object. 3765 // Convert a target address into a code object.
3770 static inline Code* GetCodeFromTargetAddress(Address address); 3766 static inline Code* GetCodeFromTargetAddress(Address address);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3878 3874
3879 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1; 3875 static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1;
3880 static const int kAllowOSRAtLoopNestingLevelOffset = 3876 static const int kAllowOSRAtLoopNestingLevelOffset =
3881 kHasDeoptimizationSupportOffset + 1; 3877 kHasDeoptimizationSupportOffset + 1;
3882 3878
3883 static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize; 3879 static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize;
3884 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize; 3880 static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize;
3885 3881
3886 // Flags layout. BitField<type, shift, size>. 3882 // Flags layout. BitField<type, shift, size>.
3887 class ICStateField: public BitField<InlineCacheState, 0, 3> {}; 3883 class ICStateField: public BitField<InlineCacheState, 0, 3> {};
3888 class ICInLoopField: public BitField<InLoopFlag, 3, 1> {}; 3884 class TypeField: public BitField<PropertyType, 3, 4> {};
3889 class TypeField: public BitField<PropertyType, 4, 4> {}; 3885 class KindField: public BitField<Kind, 7, 4> {};
3890 class KindField: public BitField<Kind, 8, 4> {}; 3886 class CacheHolderField: public BitField<InlineCacheHolderFlag, 11, 1> {};
3891 class CacheHolderField: public BitField<InlineCacheHolderFlag, 12, 1> {}; 3887 class ExtraICStateField: public BitField<ExtraICState, 12, 2> {};
3892 class ExtraICStateField: public BitField<ExtraICState, 13, 2> {};
3893 3888
3894 // Signed field cannot be encoded using the BitField class. 3889 // Signed field cannot be encoded using the BitField class.
3895 static const int kFlagsArgumentsCountShift = 15; 3890 static const int kArgumentsCountShift = 14;
3896 static const int kFlagsArgumentsCountMask = 0xffff8000; 3891 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
3897 3892
3898 static const int kFlagsNotUsedInLookup = 3893 static const int kFlagsNotUsedInLookup =
3899 ICInLoopField::kMask | TypeField::kMask | CacheHolderField::kMask; 3894 TypeField::kMask | CacheHolderField::kMask;
3900 3895
3901 private: 3896 private:
3902 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 3897 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
3903 }; 3898 };
3904 3899
3905 3900
3906 // All heap objects have a Map that describes their structure. 3901 // All heap objects have a Map that describes their structure.
3907 // A Map contains information about: 3902 // A Map contains information about:
3908 // - Size information about the object 3903 // - Size information about the object
3909 // - How to iterate over an object (for garbage collection) 3904 // - How to iterate over an object (for garbage collection)
(...skipping 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after
7451 } else { 7446 } else {
7452 value &= ~(1 << bit_position); 7447 value &= ~(1 << bit_position);
7453 } 7448 }
7454 return value; 7449 return value;
7455 } 7450 }
7456 }; 7451 };
7457 7452
7458 } } // namespace v8::internal 7453 } } // namespace v8::internal
7459 7454
7460 #endif // V8_OBJECTS_H_ 7455 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698