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

Side by Side Diff: src/heap.h

Issue 238263003: Reland r20772 "Handlifying clients of StringTable, step 1." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The fix Created 6 years, 8 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
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')
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 // 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 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 bool CreateInitialMaps(); 2069 bool CreateInitialMaps();
2070 bool CreateInitialObjects(); 2070 bool CreateInitialObjects();
2071 2071
2072 // These five Create*EntryStub functions are here and forced to not be inlined 2072 // These five Create*EntryStub functions are here and forced to not be inlined
2073 // because of a gcc-4.4 bug that assigns wrong vtable entries. 2073 // because of a gcc-4.4 bug that assigns wrong vtable entries.
2074 NO_INLINE(void CreateJSEntryStub()); 2074 NO_INLINE(void CreateJSEntryStub());
2075 NO_INLINE(void CreateJSConstructEntryStub()); 2075 NO_INLINE(void CreateJSConstructEntryStub());
2076 2076
2077 void CreateFixedStubs(); 2077 void CreateFixedStubs();
2078 2078
2079 MUST_USE_RESULT MaybeObject* CreateOddball(Map* map,
2080 const char* to_string,
2081 Object* to_number,
2082 byte kind);
2083
2084 // Allocate empty fixed array. 2079 // Allocate empty fixed array.
2085 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); 2080 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
2086 2081
2087 // Allocate empty external array of given type. 2082 // Allocate empty external array of given type.
2088 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( 2083 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray(
2089 ExternalArrayType array_type); 2084 ExternalArrayType array_type);
2090 2085
2091 // Allocate empty fixed typed array of given type. 2086 // Allocate empty fixed typed array of given type.
2092 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray( 2087 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray(
2093 ExternalArrayType array_type); 2088 ExternalArrayType array_type);
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2850 enum ResultsCacheType { REGEXP_MULTIPLE_INDICES, STRING_SPLIT_SUBSTRINGS }; 2845 enum ResultsCacheType { REGEXP_MULTIPLE_INDICES, STRING_SPLIT_SUBSTRINGS };
2851 2846
2852 // Attempt to retrieve a cached result. On failure, 0 is returned as a Smi. 2847 // Attempt to retrieve a cached result. On failure, 0 is returned as a Smi.
2853 // On success, the returned result is guaranteed to be a COW-array. 2848 // On success, the returned result is guaranteed to be a COW-array.
2854 static Object* Lookup(Heap* heap, 2849 static Object* Lookup(Heap* heap,
2855 String* key_string, 2850 String* key_string,
2856 Object* key_pattern, 2851 Object* key_pattern,
2857 ResultsCacheType type); 2852 ResultsCacheType type);
2858 // Attempt to add value_array to the cache specified by type. On success, 2853 // Attempt to add value_array to the cache specified by type. On success,
2859 // value_array is turned into a COW-array. 2854 // value_array is turned into a COW-array.
2860 static void Enter(Heap* heap, 2855 static void Enter(Isolate* isolate,
2861 String* key_string, 2856 Handle<String> key_string,
2862 Object* key_pattern, 2857 Handle<Object> key_pattern,
2863 FixedArray* value_array, 2858 Handle<FixedArray> value_array,
2864 ResultsCacheType type); 2859 ResultsCacheType type);
2865 static void Clear(FixedArray* cache); 2860 static void Clear(FixedArray* cache);
2866 static const int kRegExpResultsCacheSize = 0x100; 2861 static const int kRegExpResultsCacheSize = 0x100;
2867 2862
2868 private: 2863 private:
2869 static const int kArrayEntriesPerCacheEntry = 4; 2864 static const int kArrayEntriesPerCacheEntry = 4;
2870 static const int kStringOffset = 0; 2865 static const int kStringOffset = 0;
2871 static const int kPatternOffset = 1; 2866 static const int kPatternOffset = 1;
2872 static const int kArrayOffset = 2; 2867 static const int kArrayOffset = 2;
2873 }; 2868 };
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2975 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2981 2976
2982 private: 2977 private:
2983 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2978 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2984 }; 2979 };
2985 #endif // DEBUG 2980 #endif // DEBUG
2986 2981
2987 } } // namespace v8::internal 2982 } } // namespace v8::internal
2988 2983
2989 #endif // V8_HEAP_H_ 2984 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698