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

Side by Side Diff: src/isolate.h

Issue 2864032: [Isolates] Statics 7: ExternalReference*/Simulator/dtoa... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: rebase 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/dtoa-config.c ('k') | src/isolate.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 27 matching lines...) Expand all
38 #include "frames-inl.h" 38 #include "frames-inl.h"
39 #include "frames.h" 39 #include "frames.h"
40 #include "global-handles.h" 40 #include "global-handles.h"
41 #include "handles.h" 41 #include "handles.h"
42 #include "heap.h" 42 #include "heap.h"
43 #include "regexp-stack.h" 43 #include "regexp-stack.h"
44 #include "runtime.h" 44 #include "runtime.h"
45 #include "zone.h" 45 #include "zone.h"
46 #include "../include/v8-debug.h" 46 #include "../include/v8-debug.h"
47 47
48
49 #if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM)
50 namespace assembler {
51 namespace arm {
52 class Redirection;
53 }
54 }
55 #endif
56
57
48 namespace v8 { 58 namespace v8 {
49 namespace internal { 59 namespace internal {
50 60
51 class AstSentinels; 61 class AstSentinels;
52 class Bootstrapper; 62 class Bootstrapper;
53 class CodeGenerator; 63 class CodeGenerator;
54 class CompilationCache; 64 class CompilationCache;
55 class ContextSlotCache; 65 class ContextSlotCache;
56 class ContextSwitcher; 66 class ContextSwitcher;
57 class CodeRange; 67 class CodeRange;
58 class Counters; 68 class Counters;
59 class CpuFeatures; 69 class CpuFeatures;
60 class CpuProfiler; 70 class CpuProfiler;
61 class Deserializer; 71 class Deserializer;
62 class EmptyStatement; 72 class EmptyStatement;
73 class ExternalReferenceTable;
63 class FunctionInfoListener; 74 class FunctionInfoListener;
64 class HandleScopeImplementer; 75 class HandleScopeImplementer;
65 class HeapProfiler; 76 class HeapProfiler;
66 class InlineRuntimeFunctionsTable; 77 class InlineRuntimeFunctionsTable;
67 class NoAllocationStringAllocator; 78 class NoAllocationStringAllocator;
68 class PreallocatedMemoryThread; 79 class PreallocatedMemoryThread;
69 class ProducerHeapProfile; 80 class ProducerHeapProfile;
70 class RegExpStack; 81 class RegExpStack;
71 class SaveContext; 82 class SaveContext;
72 class StubCache; 83 class StubCache;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 private: 201 private:
191 Address try_catch_handler_address_; 202 Address try_catch_handler_address_;
192 }; 203 };
193 204
194 #if defined(V8_TARGET_ARCH_ARM) 205 #if defined(V8_TARGET_ARCH_ARM)
195 206
196 #define ISOLATE_PLATFORM_INIT_LIST(V) \ 207 #define ISOLATE_PLATFORM_INIT_LIST(V) \
197 /* VirtualFrame::SpilledScope state */ \ 208 /* VirtualFrame::SpilledScope state */ \
198 V(bool, is_virtual_frame_in_spilled_scope, false) 209 V(bool, is_virtual_frame_in_spilled_scope, false)
199 210
211 #if !defined(__arm__)
212 class HashMap;
213 #endif
214
200 #else 215 #else
201 216
202 #define ISOLATE_PLATFORM_INIT_LIST(V) 217 #define ISOLATE_PLATFORM_INIT_LIST(V)
203 218
204 #endif 219 #endif
205 220
206 #ifdef ENABLE_DEBUGGER_SUPPORT 221 #ifdef ENABLE_DEBUGGER_SUPPORT
207 222
208 #define ISOLATE_DEBUGGER_INIT_LIST(V) \ 223 #define ISOLATE_DEBUGGER_INIT_LIST(V) \
209 V(v8::Debug::EventCallback, debug_event_callback, NULL) \ 224 V(v8::Debug::EventCallback, debug_event_callback, NULL) \
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 /* State for Relocatable. */ \ 284 /* State for Relocatable. */ \
270 V(Relocatable*, relocatable_top, NULL) \ 285 V(Relocatable*, relocatable_top, NULL) \
271 /* State for CodeEntry in profile-generator. */ \ 286 /* State for CodeEntry in profile-generator. */ \
272 V(unsigned, code_entry_next_call_uid, NULL) \ 287 V(unsigned, code_entry_next_call_uid, NULL) \
273 V(CodeGenerator*, current_code_generator, NULL) \ 288 V(CodeGenerator*, current_code_generator, NULL) \
274 V(bool, jump_target_compiling_deferred_code, false) \ 289 V(bool, jump_target_compiling_deferred_code, false) \
275 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ 290 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \
276 V(Object*, string_stream_current_security_token, NULL) \ 291 V(Object*, string_stream_current_security_token, NULL) \
277 /* TODO(isolates): Release this on destruction? */ \ 292 /* TODO(isolates): Release this on destruction? */ \
278 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ 293 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \
294 /* Serializer state. */ \
295 V(ExternalReferenceTable*, external_reference_table, NULL) \
279 ISOLATE_PLATFORM_INIT_LIST(V) \ 296 ISOLATE_PLATFORM_INIT_LIST(V) \
280 ISOLATE_LOGGING_INIT_LIST(V) \ 297 ISOLATE_LOGGING_INIT_LIST(V) \
281 ISOLATE_DEBUGGER_INIT_LIST(V) 298 ISOLATE_DEBUGGER_INIT_LIST(V)
282 299
283 class Isolate { 300 class Isolate {
284 public: 301 public:
285 ~Isolate(); 302 ~Isolate();
286 303
287 enum AddressId { 304 enum AddressId {
288 #define C(name) k_##name, 305 #define C(name) k_##name,
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 #ifdef DEBUG 714 #ifdef DEBUG
698 HistogramInfo* heap_histograms() { return heap_histograms_; } 715 HistogramInfo* heap_histograms() { return heap_histograms_; }
699 716
700 JSObject::SpillInformation* js_spill_information() { 717 JSObject::SpillInformation* js_spill_information() {
701 return &js_spill_information_; 718 return &js_spill_information_;
702 } 719 }
703 720
704 int* code_kind_statistics() { return code_kind_statistics_; } 721 int* code_kind_statistics() { return code_kind_statistics_; }
705 #endif 722 #endif
706 723
724 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__)
725 v8::internal::Thread::LocalStorageKey* simulator_key() {
726 return &simulator_key_;
727 }
728
729 bool simulator_initialized() { return simulator_initialized_; }
730 void set_simulator_initialized(bool initialized) {
731 simulator_initialized_ = initialized;
732 }
733
734 HashMap* simulator_i_cache() { return simulator_i_cache_; }
735 void set_simulator_i_cache(HashMap* hash_map) {
736 simulator_i_cache_ = hash_map;
737 }
738
739 assembler::arm::Redirection* simulator_redirection() {
740 return simulator_redirection_;
741 }
742 void set_simulator_redirection(assembler::arm::Redirection* redirection) {
743 simulator_redirection_ = redirection;
744 }
745 #endif
746
707 bool IsDefaultIsolate() { return this == global_isolate_; } 747 bool IsDefaultIsolate() { return this == global_isolate_; }
708 748
709 // SerializerDeserializer state. 749 // SerializerDeserializer state.
710 static const int kPartialSnapshotCacheCapacity = 1300; 750 static const int kPartialSnapshotCacheCapacity = 1300;
711 751
712 static const int kJSRegexpStaticOffsetsVectorSize = 50; 752 static const int kJSRegexpStaticOffsetsVectorSize = 50;
713 753
714 static int number_of_isolates() { return number_of_isolates_; } 754 static int number_of_isolates() { return number_of_isolates_; }
715 755
716 // Initialize process-wide state. Generally called from a static initializer, 756 // Initialize process-wide state. Generally called from a static initializer,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 StringInputBuffer objects_string_compare_buffer_a_; 841 StringInputBuffer objects_string_compare_buffer_a_;
802 StringInputBuffer objects_string_compare_buffer_b_; 842 StringInputBuffer objects_string_compare_buffer_b_;
803 StaticResource<StringInputBuffer> objects_string_input_buffer_; 843 StaticResource<StringInputBuffer> objects_string_input_buffer_;
804 unibrow::Mapping<unibrow::Ecma262Canonicalize> 844 unibrow::Mapping<unibrow::Ecma262Canonicalize>
805 regexp_macro_assembler_canonicalize_; 845 regexp_macro_assembler_canonicalize_;
806 RegExpStack* regexp_stack_; 846 RegExpStack* regexp_stack_;
807 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; 847 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
808 ZoneObjectList frame_element_constant_list_; 848 ZoneObjectList frame_element_constant_list_;
809 ZoneObjectList result_constant_list_; 849 ZoneObjectList result_constant_list_;
810 850
851 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__)
852 // Create one simulator per thread and keep it in thread local storage.
853 v8::internal::Thread::LocalStorageKey simulator_key_;
854 bool simulator_initialized_;
855 HashMap* simulator_i_cache_;
856 assembler::arm::Redirection* simulator_redirection_;
857 #endif
811 858
812 #ifdef DEBUG 859 #ifdef DEBUG
813 // A static array of histogram info for each type. 860 // A static array of histogram info for each type.
814 HistogramInfo heap_histograms_[LAST_TYPE + 1]; 861 HistogramInfo heap_histograms_[LAST_TYPE + 1];
815 JSObject::SpillInformation js_spill_information_; 862 JSObject::SpillInformation js_spill_information_;
816 int code_kind_statistics_[Code::NUMBER_OF_KINDS]; 863 int code_kind_statistics_[Code::NUMBER_OF_KINDS];
817 #endif 864 #endif
818 865
819 #ifdef ENABLE_DEBUGGER_SUPPORT 866 #ifdef ENABLE_DEBUGGER_SUPPORT
820 Debugger* debugger_; 867 Debugger* debugger_;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 #define ISOLATED_CLASS class 1027 #define ISOLATED_CLASS class
981 1028
982 } } // namespace v8::internal 1029 } } // namespace v8::internal
983 1030
984 // TODO(isolates): Get rid of these -inl.h includes and place them only where 1031 // TODO(isolates): Get rid of these -inl.h includes and place them only where
985 // they're needed. 1032 // they're needed.
986 #include "allocation-inl.h" 1033 #include "allocation-inl.h"
987 #include "zone-inl.h" 1034 #include "zone-inl.h"
988 1035
989 #endif // V8_ISOLATE_H_ 1036 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/dtoa-config.c ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698