| OLD | NEW |
| 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 5850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5861 | 5861 |
| 5862 class PolymorphicCodeCache: public Struct { | 5862 class PolymorphicCodeCache: public Struct { |
| 5863 public: | 5863 public: |
| 5864 DECL_ACCESSORS(cache, Object) | 5864 DECL_ACCESSORS(cache, Object) |
| 5865 | 5865 |
| 5866 static void Update(Handle<PolymorphicCodeCache> cache, | 5866 static void Update(Handle<PolymorphicCodeCache> cache, |
| 5867 MapHandleList* maps, | 5867 MapHandleList* maps, |
| 5868 Code::Flags flags, | 5868 Code::Flags flags, |
| 5869 Handle<Code> code); | 5869 Handle<Code> code); |
| 5870 | 5870 |
| 5871 MUST_USE_RESULT MaybeObject* Update(MapList* maps, | 5871 MUST_USE_RESULT MaybeObject* Update(MapHandleList* maps, |
| 5872 Code::Flags flags, | 5872 Code::Flags flags, |
| 5873 Code* code); | 5873 Code* code); |
| 5874 | 5874 |
| 5875 // Returns an undefined value if the entry is not found. | 5875 // Returns an undefined value if the entry is not found. |
| 5876 Handle<Object> Lookup(MapHandleList* maps, Code::Flags flags); | 5876 Handle<Object> Lookup(MapHandleList* maps, Code::Flags flags); |
| 5877 | 5877 |
| 5878 Object* Lookup(MapList* maps, Code::Flags flags); | |
| 5879 | |
| 5880 static inline PolymorphicCodeCache* cast(Object* obj); | 5878 static inline PolymorphicCodeCache* cast(Object* obj); |
| 5881 | 5879 |
| 5882 #ifdef OBJECT_PRINT | 5880 #ifdef OBJECT_PRINT |
| 5883 inline void PolymorphicCodeCachePrint() { | 5881 inline void PolymorphicCodeCachePrint() { |
| 5884 PolymorphicCodeCachePrint(stdout); | 5882 PolymorphicCodeCachePrint(stdout); |
| 5885 } | 5883 } |
| 5886 void PolymorphicCodeCachePrint(FILE* out); | 5884 void PolymorphicCodeCachePrint(FILE* out); |
| 5887 #endif | 5885 #endif |
| 5888 #ifdef DEBUG | 5886 #ifdef DEBUG |
| 5889 void PolymorphicCodeCacheVerify(); | 5887 void PolymorphicCodeCacheVerify(); |
| 5890 #endif | 5888 #endif |
| 5891 | 5889 |
| 5892 static const int kCacheOffset = HeapObject::kHeaderSize; | 5890 static const int kCacheOffset = HeapObject::kHeaderSize; |
| 5893 static const int kSize = kCacheOffset + kPointerSize; | 5891 static const int kSize = kCacheOffset + kPointerSize; |
| 5894 | 5892 |
| 5895 private: | 5893 private: |
| 5896 DISALLOW_IMPLICIT_CONSTRUCTORS(PolymorphicCodeCache); | 5894 DISALLOW_IMPLICIT_CONSTRUCTORS(PolymorphicCodeCache); |
| 5897 }; | 5895 }; |
| 5898 | 5896 |
| 5899 | 5897 |
| 5900 class PolymorphicCodeCacheHashTable | 5898 class PolymorphicCodeCacheHashTable |
| 5901 : public HashTable<CodeCacheHashTableShape, HashTableKey*> { | 5899 : public HashTable<CodeCacheHashTableShape, HashTableKey*> { |
| 5902 public: | 5900 public: |
| 5903 Object* Lookup(MapList* maps, int code_kind); | 5901 Object* Lookup(MapHandleList* maps, int code_kind); |
| 5904 MUST_USE_RESULT MaybeObject* Put(MapList* maps, int code_kind, Code* code); | 5902 |
| 5903 MUST_USE_RESULT MaybeObject* Put(MapHandleList* maps, |
| 5904 int code_kind, |
| 5905 Code* code); |
| 5905 | 5906 |
| 5906 static inline PolymorphicCodeCacheHashTable* cast(Object* obj); | 5907 static inline PolymorphicCodeCacheHashTable* cast(Object* obj); |
| 5907 | 5908 |
| 5908 static const int kInitialSize = 64; | 5909 static const int kInitialSize = 64; |
| 5909 private: | 5910 private: |
| 5910 DISALLOW_IMPLICIT_CONSTRUCTORS(PolymorphicCodeCacheHashTable); | 5911 DISALLOW_IMPLICIT_CONSTRUCTORS(PolymorphicCodeCacheHashTable); |
| 5911 }; | 5912 }; |
| 5912 | 5913 |
| 5913 | 5914 |
| 5914 enum AllowNullsFlag {ALLOW_NULLS, DISALLOW_NULLS}; | 5915 enum AllowNullsFlag {ALLOW_NULLS, DISALLOW_NULLS}; |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7705 } else { | 7706 } else { |
| 7706 value &= ~(1 << bit_position); | 7707 value &= ~(1 << bit_position); |
| 7707 } | 7708 } |
| 7708 return value; | 7709 return value; |
| 7709 } | 7710 } |
| 7710 }; | 7711 }; |
| 7711 | 7712 |
| 7712 } } // namespace v8::internal | 7713 } } // namespace v8::internal |
| 7713 | 7714 |
| 7714 #endif // V8_OBJECTS_H_ | 7715 #endif // V8_OBJECTS_H_ |
| OLD | NEW |