OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2087 bool CreateInitialMaps(); | 2087 bool CreateInitialMaps(); |
2088 bool CreateInitialObjects(); | 2088 bool CreateInitialObjects(); |
2089 | 2089 |
2090 // These five Create*EntryStub functions are here and forced to not be inlined | 2090 // These five Create*EntryStub functions are here and forced to not be inlined |
2091 // because of a gcc-4.4 bug that assigns wrong vtable entries. | 2091 // because of a gcc-4.4 bug that assigns wrong vtable entries. |
2092 NO_INLINE(void CreateJSEntryStub()); | 2092 NO_INLINE(void CreateJSEntryStub()); |
2093 NO_INLINE(void CreateJSConstructEntryStub()); | 2093 NO_INLINE(void CreateJSConstructEntryStub()); |
2094 | 2094 |
2095 void CreateFixedStubs(); | 2095 void CreateFixedStubs(); |
2096 | 2096 |
| 2097 MUST_USE_RESULT MaybeObject* CreateOddball(Map* map, |
| 2098 const char* to_string, |
| 2099 Object* to_number, |
| 2100 byte kind); |
| 2101 |
2097 // Allocate empty fixed array. | 2102 // Allocate empty fixed array. |
2098 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); | 2103 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); |
2099 | 2104 |
2100 // Allocate empty external array of given type. | 2105 // Allocate empty external array of given type. |
2101 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( | 2106 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( |
2102 ExternalArrayType array_type); | 2107 ExternalArrayType array_type); |
2103 | 2108 |
2104 // Allocate empty fixed typed array of given type. | 2109 // Allocate empty fixed typed array of given type. |
2105 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray( | 2110 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray( |
2106 ExternalArrayType array_type); | 2111 ExternalArrayType array_type); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2863 enum ResultsCacheType { REGEXP_MULTIPLE_INDICES, STRING_SPLIT_SUBSTRINGS }; | 2868 enum ResultsCacheType { REGEXP_MULTIPLE_INDICES, STRING_SPLIT_SUBSTRINGS }; |
2864 | 2869 |
2865 // Attempt to retrieve a cached result. On failure, 0 is returned as a Smi. | 2870 // Attempt to retrieve a cached result. On failure, 0 is returned as a Smi. |
2866 // On success, the returned result is guaranteed to be a COW-array. | 2871 // On success, the returned result is guaranteed to be a COW-array. |
2867 static Object* Lookup(Heap* heap, | 2872 static Object* Lookup(Heap* heap, |
2868 String* key_string, | 2873 String* key_string, |
2869 Object* key_pattern, | 2874 Object* key_pattern, |
2870 ResultsCacheType type); | 2875 ResultsCacheType type); |
2871 // Attempt to add value_array to the cache specified by type. On success, | 2876 // Attempt to add value_array to the cache specified by type. On success, |
2872 // value_array is turned into a COW-array. | 2877 // value_array is turned into a COW-array. |
2873 static void Enter(Isolate* isolate, | 2878 static void Enter(Heap* heap, |
2874 Handle<String> key_string, | 2879 String* key_string, |
2875 Handle<Object> key_pattern, | 2880 Object* key_pattern, |
2876 Handle<FixedArray> value_array, | 2881 FixedArray* value_array, |
2877 ResultsCacheType type); | 2882 ResultsCacheType type); |
2878 static void Clear(FixedArray* cache); | 2883 static void Clear(FixedArray* cache); |
2879 static const int kRegExpResultsCacheSize = 0x100; | 2884 static const int kRegExpResultsCacheSize = 0x100; |
2880 | 2885 |
2881 private: | 2886 private: |
2882 static const int kArrayEntriesPerCacheEntry = 4; | 2887 static const int kArrayEntriesPerCacheEntry = 4; |
2883 static const int kStringOffset = 0; | 2888 static const int kStringOffset = 0; |
2884 static const int kPatternOffset = 1; | 2889 static const int kPatternOffset = 1; |
2885 static const int kArrayOffset = 2; | 2890 static const int kArrayOffset = 2; |
2886 }; | 2891 }; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2998 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2994 | 2999 |
2995 private: | 3000 private: |
2996 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3001 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2997 }; | 3002 }; |
2998 #endif // DEBUG | 3003 #endif // DEBUG |
2999 | 3004 |
3000 } } // namespace v8::internal | 3005 } } // namespace v8::internal |
3001 | 3006 |
3002 #endif // V8_HEAP_H_ | 3007 #endif // V8_HEAP_H_ |
OLD | NEW |