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

Side by Side Diff: src/heap.h

Issue 239113002: Handlifying clients of StringTable, step 1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes 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') | no next file with comments »
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 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
2102 // Allocate empty fixed array. 2097 // Allocate empty fixed array.
2103 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); 2098 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
2104 2099
2105 // Allocate empty external array of given type. 2100 // Allocate empty external array of given type.
2106 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( 2101 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray(
2107 ExternalArrayType array_type); 2102 ExternalArrayType array_type);
2108 2103
2109 // Allocate empty fixed typed array of given type. 2104 // Allocate empty fixed typed array of given type.
2110 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray( 2105 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedTypedArray(
2111 ExternalArrayType array_type); 2106 ExternalArrayType array_type);
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 enum ResultsCacheType { REGEXP_MULTIPLE_INDICES, STRING_SPLIT_SUBSTRINGS }; 2866 enum ResultsCacheType { REGEXP_MULTIPLE_INDICES, STRING_SPLIT_SUBSTRINGS };
2872 2867
2873 // Attempt to retrieve a cached result. On failure, 0 is returned as a Smi. 2868 // Attempt to retrieve a cached result. On failure, 0 is returned as a Smi.
2874 // On success, the returned result is guaranteed to be a COW-array. 2869 // On success, the returned result is guaranteed to be a COW-array.
2875 static Object* Lookup(Heap* heap, 2870 static Object* Lookup(Heap* heap,
2876 String* key_string, 2871 String* key_string,
2877 Object* key_pattern, 2872 Object* key_pattern,
2878 ResultsCacheType type); 2873 ResultsCacheType type);
2879 // Attempt to add value_array to the cache specified by type. On success, 2874 // Attempt to add value_array to the cache specified by type. On success,
2880 // value_array is turned into a COW-array. 2875 // value_array is turned into a COW-array.
2881 static void Enter(Heap* heap, 2876 static void Enter(Isolate* isolate,
2882 String* key_string, 2877 Handle<String> key_string,
2883 Object* key_pattern, 2878 Handle<Object> key_pattern,
2884 FixedArray* value_array, 2879 Handle<FixedArray> value_array,
2885 ResultsCacheType type); 2880 ResultsCacheType type);
2886 static void Clear(FixedArray* cache); 2881 static void Clear(FixedArray* cache);
2887 static const int kRegExpResultsCacheSize = 0x100; 2882 static const int kRegExpResultsCacheSize = 0x100;
2888 2883
2889 private: 2884 private:
2890 static const int kArrayEntriesPerCacheEntry = 4; 2885 static const int kArrayEntriesPerCacheEntry = 4;
2891 static const int kStringOffset = 0; 2886 static const int kStringOffset = 0;
2892 static const int kPatternOffset = 1; 2887 static const int kPatternOffset = 1;
2893 static const int kArrayOffset = 2; 2888 static const int kArrayOffset = 2;
2894 }; 2889 };
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3001 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2996 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3002 2997
3003 private: 2998 private:
3004 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2999 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3005 }; 3000 };
3006 #endif // DEBUG 3001 #endif // DEBUG
3007 3002
3008 } } // namespace v8::internal 3003 } } // namespace v8::internal
3009 3004
3010 #endif // V8_HEAP_H_ 3005 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698