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

Side by Side Diff: src/heap.h

Issue 2658008: Remove the SetExternalStringDiposeCallback API... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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/api.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 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 // Utility to invoke the scavenger. This is needed in test code to 684 // Utility to invoke the scavenger. This is needed in test code to
685 // ensure correct callback for weak global handles. 685 // ensure correct callback for weak global handles.
686 static void PerformScavenge(); 686 static void PerformScavenge();
687 687
688 #ifdef DEBUG 688 #ifdef DEBUG
689 // Utility used with flag gc-greedy. 689 // Utility used with flag gc-greedy.
690 static bool GarbageCollectionGreedyCheck(); 690 static bool GarbageCollectionGreedyCheck();
691 #endif 691 #endif
692 692
693 static void SetExternalStringDiposeCallback(
694 ExternalStringDiposeCallback callback) {
695 external_string_dispose_callback_ = callback;
696 }
697
698 static void AddGCPrologueCallback( 693 static void AddGCPrologueCallback(
699 GCEpilogueCallback callback, GCType gc_type_filter); 694 GCEpilogueCallback callback, GCType gc_type_filter);
700 static void RemoveGCPrologueCallback(GCEpilogueCallback callback); 695 static void RemoveGCPrologueCallback(GCEpilogueCallback callback);
701 696
702 static void AddGCEpilogueCallback( 697 static void AddGCEpilogueCallback(
703 GCEpilogueCallback callback, GCType gc_type_filter); 698 GCEpilogueCallback callback, GCType gc_type_filter);
704 static void RemoveGCEpilogueCallback(GCEpilogueCallback callback); 699 static void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
705 700
706 static void SetGlobalGCPrologueCallback(GCCallback callback) { 701 static void SetGlobalGCPrologueCallback(GCCallback callback) {
707 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL)); 702 ASSERT((callback == NULL) ^ (global_gc_prologue_callback_ == NULL));
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 }; 1131 };
1137 1132
1138 static const StringTypeTable string_type_table[]; 1133 static const StringTypeTable string_type_table[];
1139 static const ConstantSymbolTable constant_symbol_table[]; 1134 static const ConstantSymbolTable constant_symbol_table[];
1140 static const StructTable struct_table[]; 1135 static const StructTable struct_table[];
1141 1136
1142 // The special hidden symbol which is an empty string, but does not match 1137 // The special hidden symbol which is an empty string, but does not match
1143 // any string when looked up in properties. 1138 // any string when looked up in properties.
1144 static String* hidden_symbol_; 1139 static String* hidden_symbol_;
1145 1140
1146 static ExternalStringDiposeCallback
1147 external_string_dispose_callback_;
1148
1149 // GC callback function, called before and after mark-compact GC. 1141 // GC callback function, called before and after mark-compact GC.
1150 // Allocations in the callback function are disallowed. 1142 // Allocations in the callback function are disallowed.
1151 struct GCPrologueCallbackPair { 1143 struct GCPrologueCallbackPair {
1152 GCPrologueCallbackPair(GCPrologueCallback callback, GCType gc_type) 1144 GCPrologueCallbackPair(GCPrologueCallback callback, GCType gc_type)
1153 : callback(callback), gc_type(gc_type) { 1145 : callback(callback), gc_type(gc_type) {
1154 } 1146 }
1155 bool operator==(const GCPrologueCallbackPair& pair) const { 1147 bool operator==(const GCPrologueCallbackPair& pair) const {
1156 return pair.callback == callback; 1148 return pair.callback == callback;
1157 } 1149 }
1158 GCPrologueCallback callback; 1150 GCPrologueCallback callback;
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 1928
1937 // To speed up scavenge collections new space string are kept 1929 // To speed up scavenge collections new space string are kept
1938 // separate from old space strings. 1930 // separate from old space strings.
1939 static List<Object*> new_space_strings_; 1931 static List<Object*> new_space_strings_;
1940 static List<Object*> old_space_strings_; 1932 static List<Object*> old_space_strings_;
1941 }; 1933 };
1942 1934
1943 } } // namespace v8::internal 1935 } } // namespace v8::internal
1944 1936
1945 #endif // V8_HEAP_H_ 1937 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698