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

Side by Side Diff: src/isolate.h

Issue 2862032: [Isolates] Move more statics (part IV) (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 5 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/ia32/stub-cache-ia32.cc ('k') | src/regexp-macro-assembler.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 #define ISOLATE_PLATFORM_INIT_LIST(V) \ 177 #define ISOLATE_PLATFORM_INIT_LIST(V) \
178 /* VirtualFrame::SpilledScope state */ \ 178 /* VirtualFrame::SpilledScope state */ \
179 V(bool, is_virtual_frame_in_spilled_scope, false) 179 V(bool, is_virtual_frame_in_spilled_scope, false)
180 180
181 #else 181 #else
182 182
183 #define ISOLATE_PLATFORM_INIT_LIST(V) 183 #define ISOLATE_PLATFORM_INIT_LIST(V)
184 184
185 #endif 185 #endif
186 186
187
188 #ifdef DEBUG
189
190 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) \
191 V(CommentStatistic, paged_space_comments_statistics, \
192 CommentStatistic::kMaxComments + 1)
193 #else
194
195 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
196
197 #endif
198
187 #define ISOLATE_INIT_ARRAY_LIST(V) \ 199 #define ISOLATE_INIT_ARRAY_LIST(V) \
188 /* SerializerDeserializer state. */ \ 200 /* SerializerDeserializer state. */ \
189 V(Object*, serialize_partial_snapshot_cache, kPartialSnapshotCacheCapacity) \ 201 V(Object*, serialize_partial_snapshot_cache, kPartialSnapshotCacheCapacity) \
190 V(int, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) 202 V(int, jsregexp_static_offsets_vector, kJSRegexpStaticOffsetsVectorSize) \
203 ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
204
205 typedef List<HeapObject*, PreallocatedStorage> DebugObjectCache;
191 206
192 #define ISOLATE_INIT_LIST(V) \ 207 #define ISOLATE_INIT_LIST(V) \
193 /* AssertNoZoneAllocation state. */ \ 208 /* AssertNoZoneAllocation state. */ \
194 V(bool, zone_allow_allocation, true) \ 209 V(bool, zone_allow_allocation, true) \
195 /* SerializerDeserializer state. */ \ 210 /* SerializerDeserializer state. */ \
196 V(int, serialize_partial_snapshot_cache_length, 0) \ 211 V(int, serialize_partial_snapshot_cache_length, 0) \
197 /* Assembler state. */ \ 212 /* Assembler state. */ \
198 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \ 213 /* A previously allocated buffer of kMinimalBufferSize bytes, or NULL. */ \
199 V(byte*, assembler_spare_buffer, NULL) \ 214 V(byte*, assembler_spare_buffer, NULL) \
200 /*This static counter ensures that NativeAllocationCheckers can be nested.*/ \ 215 /*This static counter ensures that NativeAllocationCheckers can be nested.*/ \
201 V(int, allocation_disallowed, 0) \ 216 V(int, allocation_disallowed, 0) \
202 V(FatalErrorCallback, exception_behavior, NULL) \ 217 V(FatalErrorCallback, exception_behavior, NULL) \
203 V(v8::Debug::MessageHandler, message_handler, NULL) \ 218 V(v8::Debug::MessageHandler, message_handler, NULL) \
204 /* To distinguish the function templates, so that we can find them in the */ \ 219 /* To distinguish the function templates, so that we can find them in the */ \
205 /* function cache of the global context. */ \ 220 /* function cache of the global context. */ \
206 V(int, next_serial_number, 0) \ 221 V(int, next_serial_number, 0) \
207 V(ExternalReferenceRedirector*, external_reference_redirector, NULL) \ 222 V(ExternalReferenceRedirector*, external_reference_redirector, NULL) \
208 V(bool, always_allow_natives_syntax, false) \ 223 V(bool, always_allow_natives_syntax, false) \
209 /* A stack of VM states. */ \ 224 /* A stack of VM states. */ \
210 V(VMState*, vm_state, NULL) \ 225 V(VMState*, vm_state, NULL) \
211 /* Part of the state of liveedit. */ \ 226 /* Part of the state of liveedit. */ \
212 V(FunctionInfoListener*, active_function_info_listener, NULL) \ 227 V(FunctionInfoListener*, active_function_info_listener, NULL) \
213 /* State for Relocatable. */ \ 228 /* State for Relocatable. */ \
214 V(Relocatable*, relocatable_top, NULL) \ 229 V(Relocatable*, relocatable_top, NULL) \
215 /* State for CodeEntry in profile-generator. */ \ 230 /* State for CodeEntry in profile-generator. */ \
216 V(unsigned, code_entry_next_call_uid, NULL) \ 231 V(unsigned, code_entry_next_call_uid, NULL) \
232 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \
233 V(Object*, string_stream_current_security_token, NULL) \
217 ISOLATE_PLATFORM_INIT_LIST(V) 234 ISOLATE_PLATFORM_INIT_LIST(V)
218 235
219 class Isolate { 236 class Isolate {
220 public: 237 public:
221 ~Isolate(); 238 ~Isolate();
222 239
223 enum AddressId { 240 enum AddressId {
224 #define C(name) k_##name, 241 #define C(name) k_##name,
225 ISOLATE_ADDRESS_LIST(C) 242 ISOLATE_ADDRESS_LIST(C)
226 ISOLATE_ADDRESS_LIST_PROF(C) 243 ISOLATE_ADDRESS_LIST_PROF(C)
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 StringInputBuffer* liveedit_compare_substrings_buf2() { 601 StringInputBuffer* liveedit_compare_substrings_buf2() {
585 return &liveedit_compare_substrings_buf2_; 602 return &liveedit_compare_substrings_buf2_;
586 } 603 }
587 604
588 StaticResource<SafeStringInputBuffer>* compiler_safe_string_input_buffer() { 605 StaticResource<SafeStringInputBuffer>* compiler_safe_string_input_buffer() {
589 return &compiler_safe_string_input_buffer_; 606 return &compiler_safe_string_input_buffer_;
590 } 607 }
591 608
592 Builtins* builtins() { return &builtins_; } 609 Builtins* builtins() { return &builtins_; }
593 610
611 unibrow::Mapping<unibrow::Ecma262Canonicalize>*
612 regexp_macro_assembler_canonicalize() {
613 return &regexp_macro_assembler_canonicalize_;
614 }
615
594 void* PreallocatedStorageNew(size_t size); 616 void* PreallocatedStorageNew(size_t size);
595 void PreallocatedStorageDelete(void* p); 617 void PreallocatedStorageDelete(void* p);
596 void PreallocatedStorageInit(size_t size); 618 void PreallocatedStorageInit(size_t size);
597 619
598 #ifdef ENABLE_DEBUGGER_SUPPORT 620 #ifdef ENABLE_DEBUGGER_SUPPORT
599 Debugger* debugger() { return debugger_; } 621 Debugger* debugger() { return debugger_; }
600 #endif 622 #endif
601 623
602 #ifdef DEBUG 624 #ifdef DEBUG
603 HistogramInfo* heap_histograms() { return heap_histograms_; } 625 HistogramInfo* heap_histograms() { return heap_histograms_; }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 StringInputBuffer liveedit_compare_substrings_buf1_; 720 StringInputBuffer liveedit_compare_substrings_buf1_;
699 StringInputBuffer liveedit_compare_substrings_buf2_; 721 StringInputBuffer liveedit_compare_substrings_buf2_;
700 StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_; 722 StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_;
701 Builtins builtins_; 723 Builtins builtins_;
702 StringTracker* string_tracker_; 724 StringTracker* string_tracker_;
703 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; 725 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_;
704 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; 726 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_;
705 StringInputBuffer objects_string_compare_buffer_a_; 727 StringInputBuffer objects_string_compare_buffer_a_;
706 StringInputBuffer objects_string_compare_buffer_b_; 728 StringInputBuffer objects_string_compare_buffer_b_;
707 StaticResource<StringInputBuffer> objects_string_input_buffer_; 729 StaticResource<StringInputBuffer> objects_string_input_buffer_;
730 unibrow::Mapping<unibrow::Ecma262Canonicalize>
731 regexp_macro_assembler_canonicalize_;
708 732
709 #ifdef DEBUG 733 #ifdef DEBUG
710 // A static array of histogram info for each type. 734 // A static array of histogram info for each type.
711 HistogramInfo heap_histograms_[LAST_TYPE + 1]; 735 HistogramInfo heap_histograms_[LAST_TYPE + 1];
712 JSObject::SpillInformation js_spill_information_; 736 JSObject::SpillInformation js_spill_information_;
713 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; 737 int code_kind_statistics_[Code::NUMBER_OF_KINDS];
714 #endif 738 #endif
715 739
716 #ifdef ENABLE_DEBUGGER_SUPPORT 740 #ifdef ENABLE_DEBUGGER_SUPPORT
717 Debugger* debugger_; 741 Debugger* debugger_;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 // Temporary macro to be used to flag classes that are completely converted 893 // Temporary macro to be used to flag classes that are completely converted
870 // to be isolate-friendly. Their mix of static/nonstatic methods/fields is 894 // to be isolate-friendly. Their mix of static/nonstatic methods/fields is
871 // correct. 895 // correct.
872 #define ISOLATED_CLASS class 896 #define ISOLATED_CLASS class
873 897
874 } } // namespace v8::internal 898 } } // namespace v8::internal
875 899
876 #include "allocation-inl.h" 900 #include "allocation-inl.h"
877 901
878 #endif // V8_ISOLATE_H_ 902 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698