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

Side by Side Diff: src/heap.h

Issue 7549008: Preliminary code for block scopes and block contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Small fix: set harmony flag properly 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 V(redeclaration_symbol, "redeclaration") \ 215 V(redeclaration_symbol, "redeclaration") \
214 V(failure_symbol, "<failure>") \ 216 V(failure_symbol, "<failure>") \
215 V(space_symbol, " ") \ 217 V(space_symbol, " ") \
216 V(exec_symbol, "exec") \ 218 V(exec_symbol, "exec") \
217 V(zero_symbol, "0") \ 219 V(zero_symbol, "0") \
218 V(global_eval_symbol, "GlobalEval") \ 220 V(global_eval_symbol, "GlobalEval") \
219 V(identity_hash_symbol, "v8::IdentityHash") \ 221 V(identity_hash_symbol, "v8::IdentityHash") \
220 V(closure_symbol, "(closure)") \ 222 V(closure_symbol, "(closure)") \
221 V(use_strict, "use strict") \ 223 V(use_strict, "use strict") \
222 V(dot_symbol, ".") \ 224 V(dot_symbol, ".") \
223 V(anonymous_function_symbol, "(anonymous function)") 225 V(anonymous_function_symbol, "(anonymous function)") \
226 V(block_scope_symbol, ".block")
224 227
225 // Forward declarations. 228 // Forward declarations.
226 class GCTracer; 229 class GCTracer;
227 class HeapStats; 230 class HeapStats;
228 class Isolate; 231 class Isolate;
229 class WeakObjectRetainer; 232 class WeakObjectRetainer;
230 233
231 234
232 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, 235 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
233 Object** pointer); 236 Object** pointer);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // Allocates a partial map for bootstrapping. 479 // Allocates a partial map for bootstrapping.
477 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type, 480 MUST_USE_RESULT MaybeObject* AllocatePartialMap(InstanceType instance_type,
478 int instance_size); 481 int instance_size);
479 482
480 // Allocate a map for the specified function 483 // Allocate a map for the specified function
481 MUST_USE_RESULT MaybeObject* AllocateInitialMap(JSFunction* fun); 484 MUST_USE_RESULT MaybeObject* AllocateInitialMap(JSFunction* fun);
482 485
483 // Allocates an empty code cache. 486 // Allocates an empty code cache.
484 MUST_USE_RESULT MaybeObject* AllocateCodeCache(); 487 MUST_USE_RESULT MaybeObject* AllocateCodeCache();
485 488
489 // Allocates a serialized scope info.
490 MUST_USE_RESULT MaybeObject* AllocateSerializedScopeInfo(int length);
491
486 // Allocates an empty PolymorphicCodeCache. 492 // Allocates an empty PolymorphicCodeCache.
487 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache(); 493 MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache();
488 494
489 // Clear the Instanceof cache (used when a prototype changes). 495 // Clear the Instanceof cache (used when a prototype changes).
490 inline void ClearInstanceofCache(); 496 inline void ClearInstanceofCache();
491 497
492 // Allocates and fully initializes a String. There are two String 498 // Allocates and fully initializes a String. There are two String
493 // encodings: ASCII and two byte. One should choose between the three string 499 // 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 500 // allocation functions based on the encoding of the string buffer used to
495 // initialized the string. 501 // initialized the string.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 // Allocate a catch context. 667 // Allocate a catch context.
662 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, 668 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function,
663 Context* previous, 669 Context* previous,
664 String* name, 670 String* name,
665 Object* thrown_object); 671 Object* thrown_object);
666 // Allocate a 'with' context. 672 // Allocate a 'with' context.
667 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function, 673 MUST_USE_RESULT MaybeObject* AllocateWithContext(JSFunction* function,
668 Context* previous, 674 Context* previous,
669 JSObject* extension); 675 JSObject* extension);
670 676
677 // Allocate a block context.
678 MUST_USE_RESULT MaybeObject* AllocateBlockContext(JSFunction* function,
679 Context* previous,
680 SerializedScopeInfo* info);
681
671 // Allocates a new utility object in the old generation. 682 // Allocates a new utility object in the old generation.
672 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type); 683 MUST_USE_RESULT MaybeObject* AllocateStruct(InstanceType type);
673 684
674 // Allocates a function initialized with a shared part. 685 // Allocates a function initialized with a shared part.
675 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 686 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
676 // failed. 687 // failed.
677 // Please note this does not perform a garbage collection. 688 // Please note this does not perform a garbage collection.
678 MUST_USE_RESULT MaybeObject* AllocateFunction( 689 MUST_USE_RESULT MaybeObject* AllocateFunction(
679 Map* function_map, 690 Map* function_map,
680 SharedFunctionInfo* shared, 691 SharedFunctionInfo* shared,
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2317 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2307 }; 2318 };
2308 #endif // DEBUG || LIVE_OBJECT_LIST 2319 #endif // DEBUG || LIVE_OBJECT_LIST
2309 2320
2310 2321
2311 } } // namespace v8::internal 2322 } } // namespace v8::internal
2312 2323
2313 #undef HEAP 2324 #undef HEAP
2314 2325
2315 #endif // V8_HEAP_H_ 2326 #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