| OLD | NEW |
| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 // Returns the global context of the calling JavaScript code. That | 626 // Returns the global context of the calling JavaScript code. That |
| 627 // is, the global context of the top-most JavaScript frame. | 627 // is, the global context of the top-most JavaScript frame. |
| 628 Handle<Context> GetCallingGlobalContext(); | 628 Handle<Context> GetCallingGlobalContext(); |
| 629 | 629 |
| 630 void RegisterTryCatchHandler(v8::TryCatch* that); | 630 void RegisterTryCatchHandler(v8::TryCatch* that); |
| 631 void UnregisterTryCatchHandler(v8::TryCatch* that); | 631 void UnregisterTryCatchHandler(v8::TryCatch* that); |
| 632 | 632 |
| 633 char* ArchiveThread(char* to); | 633 char* ArchiveThread(char* to); |
| 634 char* RestoreThread(char* from); | 634 char* RestoreThread(char* from); |
| 635 | 635 |
| 636 static const char* kStackOverflowMessage; | 636 static const char* const kStackOverflowMessage; |
| 637 | 637 |
| 638 // Accessors. | 638 // Accessors. |
| 639 #define GLOBAL_ACCESSOR(type, name, initialvalue) \ | 639 #define GLOBAL_ACCESSOR(type, name, initialvalue) \ |
| 640 type name() const { return name##_; } \ | 640 type name() const { return name##_; } \ |
| 641 void set_##name(type value) { name##_ = value; } | 641 void set_##name(type value) { name##_ = value; } |
| 642 ISOLATE_INIT_LIST(GLOBAL_ACCESSOR) | 642 ISOLATE_INIT_LIST(GLOBAL_ACCESSOR) |
| 643 #undef GLOBAL_ACCESSOR | 643 #undef GLOBAL_ACCESSOR |
| 644 | 644 |
| 645 #define GLOBAL_ARRAY_ACCESSOR(type, name, length) \ | 645 #define GLOBAL_ARRAY_ACCESSOR(type, name, length) \ |
| 646 type* name() { return &(name##_[0]); } | 646 type* name() { return &(name##_[0]); } |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 static Thread::LocalStorageKey isolate_key_; | 879 static Thread::LocalStorageKey isolate_key_; |
| 880 static Thread::LocalStorageKey thread_id_key_; | 880 static Thread::LocalStorageKey thread_id_key_; |
| 881 static Isolate* default_isolate_; | 881 static Isolate* default_isolate_; |
| 882 static ThreadDataTable* thread_data_table_; | 882 static ThreadDataTable* thread_data_table_; |
| 883 static ThreadId highest_thread_id_; | 883 static ThreadId highest_thread_id_; |
| 884 | 884 |
| 885 bool PreInit(); | 885 bool PreInit(); |
| 886 | 886 |
| 887 void Deinit(); | 887 void Deinit(); |
| 888 | 888 |
| 889 static void SetIsolateThreadLocals(Isolate* isolate, |
| 890 PerIsolateThreadData* data); |
| 891 |
| 889 enum State { | 892 enum State { |
| 890 UNINITIALIZED, // Some components may not have been allocated. | 893 UNINITIALIZED, // Some components may not have been allocated. |
| 891 PREINITIALIZED, // Components have been allocated but not initialized. | 894 PREINITIALIZED, // Components have been allocated but not initialized. |
| 892 INITIALIZED // All components are fully initialized. | 895 INITIALIZED // All components are fully initialized. |
| 893 }; | 896 }; |
| 894 | 897 |
| 895 State state_; | 898 State state_; |
| 896 EntryStackItem* entry_stack_; | 899 EntryStackItem* entry_stack_; |
| 897 | 900 |
| 898 // Allocate and insert PerIsolateThreadData into the ThreadDataTable | 901 // Allocate and insert PerIsolateThreadData into the ThreadDataTable |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 #define ISOLATED_CLASS class | 1175 #define ISOLATED_CLASS class |
| 1173 | 1176 |
| 1174 } } // namespace v8::internal | 1177 } } // namespace v8::internal |
| 1175 | 1178 |
| 1176 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1179 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1177 // they're needed. | 1180 // they're needed. |
| 1178 #include "allocation-inl.h" | 1181 #include "allocation-inl.h" |
| 1179 #include "zone-inl.h" | 1182 #include "zone-inl.h" |
| 1180 | 1183 |
| 1181 #endif // V8_ISOLATE_H_ | 1184 #endif // V8_ISOLATE_H_ |
| OLD | NEW |