OLD | NEW |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 class DeoptimizerData; | 59 class DeoptimizerData; |
60 class Deserializer; | 60 class Deserializer; |
61 class EmptyStatement; | 61 class EmptyStatement; |
62 class ExternalReferenceTable; | 62 class ExternalReferenceTable; |
63 class Factory; | 63 class Factory; |
64 class FunctionInfoListener; | 64 class FunctionInfoListener; |
65 class HandleScopeImplementer; | 65 class HandleScopeImplementer; |
66 class HeapProfiler; | 66 class HeapProfiler; |
67 class InlineRuntimeFunctionsTable; | 67 class InlineRuntimeFunctionsTable; |
68 class NoAllocationStringAllocator; | 68 class NoAllocationStringAllocator; |
69 class PcToCodeCache; | 69 class InnerPointerToCodeCache; |
70 class PreallocatedMemoryThread; | 70 class PreallocatedMemoryThread; |
71 class RegExpStack; | 71 class RegExpStack; |
72 class SaveContext; | 72 class SaveContext; |
73 class UnicodeCache; | 73 class UnicodeCache; |
74 class StringInputBuffer; | 74 class StringInputBuffer; |
75 class StringTracker; | 75 class StringTracker; |
76 class StubCache; | 76 class StubCache; |
77 class ThreadManager; | 77 class ThreadManager; |
78 class ThreadState; | 78 class ThreadState; |
79 class ThreadVisitor; // Defined in v8threads.h | 79 class ThreadVisitor; // Defined in v8threads.h |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 HandleScopeImplementer* handle_scope_implementer() { | 834 HandleScopeImplementer* handle_scope_implementer() { |
835 ASSERT(handle_scope_implementer_); | 835 ASSERT(handle_scope_implementer_); |
836 return handle_scope_implementer_; | 836 return handle_scope_implementer_; |
837 } | 837 } |
838 Zone* zone() { return &zone_; } | 838 Zone* zone() { return &zone_; } |
839 | 839 |
840 UnicodeCache* unicode_cache() { | 840 UnicodeCache* unicode_cache() { |
841 return unicode_cache_; | 841 return unicode_cache_; |
842 } | 842 } |
843 | 843 |
844 PcToCodeCache* pc_to_code_cache() { return pc_to_code_cache_; } | 844 InnerPointerToCodeCache* inner_pointer_to_code_cache() { |
| 845 return inner_pointer_to_code_cache_; |
| 846 } |
845 | 847 |
846 StringInputBuffer* write_input_buffer() { return write_input_buffer_; } | 848 StringInputBuffer* write_input_buffer() { return write_input_buffer_; } |
847 | 849 |
848 GlobalHandles* global_handles() { return global_handles_; } | 850 GlobalHandles* global_handles() { return global_handles_; } |
849 | 851 |
850 ThreadManager* thread_manager() { return thread_manager_; } | 852 ThreadManager* thread_manager() { return thread_manager_; } |
851 | 853 |
852 ContextSwitcher* context_switcher() { return context_switcher_; } | 854 ContextSwitcher* context_switcher() { return context_switcher_; } |
853 | 855 |
854 void set_context_switcher(ContextSwitcher* switcher) { | 856 void set_context_switcher(ContextSwitcher* switcher) { |
(...skipping 17 matching lines...) Expand all Loading... |
872 StringInputBuffer* objects_string_compare_buffer_b() { | 874 StringInputBuffer* objects_string_compare_buffer_b() { |
873 return &objects_string_compare_buffer_b_; | 875 return &objects_string_compare_buffer_b_; |
874 } | 876 } |
875 | 877 |
876 StaticResource<StringInputBuffer>* objects_string_input_buffer() { | 878 StaticResource<StringInputBuffer>* objects_string_input_buffer() { |
877 return &objects_string_input_buffer_; | 879 return &objects_string_input_buffer_; |
878 } | 880 } |
879 | 881 |
880 RuntimeState* runtime_state() { return &runtime_state_; } | 882 RuntimeState* runtime_state() { return &runtime_state_; } |
881 | 883 |
| 884 void set_fp_stubs_generated(bool value) { |
| 885 fp_stubs_generated_ = value; |
| 886 } |
| 887 |
| 888 bool fp_stubs_generated() { return fp_stubs_generated_; } |
| 889 |
882 StaticResource<SafeStringInputBuffer>* compiler_safe_string_input_buffer() { | 890 StaticResource<SafeStringInputBuffer>* compiler_safe_string_input_buffer() { |
883 return &compiler_safe_string_input_buffer_; | 891 return &compiler_safe_string_input_buffer_; |
884 } | 892 } |
885 | 893 |
886 Builtins* builtins() { return &builtins_; } | 894 Builtins* builtins() { return &builtins_; } |
887 | 895 |
888 unibrow::Mapping<unibrow::Ecma262Canonicalize>* | 896 unibrow::Mapping<unibrow::Ecma262Canonicalize>* |
889 regexp_macro_assembler_canonicalize() { | 897 regexp_macro_assembler_canonicalize() { |
890 return ®exp_macro_assembler_canonicalize_; | 898 return ®exp_macro_assembler_canonicalize_; |
891 } | 899 } |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 KeyedLookupCache* keyed_lookup_cache_; | 1131 KeyedLookupCache* keyed_lookup_cache_; |
1124 ContextSlotCache* context_slot_cache_; | 1132 ContextSlotCache* context_slot_cache_; |
1125 DescriptorLookupCache* descriptor_lookup_cache_; | 1133 DescriptorLookupCache* descriptor_lookup_cache_; |
1126 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; | 1134 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; |
1127 HandleScopeImplementer* handle_scope_implementer_; | 1135 HandleScopeImplementer* handle_scope_implementer_; |
1128 UnicodeCache* unicode_cache_; | 1136 UnicodeCache* unicode_cache_; |
1129 Zone zone_; | 1137 Zone zone_; |
1130 PreallocatedStorage in_use_list_; | 1138 PreallocatedStorage in_use_list_; |
1131 PreallocatedStorage free_list_; | 1139 PreallocatedStorage free_list_; |
1132 bool preallocated_storage_preallocated_; | 1140 bool preallocated_storage_preallocated_; |
1133 PcToCodeCache* pc_to_code_cache_; | 1141 InnerPointerToCodeCache* inner_pointer_to_code_cache_; |
1134 StringInputBuffer* write_input_buffer_; | 1142 StringInputBuffer* write_input_buffer_; |
1135 GlobalHandles* global_handles_; | 1143 GlobalHandles* global_handles_; |
1136 ContextSwitcher* context_switcher_; | 1144 ContextSwitcher* context_switcher_; |
1137 ThreadManager* thread_manager_; | 1145 ThreadManager* thread_manager_; |
1138 RuntimeState runtime_state_; | 1146 RuntimeState runtime_state_; |
| 1147 bool fp_stubs_generated_; |
1139 StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_; | 1148 StaticResource<SafeStringInputBuffer> compiler_safe_string_input_buffer_; |
1140 Builtins builtins_; | 1149 Builtins builtins_; |
1141 StringTracker* string_tracker_; | 1150 StringTracker* string_tracker_; |
1142 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; | 1151 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; |
1143 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; | 1152 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; |
1144 StringInputBuffer objects_string_compare_buffer_a_; | 1153 StringInputBuffer objects_string_compare_buffer_a_; |
1145 StringInputBuffer objects_string_compare_buffer_b_; | 1154 StringInputBuffer objects_string_compare_buffer_b_; |
1146 StaticResource<StringInputBuffer> objects_string_input_buffer_; | 1155 StaticResource<StringInputBuffer> objects_string_input_buffer_; |
1147 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1156 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
1148 regexp_macro_assembler_canonicalize_; | 1157 regexp_macro_assembler_canonicalize_; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 | 1212 |
1204 DISALLOW_COPY_AND_ASSIGN(Isolate); | 1213 DISALLOW_COPY_AND_ASSIGN(Isolate); |
1205 }; | 1214 }; |
1206 | 1215 |
1207 | 1216 |
1208 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the | 1217 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the |
1209 // class as a work around for a bug in the generated code found with these | 1218 // class as a work around for a bug in the generated code found with these |
1210 // versions of GCC. See V8 issue 122 for details. | 1219 // versions of GCC. See V8 issue 122 for details. |
1211 class SaveContext BASE_EMBEDDED { | 1220 class SaveContext BASE_EMBEDDED { |
1212 public: | 1221 public: |
1213 explicit SaveContext(Isolate* isolate) : prev_(isolate->save_context()) { | 1222 inline explicit SaveContext(Isolate* isolate); |
1214 if (isolate->context() != NULL) { | |
1215 context_ = Handle<Context>(isolate->context()); | |
1216 #if __GNUC_VERSION__ >= 40100 && __GNUC_VERSION__ < 40300 | |
1217 dummy_ = Handle<Context>(isolate->context()); | |
1218 #endif | |
1219 } | |
1220 isolate->set_save_context(this); | |
1221 | |
1222 // If there is no JS frame under the current C frame, use the value 0. | |
1223 JavaScriptFrameIterator it(isolate); | |
1224 js_sp_ = it.done() ? 0 : it.frame()->sp(); | |
1225 } | |
1226 | 1223 |
1227 ~SaveContext() { | 1224 ~SaveContext() { |
1228 if (context_.is_null()) { | 1225 if (context_.is_null()) { |
1229 Isolate* isolate = Isolate::Current(); | 1226 Isolate* isolate = Isolate::Current(); |
1230 isolate->set_context(NULL); | 1227 isolate->set_context(NULL); |
1231 isolate->set_save_context(prev_); | 1228 isolate->set_save_context(prev_); |
1232 } else { | 1229 } else { |
1233 Isolate* isolate = context_->GetIsolate(); | 1230 Isolate* isolate = context_->GetIsolate(); |
1234 isolate->set_context(*context_); | 1231 isolate->set_context(*context_); |
1235 isolate->set_save_context(prev_); | 1232 isolate->set_save_context(prev_); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 | 1350 |
1354 // Mark the global context with out of memory. | 1351 // Mark the global context with out of memory. |
1355 inline void Context::mark_out_of_memory() { | 1352 inline void Context::mark_out_of_memory() { |
1356 global_context()->set_out_of_memory(HEAP->true_value()); | 1353 global_context()->set_out_of_memory(HEAP->true_value()); |
1357 } | 1354 } |
1358 | 1355 |
1359 | 1356 |
1360 } } // namespace v8::internal | 1357 } } // namespace v8::internal |
1361 | 1358 |
1362 #endif // V8_ISOLATE_H_ | 1359 #endif // V8_ISOLATE_H_ |
OLD | NEW |