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

Side by Side Diff: src/objects.h

Issue 1267493006: Remove JSFunctionResultCache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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
« no previous file with comments | « src/hydrogen.cc ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // - Dictionary 80 // - Dictionary
81 // - StringTable 81 // - StringTable
82 // - CompilationCacheTable 82 // - CompilationCacheTable
83 // - CodeCacheHashTable 83 // - CodeCacheHashTable
84 // - MapCache 84 // - MapCache
85 // - OrderedHashTable 85 // - OrderedHashTable
86 // - OrderedHashSet 86 // - OrderedHashSet
87 // - OrderedHashMap 87 // - OrderedHashMap
88 // - Context 88 // - Context
89 // - TypeFeedbackVector 89 // - TypeFeedbackVector
90 // - JSFunctionResultCache
91 // - ScopeInfo 90 // - ScopeInfo
92 // - TransitionArray 91 // - TransitionArray
93 // - ScriptContextTable 92 // - ScriptContextTable
94 // - WeakFixedArray 93 // - WeakFixedArray
95 // - FixedDoubleArray 94 // - FixedDoubleArray
96 // - Name 95 // - Name
97 // - String 96 // - String
98 // - SeqString 97 // - SeqString
99 // - SeqOneByteString 98 // - SeqOneByteString
100 // - SeqTwoByteString 99 // - SeqTwoByteString
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 V(JSMap) \ 978 V(JSMap) \
980 V(JSSetIterator) \ 979 V(JSSetIterator) \
981 V(JSMapIterator) \ 980 V(JSMapIterator) \
982 V(JSWeakCollection) \ 981 V(JSWeakCollection) \
983 V(JSWeakMap) \ 982 V(JSWeakMap) \
984 V(JSWeakSet) \ 983 V(JSWeakSet) \
985 V(JSRegExp) \ 984 V(JSRegExp) \
986 V(HashTable) \ 985 V(HashTable) \
987 V(Dictionary) \ 986 V(Dictionary) \
988 V(StringTable) \ 987 V(StringTable) \
989 V(JSFunctionResultCache) \
990 V(NormalizedMapCache) \ 988 V(NormalizedMapCache) \
991 V(CompilationCacheTable) \ 989 V(CompilationCacheTable) \
992 V(CodeCacheHashTable) \ 990 V(CodeCacheHashTable) \
993 V(PolymorphicCodeCacheHashTable) \ 991 V(PolymorphicCodeCacheHashTable) \
994 V(MapCache) \ 992 V(MapCache) \
995 V(Primitive) \ 993 V(Primitive) \
996 V(GlobalObject) \ 994 V(GlobalObject) \
997 V(JSGlobalObject) \ 995 V(JSGlobalObject) \
998 V(JSBuiltinsObject) \ 996 V(JSBuiltinsObject) \
999 V(JSGlobalProxy) \ 997 V(JSGlobalProxy) \
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after
3823 // Adds (or overwrites) the value associated with the given key. Mapping a 3821 // Adds (or overwrites) the value associated with the given key. Mapping a
3824 // key to the hole value causes removal of the whole entry. 3822 // key to the hole value causes removal of the whole entry.
3825 MUST_USE_RESULT static Handle<WeakValueHashTable> PutWeak( 3823 MUST_USE_RESULT static Handle<WeakValueHashTable> PutWeak(
3826 Handle<WeakValueHashTable> table, Handle<Object> key, 3824 Handle<WeakValueHashTable> table, Handle<Object> key,
3827 Handle<HeapObject> value); 3825 Handle<HeapObject> value);
3828 3826
3829 static Handle<FixedArray> GetWeakValues(Handle<WeakValueHashTable> table); 3827 static Handle<FixedArray> GetWeakValues(Handle<WeakValueHashTable> table);
3830 }; 3828 };
3831 3829
3832 3830
3833 // JSFunctionResultCache caches results of some JSFunction invocation.
3834 // It is a fixed array with fixed structure:
3835 // [0]: factory function
3836 // [1]: finger index
3837 // [2]: current cache size
3838 // [3]: dummy field.
3839 // The rest of array are key/value pairs.
3840 class JSFunctionResultCache : public FixedArray {
3841 public:
3842 static const int kFactoryIndex = 0;
3843 static const int kFingerIndex = kFactoryIndex + 1;
3844 static const int kCacheSizeIndex = kFingerIndex + 1;
3845 static const int kDummyIndex = kCacheSizeIndex + 1;
3846 static const int kEntriesIndex = kDummyIndex + 1;
3847
3848 static const int kEntrySize = 2; // key + value
3849
3850 static const int kFactoryOffset = kHeaderSize;
3851 static const int kFingerOffset = kFactoryOffset + kPointerSize;
3852 static const int kCacheSizeOffset = kFingerOffset + kPointerSize;
3853
3854 inline void MakeZeroSize();
3855 inline void Clear();
3856
3857 inline int size();
3858 inline void set_size(int size);
3859 inline int finger_index();
3860 inline void set_finger_index(int finger_index);
3861
3862 DECLARE_CAST(JSFunctionResultCache)
3863
3864 DECLARE_VERIFIER(JSFunctionResultCache)
3865 };
3866
3867
3868 // ScopeInfo represents information about different scopes of a source 3831 // ScopeInfo represents information about different scopes of a source
3869 // program and the allocation of the scope's variables. Scope information 3832 // program and the allocation of the scope's variables. Scope information
3870 // is stored in a compressed form in ScopeInfo objects and is used 3833 // is stored in a compressed form in ScopeInfo objects and is used
3871 // at runtime (stack dumps, deoptimization, etc.). 3834 // at runtime (stack dumps, deoptimization, etc.).
3872 3835
3873 // This object provides quick access to scope info details for runtime 3836 // This object provides quick access to scope info details for runtime
3874 // routines. 3837 // routines.
3875 class ScopeInfo : public FixedArray { 3838 class ScopeInfo : public FixedArray {
3876 public: 3839 public:
3877 DECLARE_CAST(ScopeInfo) 3840 DECLARE_CAST(ScopeInfo)
(...skipping 6714 matching lines...) Expand 10 before | Expand all | Expand 10 after
10592 } else { 10555 } else {
10593 value &= ~(1 << bit_position); 10556 value &= ~(1 << bit_position);
10594 } 10557 }
10595 return value; 10558 return value;
10596 } 10559 }
10597 }; 10560 };
10598 10561
10599 } } // namespace v8::internal 10562 } } // namespace v8::internal
10600 10563
10601 #endif // V8_OBJECTS_H_ 10564 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698