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

Side by Side Diff: src/objects.h

Issue 1780001: Clean JS function results cache on each major GC. (Closed)
Patch Set: Reoworking the test Created 10 years, 7 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/heap.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 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 inline bool IsSharedFunctionInfo(); 599 inline bool IsSharedFunctionInfo();
600 inline bool IsJSValue(); 600 inline bool IsJSValue();
601 inline bool IsStringWrapper(); 601 inline bool IsStringWrapper();
602 inline bool IsProxy(); 602 inline bool IsProxy();
603 inline bool IsBoolean(); 603 inline bool IsBoolean();
604 inline bool IsJSArray(); 604 inline bool IsJSArray();
605 inline bool IsJSRegExp(); 605 inline bool IsJSRegExp();
606 inline bool IsHashTable(); 606 inline bool IsHashTable();
607 inline bool IsDictionary(); 607 inline bool IsDictionary();
608 inline bool IsSymbolTable(); 608 inline bool IsSymbolTable();
609 inline bool IsJSFunctionResultCache();
609 inline bool IsCompilationCacheTable(); 610 inline bool IsCompilationCacheTable();
610 inline bool IsCodeCacheHashTable(); 611 inline bool IsCodeCacheHashTable();
611 inline bool IsMapCache(); 612 inline bool IsMapCache();
612 inline bool IsPrimitive(); 613 inline bool IsPrimitive();
613 inline bool IsGlobalObject(); 614 inline bool IsGlobalObject();
614 inline bool IsJSGlobalObject(); 615 inline bool IsJSGlobalObject();
615 inline bool IsJSBuiltinsObject(); 616 inline bool IsJSBuiltinsObject();
616 inline bool IsJSGlobalProxy(); 617 inline bool IsJSGlobalProxy();
617 inline bool IsUndetectableObject(); 618 inline bool IsUndetectableObject();
618 inline bool IsAccessCheckNeeded(); 619 inline bool IsAccessCheckNeeded();
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 // The rest of array are key/value pairs. 2320 // The rest of array are key/value pairs.
2320 class JSFunctionResultCache: public FixedArray { 2321 class JSFunctionResultCache: public FixedArray {
2321 public: 2322 public:
2322 static const int kFactoryIndex = 0; 2323 static const int kFactoryIndex = 0;
2323 static const int kFingerIndex = kFactoryIndex + 1; 2324 static const int kFingerIndex = kFactoryIndex + 1;
2324 static const int kCacheSizeIndex = kFingerIndex + 1; 2325 static const int kCacheSizeIndex = kFingerIndex + 1;
2325 static const int kDummyIndex = kCacheSizeIndex + 1; 2326 static const int kDummyIndex = kCacheSizeIndex + 1;
2326 static const int kEntriesIndex = kDummyIndex + 1; 2327 static const int kEntriesIndex = kDummyIndex + 1;
2327 2328
2328 static const int kEntrySize = 2; // key + value 2329 static const int kEntrySize = 2; // key + value
2330
2331 inline void MakeZeroSize();
2332 inline void Clear();
2333
2334 // Casting
2335 static inline JSFunctionResultCache* cast(Object* obj);
2336
2337 #ifdef DEBUG
2338 void JSFunctionResultCacheVerify();
2339 #endif
2329 }; 2340 };
2330 2341
2331 2342
2332 // ByteArray represents fixed sized byte arrays. Used by the outside world, 2343 // ByteArray represents fixed sized byte arrays. Used by the outside world,
2333 // such as PCRE, and also by the memory allocator and garbage collector to 2344 // such as PCRE, and also by the memory allocator and garbage collector to
2334 // fill in free blocks in the heap. 2345 // fill in free blocks in the heap.
2335 class ByteArray: public Array { 2346 class ByteArray: public Array {
2336 public: 2347 public:
2337 // Setter and getter. 2348 // Setter and getter.
2338 inline byte get(int index); 2349 inline byte get(int index);
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
5147 } else { 5158 } else {
5148 value &= ~(1 << bit_position); 5159 value &= ~(1 << bit_position);
5149 } 5160 }
5150 return value; 5161 return value;
5151 } 5162 }
5152 }; 5163 };
5153 5164
5154 } } // namespace v8::internal 5165 } } // namespace v8::internal
5155 5166
5156 #endif // V8_OBJECTS_H_ 5167 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698