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

Side by Side Diff: src/heap.h

Issue 7778013: NewGC: Merge bleeding edge up to 9009. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 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/handles.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 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 V(Smi, store_buffer_top, StoreBufferTop) \ 61 V(Smi, store_buffer_top, StoreBufferTop) \
62 V(Object, undefined_value, UndefinedValue) \ 62 V(Object, undefined_value, UndefinedValue) \
63 V(Object, the_hole_value, TheHoleValue) \ 63 V(Object, the_hole_value, TheHoleValue) \
64 V(Object, null_value, NullValue) \ 64 V(Object, null_value, NullValue) \
65 V(Object, true_value, TrueValue) \ 65 V(Object, true_value, TrueValue) \
66 V(Object, false_value, FalseValue) \ 66 V(Object, false_value, FalseValue) \
67 V(Object, arguments_marker, ArgumentsMarker) \ 67 V(Object, arguments_marker, ArgumentsMarker) \
68 V(Map, heap_number_map, HeapNumberMap) \ 68 V(Map, heap_number_map, HeapNumberMap) \
69 V(Map, global_context_map, GlobalContextMap) \ 69 V(Map, global_context_map, GlobalContextMap) \
70 V(Map, fixed_array_map, FixedArrayMap) \ 70 V(Map, fixed_array_map, FixedArrayMap) \
71 V(Map, serialized_scope_info_map, SerializedScopeInfoMap) \
71 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 72 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
72 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 73 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
73 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ 74 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
74 V(Map, meta_map, MetaMap) \ 75 V(Map, meta_map, MetaMap) \
75 V(Map, hash_table_map, HashTableMap) \ 76 V(Map, hash_table_map, HashTableMap) \
76 V(Smi, stack_limit, StackLimit) \ 77 V(Smi, stack_limit, StackLimit) \
77 V(FixedArray, number_string_cache, NumberStringCache) \ 78 V(FixedArray, number_string_cache, NumberStringCache) \
78 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ 79 V(Object, instanceof_cache_function, InstanceofCacheFunction) \
79 V(Object, instanceof_cache_map, InstanceofCacheMap) \ 80 V(Object, instanceof_cache_map, InstanceofCacheMap) \
80 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ 81 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \
(...skipping 26 matching lines...) Expand all
107 V(Map, external_short_array_map, ExternalShortArrayMap) \ 108 V(Map, external_short_array_map, ExternalShortArrayMap) \
108 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ 109 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \
109 V(Map, external_int_array_map, ExternalIntArrayMap) \ 110 V(Map, external_int_array_map, ExternalIntArrayMap) \
110 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ 111 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \
111 V(Map, external_float_array_map, ExternalFloatArrayMap) \ 112 V(Map, external_float_array_map, ExternalFloatArrayMap) \
112 V(Map, external_double_array_map, ExternalDoubleArrayMap) \ 113 V(Map, external_double_array_map, ExternalDoubleArrayMap) \
113 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \ 114 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \
114 V(Map, function_context_map, FunctionContextMap) \ 115 V(Map, function_context_map, FunctionContextMap) \
115 V(Map, catch_context_map, CatchContextMap) \ 116 V(Map, catch_context_map, CatchContextMap) \
116 V(Map, with_context_map, WithContextMap) \ 117 V(Map, with_context_map, WithContextMap) \
118 V(Map, block_context_map, BlockContextMap) \
117 V(Map, code_map, CodeMap) \ 119 V(Map, code_map, CodeMap) \
118 V(Map, oddball_map, OddballMap) \ 120 V(Map, oddball_map, OddballMap) \
119 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ 121 V(Map, global_property_cell_map, GlobalPropertyCellMap) \
120 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ 122 V(Map, shared_function_info_map, SharedFunctionInfoMap) \
121 V(Map, message_object_map, JSMessageObjectMap) \ 123 V(Map, message_object_map, JSMessageObjectMap) \
122 V(Map, foreign_map, ForeignMap) \ 124 V(Map, foreign_map, ForeignMap) \
123 V(Object, nan_value, NanValue) \ 125 V(Object, nan_value, NanValue) \
124 V(Object, minus_zero_value, MinusZeroValue) \ 126 V(Object, minus_zero_value, MinusZeroValue) \
125 V(Map, neander_map, NeanderMap) \ 127 V(Map, neander_map, NeanderMap) \
126 V(JSObject, message_listeners, MessageListeners) \ 128 V(JSObject, message_listeners, MessageListeners) \
(...skipping 29 matching lines...) Expand all
156 V(constructor_symbol, "constructor") \ 158 V(constructor_symbol, "constructor") \
157 V(code_symbol, ".code") \ 159 V(code_symbol, ".code") \
158 V(result_symbol, ".result") \ 160 V(result_symbol, ".result") \
159 V(catch_var_symbol, ".catch-var") \ 161 V(catch_var_symbol, ".catch-var") \
160 V(empty_symbol, "") \ 162 V(empty_symbol, "") \
161 V(eval_symbol, "eval") \ 163 V(eval_symbol, "eval") \
162 V(function_symbol, "function") \ 164 V(function_symbol, "function") \
163 V(length_symbol, "length") \ 165 V(length_symbol, "length") \
164 V(name_symbol, "name") \ 166 V(name_symbol, "name") \
165 V(native_symbol, "native") \ 167 V(native_symbol, "native") \
168 V(null_symbol, "null") \
166 V(number_symbol, "number") \ 169 V(number_symbol, "number") \
167 V(Number_symbol, "Number") \ 170 V(Number_symbol, "Number") \
168 V(nan_symbol, "NaN") \ 171 V(nan_symbol, "NaN") \
169 V(RegExp_symbol, "RegExp") \ 172 V(RegExp_symbol, "RegExp") \
170 V(source_symbol, "source") \ 173 V(source_symbol, "source") \
171 V(global_symbol, "global") \ 174 V(global_symbol, "global") \
172 V(ignore_case_symbol, "ignoreCase") \ 175 V(ignore_case_symbol, "ignoreCase") \
173 V(multiline_symbol, "multiline") \ 176 V(multiline_symbol, "multiline") \
174 V(input_symbol, "input") \ 177 V(input_symbol, "input") \
175 V(index_symbol, "index") \ 178 V(index_symbol, "index") \
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 V(redeclaration_symbol, "redeclaration") \ 219 V(redeclaration_symbol, "redeclaration") \
217 V(failure_symbol, "<failure>") \ 220 V(failure_symbol, "<failure>") \
218 V(space_symbol, " ") \ 221 V(space_symbol, " ") \
219 V(exec_symbol, "exec") \ 222 V(exec_symbol, "exec") \
220 V(zero_symbol, "0") \ 223 V(zero_symbol, "0") \
221 V(global_eval_symbol, "GlobalEval") \ 224 V(global_eval_symbol, "GlobalEval") \
222 V(identity_hash_symbol, "v8::IdentityHash") \ 225 V(identity_hash_symbol, "v8::IdentityHash") \
223 V(closure_symbol, "(closure)") \ 226 V(closure_symbol, "(closure)") \
224 V(use_strict, "use strict") \ 227 V(use_strict, "use strict") \
225 V(dot_symbol, ".") \ 228 V(dot_symbol, ".") \
226 V(anonymous_function_symbol, "(anonymous function)") 229 V(anonymous_function_symbol, "(anonymous function)") \
230 V(block_scope_symbol, ".block")
227 231
228 // Forward declarations. 232 // Forward declarations.
229 class GCTracer; 233 class GCTracer;
230 class HeapStats; 234 class HeapStats;
231 class Isolate; 235 class Isolate;
232 class WeakObjectRetainer; 236 class WeakObjectRetainer;
233 237
234 238
235 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, 239 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
236 Object** pointer); 240 Object** pointer);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // Allocates a partial map for bootstrapping. 519 // Allocates a partial map for bootstrapping.
516 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type, 520 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type,
517 int instance_size); 521 int instance_size);
518 522
519 // Allocate a map for the specified function 523 // Allocate a map for the specified function
520 MUST_USE_RESULT MaybeObject* AllocateInitialMap(JSFunction* fun); 524 MUST_USE_RESULT MaybeObject* AllocateInitialMap(JSFunction* fun);
521 525
522 // Allocates an empty code cache. 526 // Allocates an empty code cache.
523 MUST_USE_RESULT MaybeObject* AllocateCodeCache(); 527 MUST_USE_RESULT MaybeObject* AllocateCodeCache();
524 528
529 // Allocates a serialized scope info.
530 MUST_USE_RESULT MaybeObject* AllocateSerializedScopeInfo(int length);
531
525 // Allocates an empty PolymorphicCodeCache. 532 // Allocates an empty PolymorphicCodeCache.
526 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache(); 533 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache();
527 534
528 // Clear the Instanceof cache (used when a prototype changes). 535 // Clear the Instanceof cache (used when a prototype changes).
529 inline void ClearInstanceofCache(); 536 inline void ClearInstanceofCache();
530 537
531 // Allocates and fully initializes a String. There are two String 538 // Allocates and fully initializes a String. There are two String
532 // encodings: ASCII and two byte. One should choose between the three string 539 // encodings: ASCII and two byte. One should choose between the three string
533 // allocation functions based on the encoding of the string buffer used to 540 // allocation functions based on the encoding of the string buffer used to
534 // initialized the string. 541 // initialized the string.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 // Allocate a catch context. 707 // Allocate a catch context.
701 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, 708 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function,
702 Context* previous, 709 Context* previous,
703 String* name, 710 String* name,
704 Object* thrown_object); 711 Object* thrown_object);
705 // Allocate a 'with' context. 712 // Allocate a 'with' context.
706 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function, 713 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function,
707 Context* previous, 714 Context* previous,
708 JSObject* extension); 715 JSObject* extension);
709 716
717 // Allocate a block context.
718 MUST_USE_RESULT MaybeObject* AllocateBlockContext(JSFunction* function,
719 Context* previous,
720 SerializedScopeInfo* info);
721
710 // Allocates a new utility object in the old generation. 722 // Allocates a new utility object in the old generation.
711 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); 723 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type);
712 724
713 // Allocates a function initialized with a shared part. 725 // Allocates a function initialized with a shared part.
714 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 726 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
715 // failed. 727 // failed.
716 // Please note this does not perform a garbage collection. 728 // Please note this does not perform a garbage collection.
717 MUST_USE_RESULT MaybeObject* AllocateFunction( 729 MUST_USE_RESULT MaybeObject* AllocateFunction(
718 Map* function_map, 730 Map* function_map,
719 SharedFunctionInfo* shared, 731 SharedFunctionInfo* shared,
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 2448
2437 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2449 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2438 }; 2450 };
2439 #endif // DEBUG || LIVE_OBJECT_LIST 2451 #endif // DEBUG || LIVE_OBJECT_LIST
2440 2452
2441 } } // namespace v8::internal 2453 } } // namespace v8::internal
2442 2454
2443 #undef HEAP 2455 #undef HEAP
2444 2456
2445 #endif // V8_HEAP_H_ 2457 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698