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

Side by Side Diff: src/heap.h

Issue 7618040: Version 3.5.5. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 4 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/full-codegen.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 /* Cluster the most popular ones in a few cache lines here at the top. */ \ 58 /* Cluster the most popular ones in a few cache lines here at the top. */ \
59 V(Object, undefined_value, UndefinedValue) \ 59 V(Object, undefined_value, UndefinedValue) \
60 V(Object, the_hole_value, TheHoleValue) \ 60 V(Object, the_hole_value, TheHoleValue) \
61 V(Object, null_value, NullValue) \ 61 V(Object, null_value, NullValue) \
62 V(Object, true_value, TrueValue) \ 62 V(Object, true_value, TrueValue) \
63 V(Object, false_value, FalseValue) \ 63 V(Object, false_value, FalseValue) \
64 V(Object, arguments_marker, ArgumentsMarker) \ 64 V(Object, arguments_marker, ArgumentsMarker) \
65 V(Map, heap_number_map, HeapNumberMap) \ 65 V(Map, heap_number_map, HeapNumberMap) \
66 V(Map, global_context_map, GlobalContextMap) \ 66 V(Map, global_context_map, GlobalContextMap) \
67 V(Map, fixed_array_map, FixedArrayMap) \ 67 V(Map, fixed_array_map, FixedArrayMap) \
68 V(Map, serialized_scope_info_map, SerializedScopeInfoMap) \
68 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 69 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
69 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 70 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
70 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ 71 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
71 V(Map, meta_map, MetaMap) \ 72 V(Map, meta_map, MetaMap) \
72 V(Map, hash_table_map, HashTableMap) \ 73 V(Map, hash_table_map, HashTableMap) \
73 V(Smi, stack_limit, StackLimit) \ 74 V(Smi, stack_limit, StackLimit) \
74 V(FixedArray, number_string_cache, NumberStringCache) \ 75 V(FixedArray, number_string_cache, NumberStringCache) \
75 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ 76 V(Object, instanceof_cache_function, InstanceofCacheFunction) \
76 V(Object, instanceof_cache_map, InstanceofCacheMap) \ 77 V(Object, instanceof_cache_map, InstanceofCacheMap) \
77 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ 78 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \
(...skipping 26 matching lines...) Expand all
104 V(Map, external_short_array_map, ExternalShortArrayMap) \ 105 V(Map, external_short_array_map, ExternalShortArrayMap) \
105 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ 106 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \
106 V(Map, external_int_array_map, ExternalIntArrayMap) \ 107 V(Map, external_int_array_map, ExternalIntArrayMap) \
107 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ 108 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \
108 V(Map, external_float_array_map, ExternalFloatArrayMap) \ 109 V(Map, external_float_array_map, ExternalFloatArrayMap) \
109 V(Map, external_double_array_map, ExternalDoubleArrayMap) \ 110 V(Map, external_double_array_map, ExternalDoubleArrayMap) \
110 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \ 111 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \
111 V(Map, function_context_map, FunctionContextMap) \ 112 V(Map, function_context_map, FunctionContextMap) \
112 V(Map, catch_context_map, CatchContextMap) \ 113 V(Map, catch_context_map, CatchContextMap) \
113 V(Map, with_context_map, WithContextMap) \ 114 V(Map, with_context_map, WithContextMap) \
115 V(Map, block_context_map, BlockContextMap) \
114 V(Map, code_map, CodeMap) \ 116 V(Map, code_map, CodeMap) \
115 V(Map, oddball_map, OddballMap) \ 117 V(Map, oddball_map, OddballMap) \
116 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ 118 V(Map, global_property_cell_map, GlobalPropertyCellMap) \
117 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ 119 V(Map, shared_function_info_map, SharedFunctionInfoMap) \
118 V(Map, message_object_map, JSMessageObjectMap) \ 120 V(Map, message_object_map, JSMessageObjectMap) \
119 V(Map, foreign_map, ForeignMap) \ 121 V(Map, foreign_map, ForeignMap) \
120 V(Object, nan_value, NanValue) \ 122 V(Object, nan_value, NanValue) \
121 V(Object, minus_zero_value, MinusZeroValue) \ 123 V(Object, minus_zero_value, MinusZeroValue) \
122 V(Map, neander_map, NeanderMap) \ 124 V(Map, neander_map, NeanderMap) \
123 V(JSObject, message_listeners, MessageListeners) \ 125 V(JSObject, message_listeners, MessageListeners) \
(...skipping 29 matching lines...) Expand all
153 V(constructor_symbol, "constructor") \ 155 V(constructor_symbol, "constructor") \
154 V(code_symbol, ".code") \ 156 V(code_symbol, ".code") \
155 V(result_symbol, ".result") \ 157 V(result_symbol, ".result") \
156 V(catch_var_symbol, ".catch-var") \ 158 V(catch_var_symbol, ".catch-var") \
157 V(empty_symbol, "") \ 159 V(empty_symbol, "") \
158 V(eval_symbol, "eval") \ 160 V(eval_symbol, "eval") \
159 V(function_symbol, "function") \ 161 V(function_symbol, "function") \
160 V(length_symbol, "length") \ 162 V(length_symbol, "length") \
161 V(name_symbol, "name") \ 163 V(name_symbol, "name") \
162 V(native_symbol, "native") \ 164 V(native_symbol, "native") \
165 V(null_symbol, "null") \
163 V(number_symbol, "number") \ 166 V(number_symbol, "number") \
164 V(Number_symbol, "Number") \ 167 V(Number_symbol, "Number") \
165 V(nan_symbol, "NaN") \ 168 V(nan_symbol, "NaN") \
166 V(RegExp_symbol, "RegExp") \ 169 V(RegExp_symbol, "RegExp") \
167 V(source_symbol, "source") \ 170 V(source_symbol, "source") \
168 V(global_symbol, "global") \ 171 V(global_symbol, "global") \
169 V(ignore_case_symbol, "ignoreCase") \ 172 V(ignore_case_symbol, "ignoreCase") \
170 V(multiline_symbol, "multiline") \ 173 V(multiline_symbol, "multiline") \
171 V(input_symbol, "input") \ 174 V(input_symbol, "input") \
172 V(index_symbol, "index") \ 175 V(index_symbol, "index") \
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 V(redeclaration_symbol, "redeclaration") \ 216 V(redeclaration_symbol, "redeclaration") \
214 V(failure_symbol, "<failure>") \ 217 V(failure_symbol, "<failure>") \
215 V(space_symbol, " ") \ 218 V(space_symbol, " ") \
216 V(exec_symbol, "exec") \ 219 V(exec_symbol, "exec") \
217 V(zero_symbol, "0") \ 220 V(zero_symbol, "0") \
218 V(global_eval_symbol, "GlobalEval") \ 221 V(global_eval_symbol, "GlobalEval") \
219 V(identity_hash_symbol, "v8::IdentityHash") \ 222 V(identity_hash_symbol, "v8::IdentityHash") \
220 V(closure_symbol, "(closure)") \ 223 V(closure_symbol, "(closure)") \
221 V(use_strict, "use strict") \ 224 V(use_strict, "use strict") \
222 V(dot_symbol, ".") \ 225 V(dot_symbol, ".") \
223 V(anonymous_function_symbol, "(anonymous function)") 226 V(anonymous_function_symbol, "(anonymous function)") \
227 V(block_scope_symbol, ".block")
224 228
225 // Forward declarations. 229 // Forward declarations.
226 class GCTracer; 230 class GCTracer;
227 class HeapStats; 231 class HeapStats;
228 class Isolate; 232 class Isolate;
229 class WeakObjectRetainer; 233 class WeakObjectRetainer;
230 234
231 235
232 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, 236 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
233 Object** pointer); 237 Object** pointer);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // Allocates a partial map for bootstrapping. 480 // Allocates a partial map for bootstrapping.
477 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type, 481 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type,
478 int instance_size); 482 int instance_size);
479 483
480 // Allocate a map for the specified function 484 // Allocate a map for the specified function
481 MUST_USE_RESULT MaybeObject* AllocateInitialMap(JSFunction* fun); 485 MUST_USE_RESULT MaybeObject* AllocateInitialMap(JSFunction* fun);
482 486
483 // Allocates an empty code cache. 487 // Allocates an empty code cache.
484 MUST_USE_RESULT MaybeObject* AllocateCodeCache(); 488 MUST_USE_RESULT MaybeObject* AllocateCodeCache();
485 489
490 // Allocates a serialized scope info.
491 MUST_USE_RESULT MaybeObject* AllocateSerializedScopeInfo(int length);
492
486 // Allocates an empty PolymorphicCodeCache. 493 // Allocates an empty PolymorphicCodeCache.
487 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache(); 494 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache();
488 495
489 // Clear the Instanceof cache (used when a prototype changes). 496 // Clear the Instanceof cache (used when a prototype changes).
490 inline void ClearInstanceofCache(); 497 inline void ClearInstanceofCache();
491 498
492 // Allocates and fully initializes a String. There are two String 499 // Allocates and fully initializes a String. There are two String
493 // encodings: ASCII and two byte. One should choose between the three string 500 // encodings: ASCII and two byte. One should choose between the three string
494 // allocation functions based on the encoding of the string buffer used to 501 // allocation functions based on the encoding of the string buffer used to
495 // initialized the string. 502 // initialized the string.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 // Allocate a catch context. 668 // Allocate a catch context.
662 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, 669 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function,
663 Context* previous, 670 Context* previous,
664 String* name, 671 String* name,
665 Object* thrown_object); 672 Object* thrown_object);
666 // Allocate a 'with' context. 673 // Allocate a 'with' context.
667 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function, 674 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function,
668 Context* previous, 675 Context* previous,
669 JSObject* extension); 676 JSObject* extension);
670 677
678 // Allocate a block context.
679 MUST_USE_RESULT MaybeObject* AllocateBlockContext(JSFunction* function,
680 Context* previous,
681 SerializedScopeInfo* info);
682
671 // Allocates a new utility object in the old generation. 683 // Allocates a new utility object in the old generation.
672 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); 684 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type);
673 685
674 // Allocates a function initialized with a shared part. 686 // Allocates a function initialized with a shared part.
675 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 687 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
676 // failed. 688 // failed.
677 // Please note this does not perform a garbage collection. 689 // Please note this does not perform a garbage collection.
678 MUST_USE_RESULT MaybeObject* AllocateFunction( 690 MUST_USE_RESULT MaybeObject* AllocateFunction(
679 Map* function_map, 691 Map* function_map,
680 SharedFunctionInfo* shared, 692 SharedFunctionInfo* shared,
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2318 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2307 }; 2319 };
2308 #endif // DEBUG || LIVE_OBJECT_LIST 2320 #endif // DEBUG || LIVE_OBJECT_LIST
2309 2321
2310 2322
2311 } } // namespace v8::internal 2323 } } // namespace v8::internal
2312 2324
2313 #undef HEAP 2325 #undef HEAP
2314 2326
2315 #endif // V8_HEAP_H_ 2327 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698