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

Side by Side Diff: src/heap.h

Issue 10832342: Rename "global context" to "native context", (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« src/contexts.h ('K') | « 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 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 V(Oddball, the_hole_value, TheHoleValue) \ 57 V(Oddball, the_hole_value, TheHoleValue) \
58 V(Oddball, null_value, NullValue) \ 58 V(Oddball, null_value, NullValue) \
59 V(Oddball, true_value, TrueValue) \ 59 V(Oddball, true_value, TrueValue) \
60 V(Oddball, false_value, FalseValue) \ 60 V(Oddball, false_value, FalseValue) \
61 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ 61 V(Map, global_property_cell_map, GlobalPropertyCellMap) \
62 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ 62 V(Map, shared_function_info_map, SharedFunctionInfoMap) \
63 V(Map, meta_map, MetaMap) \ 63 V(Map, meta_map, MetaMap) \
64 V(Map, ascii_symbol_map, AsciiSymbolMap) \ 64 V(Map, ascii_symbol_map, AsciiSymbolMap) \
65 V(Map, ascii_string_map, AsciiStringMap) \ 65 V(Map, ascii_string_map, AsciiStringMap) \
66 V(Map, heap_number_map, HeapNumberMap) \ 66 V(Map, heap_number_map, HeapNumberMap) \
67 V(Map, global_context_map, GlobalContextMap) \ 67 V(Map, native_context_map, NativeContextMap) \
Michael Starzinger 2012/08/16 16:33:56 Add a few spaces to make the '\'es align.
rossberg 2012/08/17 08:40:32 Done.
68 V(Map, fixed_array_map, FixedArrayMap) \ 68 V(Map, fixed_array_map, FixedArrayMap) \
69 V(Map, code_map, CodeMap) \ 69 V(Map, code_map, CodeMap) \
70 V(Map, scope_info_map, ScopeInfoMap) \ 70 V(Map, scope_info_map, ScopeInfoMap) \
71 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 71 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
72 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 72 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
73 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ 73 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
74 V(Map, hash_table_map, HashTableMap) \ 74 V(Map, hash_table_map, HashTableMap) \
75 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ 75 V(FixedArray, empty_fixed_array, EmptyFixedArray) \
76 V(ByteArray, empty_byte_array, EmptyByteArray) \ 76 V(ByteArray, empty_byte_array, EmptyByteArray) \
77 V(String, empty_string, EmptyString) \ 77 V(String, empty_string, EmptyString) \
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // Please note this does not perform a garbage collection. 815 // Please note this does not perform a garbage collection.
816 MUST_USE_RESULT MaybeObject* AllocateFixedDoubleArrayWithHoles( 816 MUST_USE_RESULT MaybeObject* AllocateFixedDoubleArrayWithHoles(
817 int length, 817 int length,
818 PretenureFlag pretenure = NOT_TENURED); 818 PretenureFlag pretenure = NOT_TENURED);
819 819
820 // AllocateHashTable is identical to AllocateFixedArray except 820 // AllocateHashTable is identical to AllocateFixedArray except
821 // that the resulting object has hash_table_map as map. 821 // that the resulting object has hash_table_map as map.
822 MUST_USE_RESULT MaybeObject* AllocateHashTable( 822 MUST_USE_RESULT MaybeObject* AllocateHashTable(
823 int length, PretenureFlag pretenure = NOT_TENURED); 823 int length, PretenureFlag pretenure = NOT_TENURED);
824 824
825 // Allocate a global (but otherwise uninitialized) context. 825 // Allocate a native (but otherwise uninitialized) context.
826 MUST_USE_RESULT MaybeObject* AllocateGlobalContext(); 826 MUST_USE_RESULT MaybeObject* AllocateNativeContext();
827 827
828 // Allocate a module context. 828 // Allocate a module context.
829 MUST_USE_RESULT MaybeObject* AllocateModuleContext(ScopeInfo* scope_info); 829 MUST_USE_RESULT MaybeObject* AllocateModuleContext(ScopeInfo* scope_info);
830 830
831 // Allocate a function context. 831 // Allocate a function context.
832 MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length, 832 MUST_USE_RESULT MaybeObject* AllocateFunctionContext(int length,
833 JSFunction* function); 833 JSFunction* function);
834 834
835 // Allocate a catch context. 835 // Allocate a catch context.
836 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function, 836 MUST_USE_RESULT MaybeObject* AllocateCatchContext(JSFunction* function,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 #define SYMBOL_ACCESSOR(name, str) String* name() { \ 1142 #define SYMBOL_ACCESSOR(name, str) String* name() { \
1143 return String::cast(roots_[k##name##RootIndex]); \ 1143 return String::cast(roots_[k##name##RootIndex]); \
1144 } 1144 }
1145 SYMBOL_LIST(SYMBOL_ACCESSOR) 1145 SYMBOL_LIST(SYMBOL_ACCESSOR)
1146 #undef SYMBOL_ACCESSOR 1146 #undef SYMBOL_ACCESSOR
1147 1147
1148 // The hidden_symbol is special because it is the empty string, but does 1148 // The hidden_symbol is special because it is the empty string, but does
1149 // not match the empty string. 1149 // not match the empty string.
1150 String* hidden_symbol() { return hidden_symbol_; } 1150 String* hidden_symbol() { return hidden_symbol_; }
1151 1151
1152 void set_global_contexts_list(Object* object) { 1152 void set_native_contexts_list(Object* object) {
1153 global_contexts_list_ = object; 1153 native_contexts_list_ = object;
1154 } 1154 }
1155 Object* global_contexts_list() { return global_contexts_list_; } 1155 Object* native_contexts_list() { return native_contexts_list_; }
1156 1156
1157 // Number of mark-sweeps. 1157 // Number of mark-sweeps.
1158 unsigned int ms_count() { return ms_count_; } 1158 unsigned int ms_count() { return ms_count_; }
1159 1159
1160 // Iterates over all roots in the heap. 1160 // Iterates over all roots in the heap.
1161 void IterateRoots(ObjectVisitor* v, VisitMode mode); 1161 void IterateRoots(ObjectVisitor* v, VisitMode mode);
1162 // Iterates over all strong roots in the heap. 1162 // Iterates over all strong roots in the heap.
1163 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); 1163 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode);
1164 // Iterates over all the other roots in the heap. 1164 // Iterates over all the other roots in the heap.
1165 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); 1165 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 // Update the next script id. 1219 // Update the next script id.
1220 inline void SetLastScriptId(Object* last_script_id); 1220 inline void SetLastScriptId(Object* last_script_id);
1221 1221
1222 // Generated code can embed this address to get access to the roots. 1222 // Generated code can embed this address to get access to the roots.
1223 Object** roots_array_start() { return roots_; } 1223 Object** roots_array_start() { return roots_; }
1224 1224
1225 Address* store_buffer_top_address() { 1225 Address* store_buffer_top_address() {
1226 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]); 1226 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]);
1227 } 1227 }
1228 1228
1229 // Get address of global contexts list for serialization support. 1229 // Get address of native contexts list for serialization support.
1230 Object** global_contexts_list_address() { 1230 Object** native_contexts_list_address() {
1231 return &global_contexts_list_; 1231 return &native_contexts_list_;
1232 } 1232 }
1233 1233
1234 #ifdef DEBUG 1234 #ifdef DEBUG
1235 void Print(); 1235 void Print();
1236 void PrintHandles(); 1236 void PrintHandles();
1237 1237
1238 // Verify the heap is in its normal state before or after a GC. 1238 // Verify the heap is in its normal state before or after a GC.
1239 void Verify(); 1239 void Verify();
1240 1240
1241 void OldPointerSpaceCheckStoreBuffer(); 1241 void OldPointerSpaceCheckStoreBuffer();
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 // by global handles 1769 // by global handles
1770 intptr_t amount_of_external_allocated_memory_; 1770 intptr_t amount_of_external_allocated_memory_;
1771 1771
1772 // Caches the amount of external memory registered at the last global gc. 1772 // Caches the amount of external memory registered at the last global gc.
1773 intptr_t amount_of_external_allocated_memory_at_last_global_gc_; 1773 intptr_t amount_of_external_allocated_memory_at_last_global_gc_;
1774 1774
1775 // Indicates that an allocation has failed in the old generation since the 1775 // Indicates that an allocation has failed in the old generation since the
1776 // last GC. 1776 // last GC.
1777 int old_gen_exhausted_; 1777 int old_gen_exhausted_;
1778 1778
1779 Object* global_contexts_list_; 1779 Object* native_contexts_list_;
1780 1780
1781 StoreBufferRebuilder store_buffer_rebuilder_; 1781 StoreBufferRebuilder store_buffer_rebuilder_;
1782 1782
1783 struct StringTypeTable { 1783 struct StringTypeTable {
1784 InstanceType type; 1784 InstanceType type;
1785 int size; 1785 int size;
1786 RootListIndex index; 1786 RootListIndex index;
1787 }; 1787 };
1788 1788
1789 struct ConstantSymbolTable { 1789 struct ConstantSymbolTable {
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2773 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2774 2774
2775 private: 2775 private:
2776 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2776 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2777 }; 2777 };
2778 #endif // DEBUG || LIVE_OBJECT_LIST 2778 #endif // DEBUG || LIVE_OBJECT_LIST
2779 2779
2780 } } // namespace v8::internal 2780 } } // namespace v8::internal
2781 2781
2782 #endif // V8_HEAP_H_ 2782 #endif // V8_HEAP_H_
OLDNEW
« src/contexts.h ('K') | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698