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

Side by Side Diff: src/objects.h

Issue 1933: Generalized the EvalCache into a CompilationCache and enabled... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 inline bool IsCode(); 607 inline bool IsCode();
608 inline bool IsOddball(); 608 inline bool IsOddball();
609 inline bool IsSharedFunctionInfo(); 609 inline bool IsSharedFunctionInfo();
610 inline bool IsJSValue(); 610 inline bool IsJSValue();
611 inline bool IsProxy(); 611 inline bool IsProxy();
612 inline bool IsBoolean(); 612 inline bool IsBoolean();
613 inline bool IsJSArray(); 613 inline bool IsJSArray();
614 inline bool IsHashTable(); 614 inline bool IsHashTable();
615 inline bool IsDictionary(); 615 inline bool IsDictionary();
616 inline bool IsSymbolTable(); 616 inline bool IsSymbolTable();
617 inline bool IsEvalCache(); 617 inline bool IsCompilationCacheTable();
618 inline bool IsPrimitive(); 618 inline bool IsPrimitive();
619 inline bool IsGlobalObject(); 619 inline bool IsGlobalObject();
620 inline bool IsJSGlobalObject(); 620 inline bool IsJSGlobalObject();
621 inline bool IsJSBuiltinsObject(); 621 inline bool IsJSBuiltinsObject();
622 inline bool IsUndetectableObject(); 622 inline bool IsUndetectableObject();
623 inline bool IsAccessCheckNeeded(); 623 inline bool IsAccessCheckNeeded();
624 624
625 // Returns true if this object is an instance of the specified 625 // Returns true if this object is an instance of the specified
626 // function template. 626 // function template.
627 bool IsInstanceOf(FunctionTemplateInfo* type); 627 bool IsInstanceOf(FunctionTemplateInfo* type);
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 // Casting. 1811 // Casting.
1812 static inline SymbolTable* cast(Object* obj); 1812 static inline SymbolTable* cast(Object* obj);
1813 1813
1814 private: 1814 private:
1815 Object* LookupKey(HashTableKey* key, Object** s); 1815 Object* LookupKey(HashTableKey* key, Object** s);
1816 1816
1817 DISALLOW_IMPLICIT_CONSTRUCTORS(SymbolTable); 1817 DISALLOW_IMPLICIT_CONSTRUCTORS(SymbolTable);
1818 }; 1818 };
1819 1819
1820 1820
1821 // EvalCache for caching eval'ed string and function. 1821 class CompilationCacheTable: public HashTable<0, 2> {
1822 //
1823 // The cache is cleaned up during a mark-compact GC.
1824 class EvalCache: public HashTable<0, 2> {
1825 public: 1822 public:
1826 // Find cached value for a string key, otherwise return null. 1823 // Find cached value for a string key, otherwise return null.
1827 Object* Lookup(String* src); 1824 Object* Lookup(String* src);
1828 Object* Put(String* src, Object* value); 1825 Object* Put(String* src, Object* value);
1829 1826
1830 static inline EvalCache* cast(Object* obj); 1827 static inline CompilationCacheTable* cast(Object* obj);
1831 1828
1832 private: 1829 private:
1833 DISALLOW_IMPLICIT_CONSTRUCTORS(EvalCache); 1830 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable);
1834 }; 1831 };
1835 1832
1836 1833
1837 // Dictionary for keeping properties and elements in slow case. 1834 // Dictionary for keeping properties and elements in slow case.
1838 // 1835 //
1839 // One element in the prefix is used for storing non-element 1836 // One element in the prefix is used for storing non-element
1840 // information about the dictionary. 1837 // information about the dictionary.
1841 // 1838 //
1842 // The rest of the array embeds triples of (key, value, details). 1839 // The rest of the array embeds triples of (key, value, details).
1843 // if key == undefined the triple is empty. 1840 // if key == undefined the triple is empty.
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after
3852 } else { 3849 } else {
3853 value &= ~(1 << bit_position); 3850 value &= ~(1 << bit_position);
3854 } 3851 }
3855 return value; 3852 return value;
3856 } 3853 }
3857 }; 3854 };
3858 3855
3859 } } // namespace v8::internal 3856 } } // namespace v8::internal
3860 3857
3861 #endif // V8_OBJECTS_H_ 3858 #endif // V8_OBJECTS_H_
OLDNEW
« src/compilation-cache.h ('K') | « src/heap-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698