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

Side by Side Diff: src/isolate.h

Issue 148593004: A64: Synchronize with r18084. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/ic-inl.h ('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 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 namespace v8 { 51 namespace v8 {
52 namespace internal { 52 namespace internal {
53 53
54 class Bootstrapper; 54 class Bootstrapper;
55 class CodeGenerator; 55 class CodeGenerator;
56 class CodeRange; 56 class CodeRange;
57 struct CodeStubInterfaceDescriptor; 57 struct CodeStubInterfaceDescriptor;
58 class CodeTracer; 58 class CodeTracer;
59 class CompilationCache; 59 class CompilationCache;
60 class ContextSlotCache; 60 class ContextSlotCache;
61 class ContextSwitcher;
62 class Counters; 61 class Counters;
63 class CpuFeatures; 62 class CpuFeatures;
64 class CpuProfiler; 63 class CpuProfiler;
65 class DeoptimizerData; 64 class DeoptimizerData;
66 class Deserializer; 65 class Deserializer;
67 class EmptyStatement; 66 class EmptyStatement;
68 class ExternalCallbackScope; 67 class ExternalCallbackScope;
69 class ExternalReferenceTable; 68 class ExternalReferenceTable;
70 class Factory; 69 class Factory;
71 class FunctionInfoListener; 70 class FunctionInfoListener;
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 // exception. 712 // exception.
714 bool is_out_of_memory(); 713 bool is_out_of_memory();
715 bool ignore_out_of_memory() { 714 bool ignore_out_of_memory() {
716 return thread_local_top_.ignore_out_of_memory_; 715 return thread_local_top_.ignore_out_of_memory_;
717 } 716 }
718 void set_ignore_out_of_memory(bool value) { 717 void set_ignore_out_of_memory(bool value) {
719 thread_local_top_.ignore_out_of_memory_ = value; 718 thread_local_top_.ignore_out_of_memory_ = value;
720 } 719 }
721 720
722 void PrintCurrentStackTrace(FILE* out); 721 void PrintCurrentStackTrace(FILE* out);
723 void PrintStackTrace(FILE* out, char* thread_data);
724 void PrintStack(StringStream* accumulator); 722 void PrintStack(StringStream* accumulator);
725 void PrintStack(FILE* out); 723 void PrintStack(FILE* out);
726 void PrintStack();
727 Handle<String> StackTraceString(); 724 Handle<String> StackTraceString();
728 NO_INLINE(void PushStackTraceAndDie(unsigned int magic, 725 NO_INLINE(void PushStackTraceAndDie(unsigned int magic,
729 Object* object, 726 Object* object,
730 Map* map, 727 Map* map,
731 unsigned int magic2)); 728 unsigned int magic2));
732 Handle<JSArray> CaptureCurrentStackTrace( 729 Handle<JSArray> CaptureCurrentStackTrace(
733 int frame_limit, 730 int frame_limit,
734 StackTrace::StackTraceOptions options); 731 StackTrace::StackTraceOptions options);
735 732
736 Handle<JSArray> CaptureSimpleStackTrace(Handle<JSObject> error_object, 733 Handle<JSArray> CaptureSimpleStackTrace(Handle<JSObject> error_object,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 } 915 }
919 916
920 ConsStringIteratorOp* write_iterator() { return write_iterator_; } 917 ConsStringIteratorOp* write_iterator() { return write_iterator_; }
921 918
922 GlobalHandles* global_handles() { return global_handles_; } 919 GlobalHandles* global_handles() { return global_handles_; }
923 920
924 EternalHandles* eternal_handles() { return eternal_handles_; } 921 EternalHandles* eternal_handles() { return eternal_handles_; }
925 922
926 ThreadManager* thread_manager() { return thread_manager_; } 923 ThreadManager* thread_manager() { return thread_manager_; }
927 924
928 ContextSwitcher* context_switcher() { return context_switcher_; }
929
930 void set_context_switcher(ContextSwitcher* switcher) {
931 context_switcher_ = switcher;
932 }
933
934 StringTracker* string_tracker() { return string_tracker_; } 925 StringTracker* string_tracker() { return string_tracker_; }
935 926
936 unibrow::Mapping<unibrow::Ecma262UnCanonicalize>* jsregexp_uncanonicalize() { 927 unibrow::Mapping<unibrow::Ecma262UnCanonicalize>* jsregexp_uncanonicalize() {
937 return &jsregexp_uncanonicalize_; 928 return &jsregexp_uncanonicalize_;
938 } 929 }
939 930
940 unibrow::Mapping<unibrow::CanonicalizationRange>* jsregexp_canonrange() { 931 unibrow::Mapping<unibrow::CanonicalizationRange>* jsregexp_canonrange() {
941 return &jsregexp_canonrange_; 932 return &jsregexp_canonrange_;
942 } 933 }
943 934
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1034 }
1044 1035
1045 StateTag current_vm_state() { 1036 StateTag current_vm_state() {
1046 return thread_local_top_.current_vm_state_; 1037 return thread_local_top_.current_vm_state_;
1047 } 1038 }
1048 1039
1049 void set_current_vm_state(StateTag state) { 1040 void set_current_vm_state(StateTag state) {
1050 thread_local_top_.current_vm_state_ = state; 1041 thread_local_top_.current_vm_state_ = state;
1051 } 1042 }
1052 1043
1053 void SetData(void* data) { embedder_data_ = data; } 1044 void SetData(uint32_t slot, void* data) {
1054 void* GetData() { return embedder_data_; } 1045 ASSERT(slot < Internals::kNumIsolateDataSlots);
1046 embedder_data_[slot] = data;
1047 }
1048 void* GetData(uint32_t slot) {
1049 ASSERT(slot < Internals::kNumIsolateDataSlots);
1050 return embedder_data_[slot];
1051 }
1055 1052
1056 LookupResult* top_lookup_result() { 1053 LookupResult* top_lookup_result() {
1057 return thread_local_top_.top_lookup_result_; 1054 return thread_local_top_.top_lookup_result_;
1058 } 1055 }
1059 void SetTopLookupResult(LookupResult* top) { 1056 void SetTopLookupResult(LookupResult* top) {
1060 thread_local_top_.top_lookup_result_ = top; 1057 thread_local_top_.top_lookup_result_ = top;
1061 } 1058 }
1062 1059
1063 bool IsDead() { return has_fatal_error_; } 1060 bool IsDead() { return has_fatal_error_; }
1064 void SignalFatalError() { has_fatal_error_ = true; } 1061 void SignalFatalError() { has_fatal_error_ = true; }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 friend struct InitializeGlobalState; 1154 friend struct InitializeGlobalState;
1158 1155
1159 enum State { 1156 enum State {
1160 UNINITIALIZED, // Some components may not have been allocated. 1157 UNINITIALIZED, // Some components may not have been allocated.
1161 INITIALIZED // All components are fully initialized. 1158 INITIALIZED // All components are fully initialized.
1162 }; 1159 };
1163 1160
1164 // These fields are accessed through the API, offsets must be kept in sync 1161 // These fields are accessed through the API, offsets must be kept in sync
1165 // with v8::internal::Internals (in include/v8.h) constants. This is also 1162 // with v8::internal::Internals (in include/v8.h) constants. This is also
1166 // verified in Isolate::Init() using runtime checks. 1163 // verified in Isolate::Init() using runtime checks.
1164 void* embedder_data_[Internals::kNumIsolateDataSlots];
1165 Heap heap_;
1167 State state_; // Will be padded to kApiPointerSize. 1166 State state_; // Will be padded to kApiPointerSize.
1168 void* embedder_data_;
1169 Heap heap_;
1170 1167
1171 // The per-process lock should be acquired before the ThreadDataTable is 1168 // The per-process lock should be acquired before the ThreadDataTable is
1172 // modified. 1169 // modified.
1173 class ThreadDataTable { 1170 class ThreadDataTable {
1174 public: 1171 public:
1175 ThreadDataTable(); 1172 ThreadDataTable();
1176 ~ThreadDataTable(); 1173 ~ThreadDataTable();
1177 1174
1178 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id); 1175 PerIsolateThreadData* Lookup(Isolate* isolate, ThreadId thread_id);
1179 void Insert(PerIsolateThreadData* data); 1176 void Insert(PerIsolateThreadData* data);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 void Enter(); 1234 void Enter();
1238 1235
1239 // Exits the current thread. The previosuly entered Isolate is restored 1236 // Exits the current thread. The previosuly entered Isolate is restored
1240 // for the thread. 1237 // for the thread.
1241 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate 1238 // Not thread-safe. Multiple threads should not Enter/Exit the same isolate
1242 // at the same time, this should be prevented using external locking. 1239 // at the same time, this should be prevented using external locking.
1243 void Exit(); 1240 void Exit();
1244 1241
1245 void InitializeThreadLocal(); 1242 void InitializeThreadLocal();
1246 1243
1247 void PrintStackTrace(FILE* out, ThreadLocalTop* thread);
1248 void MarkCompactPrologue(bool is_compacting, 1244 void MarkCompactPrologue(bool is_compacting,
1249 ThreadLocalTop* archived_thread_data); 1245 ThreadLocalTop* archived_thread_data);
1250 void MarkCompactEpilogue(bool is_compacting, 1246 void MarkCompactEpilogue(bool is_compacting,
1251 ThreadLocalTop* archived_thread_data); 1247 ThreadLocalTop* archived_thread_data);
1252 1248
1253 void FillCache(); 1249 void FillCache();
1254 1250
1255 void PropagatePendingExceptionToExternalTryCatch(); 1251 void PropagatePendingExceptionToExternalTryCatch();
1256 1252
1257 void InitializeDebugger(); 1253 void InitializeDebugger();
(...skipping 30 matching lines...) Expand all
1288 ContextSlotCache* context_slot_cache_; 1284 ContextSlotCache* context_slot_cache_;
1289 DescriptorLookupCache* descriptor_lookup_cache_; 1285 DescriptorLookupCache* descriptor_lookup_cache_;
1290 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; 1286 v8::ImplementationUtilities::HandleScopeData handle_scope_data_;
1291 HandleScopeImplementer* handle_scope_implementer_; 1287 HandleScopeImplementer* handle_scope_implementer_;
1292 UnicodeCache* unicode_cache_; 1288 UnicodeCache* unicode_cache_;
1293 Zone runtime_zone_; 1289 Zone runtime_zone_;
1294 InnerPointerToCodeCache* inner_pointer_to_code_cache_; 1290 InnerPointerToCodeCache* inner_pointer_to_code_cache_;
1295 ConsStringIteratorOp* write_iterator_; 1291 ConsStringIteratorOp* write_iterator_;
1296 GlobalHandles* global_handles_; 1292 GlobalHandles* global_handles_;
1297 EternalHandles* eternal_handles_; 1293 EternalHandles* eternal_handles_;
1298 ContextSwitcher* context_switcher_;
1299 ThreadManager* thread_manager_; 1294 ThreadManager* thread_manager_;
1300 RuntimeState runtime_state_; 1295 RuntimeState runtime_state_;
1301 bool fp_stubs_generated_; 1296 bool fp_stubs_generated_;
1302 Builtins builtins_; 1297 Builtins builtins_;
1303 bool has_installed_extensions_; 1298 bool has_installed_extensions_;
1304 StringTracker* string_tracker_; 1299 StringTracker* string_tracker_;
1305 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; 1300 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_;
1306 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; 1301 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_;
1307 ConsStringIteratorOp objects_string_compare_iterator_a_; 1302 ConsStringIteratorOp objects_string_compare_iterator_a_;
1308 ConsStringIteratorOp objects_string_compare_iterator_b_; 1303 ConsStringIteratorOp objects_string_compare_iterator_b_;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 } 1575 }
1581 1576
1582 EmbeddedVector<char, 128> filename_; 1577 EmbeddedVector<char, 128> filename_;
1583 FILE* file_; 1578 FILE* file_;
1584 int scope_depth_; 1579 int scope_depth_;
1585 }; 1580 };
1586 1581
1587 } } // namespace v8::internal 1582 } } // namespace v8::internal
1588 1583
1589 #endif // V8_ISOLATE_H_ 1584 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/ic-inl.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698