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

Side by Side Diff: src/objects.h

Issue 2801018: This change allows generating call-stubs for objects with normal (non-fast) o... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 5 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-inl.h ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2758 2758
2759 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 2759 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
2760 inline CodeStub::Major major_key(); 2760 inline CodeStub::Major major_key();
2761 inline void set_major_key(CodeStub::Major major); 2761 inline void set_major_key(CodeStub::Major major);
2762 2762
2763 // Flags operations. 2763 // Flags operations.
2764 static inline Flags ComputeFlags(Kind kind, 2764 static inline Flags ComputeFlags(Kind kind,
2765 InLoopFlag in_loop = NOT_IN_LOOP, 2765 InLoopFlag in_loop = NOT_IN_LOOP,
2766 InlineCacheState ic_state = UNINITIALIZED, 2766 InlineCacheState ic_state = UNINITIALIZED,
2767 PropertyType type = NORMAL, 2767 PropertyType type = NORMAL,
2768 int argc = -1); 2768 int argc = -1,
2769 InlineCacheHolderFlag holder = OWN_MAP);
2769 2770
2770 static inline Flags ComputeMonomorphicFlags( 2771 static inline Flags ComputeMonomorphicFlags(
2771 Kind kind, 2772 Kind kind,
2772 PropertyType type, 2773 PropertyType type,
2774 InlineCacheHolderFlag holder = OWN_MAP,
2773 InLoopFlag in_loop = NOT_IN_LOOP, 2775 InLoopFlag in_loop = NOT_IN_LOOP,
2774 int argc = -1); 2776 int argc = -1);
2775 2777
2776 static inline Kind ExtractKindFromFlags(Flags flags); 2778 static inline Kind ExtractKindFromFlags(Flags flags);
2777 static inline InlineCacheState ExtractICStateFromFlags(Flags flags); 2779 static inline InlineCacheState ExtractICStateFromFlags(Flags flags);
2778 static inline InLoopFlag ExtractICInLoopFromFlags(Flags flags); 2780 static inline InLoopFlag ExtractICInLoopFromFlags(Flags flags);
2779 static inline PropertyType ExtractTypeFromFlags(Flags flags); 2781 static inline PropertyType ExtractTypeFromFlags(Flags flags);
2780 static inline int ExtractArgumentsCountFromFlags(Flags flags); 2782 static inline int ExtractArgumentsCountFromFlags(Flags flags);
2783 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags);
2781 static inline Flags RemoveTypeFromFlags(Flags flags); 2784 static inline Flags RemoveTypeFromFlags(Flags flags);
2782 2785
2783 // Convert a target address into a code object. 2786 // Convert a target address into a code object.
2784 static inline Code* GetCodeFromTargetAddress(Address address); 2787 static inline Code* GetCodeFromTargetAddress(Address address);
2785 2788
2786 // Returns the address of the first instruction. 2789 // Returns the address of the first instruction.
2787 inline byte* instruction_start(); 2790 inline byte* instruction_start();
2788 2791
2789 // Returns the size of the instructions, padding, and relocation information. 2792 // Returns the size of the instructions, padding, and relocation information.
2790 inline int body_size(); 2793 inline int body_size();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2857 ~kCodeAlignmentMask; 2860 ~kCodeAlignmentMask;
2858 2861
2859 // Byte offsets within kKindSpecificFlagsOffset. 2862 // Byte offsets within kKindSpecificFlagsOffset.
2860 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset + 1; 2863 static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset + 1;
2861 2864
2862 // Flags layout. 2865 // Flags layout.
2863 static const int kFlagsICStateShift = 0; 2866 static const int kFlagsICStateShift = 0;
2864 static const int kFlagsICInLoopShift = 3; 2867 static const int kFlagsICInLoopShift = 3;
2865 static const int kFlagsTypeShift = 4; 2868 static const int kFlagsTypeShift = 4;
2866 static const int kFlagsKindShift = 7; 2869 static const int kFlagsKindShift = 7;
2867 static const int kFlagsArgumentsCountShift = 11; 2870 static const int kFlagsICHolderShift = 11;
2871 static const int kFlagsArgumentsCountShift = 12;
2868 2872
2869 static const int kFlagsICStateMask = 0x00000007; // 00000000111 2873 static const int kFlagsICStateMask = 0x00000007; // 00000000111
2870 static const int kFlagsICInLoopMask = 0x00000008; // 00000001000 2874 static const int kFlagsICInLoopMask = 0x00000008; // 00000001000
2871 static const int kFlagsTypeMask = 0x00000070; // 00001110000 2875 static const int kFlagsTypeMask = 0x00000070; // 00001110000
2872 static const int kFlagsKindMask = 0x00000780; // 11110000000 2876 static const int kFlagsKindMask = 0x00000780; // 11110000000
2873 static const int kFlagsArgumentsCountMask = 0xFFFFF800; 2877 static const int kFlagsCacheInPrototypeMapMask = 0x00000800;
2878 static const int kFlagsArgumentsCountMask = 0xFFFFF000;
2874 2879
2875 static const int kFlagsNotUsedInLookup = 2880 static const int kFlagsNotUsedInLookup =
2876 (kFlagsICInLoopMask | kFlagsTypeMask); 2881 (kFlagsICInLoopMask | kFlagsTypeMask | kFlagsCacheInPrototypeMapMask);
2877 2882
2878 private: 2883 private:
2879 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 2884 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
2880 }; 2885 };
2881 2886
2882 2887
2883 // All heap objects have a Map that describes their structure. 2888 // All heap objects have a Map that describes their structure.
2884 // A Map contains information about: 2889 // A Map contains information about:
2885 // - Size information about the object 2890 // - Size information about the object
2886 // - How to iterate over an object (for garbage collection) 2891 // - How to iterate over an object (for garbage collection)
(...skipping 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after
5334 } else { 5339 } else {
5335 value &= ~(1 << bit_position); 5340 value &= ~(1 << bit_position);
5336 } 5341 }
5337 return value; 5342 return value;
5338 } 5343 }
5339 }; 5344 };
5340 5345
5341 } } // namespace v8::internal 5346 } } // namespace v8::internal
5342 5347
5343 #endif // V8_OBJECTS_H_ 5348 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698