OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 class InlineRuntimeFunctionsTable; | 71 class InlineRuntimeFunctionsTable; |
72 class NoAllocationStringAllocator; | 72 class NoAllocationStringAllocator; |
73 class InnerPointerToCodeCache; | 73 class InnerPointerToCodeCache; |
74 class PreallocatedMemoryThread; | 74 class PreallocatedMemoryThread; |
75 class RegExpStack; | 75 class RegExpStack; |
76 class SaveContext; | 76 class SaveContext; |
77 class UnicodeCache; | 77 class UnicodeCache; |
78 class ConsStringIteratorOp; | 78 class ConsStringIteratorOp; |
79 class StringTracker; | 79 class StringTracker; |
80 class StubCache; | 80 class StubCache; |
| 81 class SweeperThread; |
81 class ThreadManager; | 82 class ThreadManager; |
82 class ThreadState; | 83 class ThreadState; |
83 class ThreadVisitor; // Defined in v8threads.h | 84 class ThreadVisitor; // Defined in v8threads.h |
84 class VMState; | 85 class VMState; |
85 | 86 |
86 // 'void function pointer', used to roundtrip the | 87 // 'void function pointer', used to roundtrip the |
87 // ExternalReference::ExternalReferenceRedirector since we can not include | 88 // ExternalReference::ExternalReferenceRedirector since we can not include |
88 // assembler.h, where it is defined, here. | 89 // assembler.h, where it is defined, here. |
89 typedef void* ExternalReferenceRedirectorPointer(); | 90 typedef void* ExternalReferenceRedirectorPointer(); |
90 | 91 |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 code_stub_interface_descriptor(int index); | 1064 code_stub_interface_descriptor(int index); |
1064 | 1065 |
1065 void IterateDeferredHandles(ObjectVisitor* visitor); | 1066 void IterateDeferredHandles(ObjectVisitor* visitor); |
1066 void LinkDeferredHandles(DeferredHandles* deferred_handles); | 1067 void LinkDeferredHandles(DeferredHandles* deferred_handles); |
1067 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); | 1068 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); |
1068 | 1069 |
1069 OptimizingCompilerThread* optimizing_compiler_thread() { | 1070 OptimizingCompilerThread* optimizing_compiler_thread() { |
1070 return &optimizing_compiler_thread_; | 1071 return &optimizing_compiler_thread_; |
1071 } | 1072 } |
1072 | 1073 |
| 1074 SweeperThread** sweeper_threads() { |
| 1075 return sweeper_thread_; |
| 1076 } |
| 1077 |
1073 private: | 1078 private: |
1074 Isolate(); | 1079 Isolate(); |
1075 | 1080 |
1076 friend struct GlobalState; | 1081 friend struct GlobalState; |
1077 friend struct InitializeGlobalState; | 1082 friend struct InitializeGlobalState; |
1078 | 1083 |
1079 enum State { | 1084 enum State { |
1080 UNINITIALIZED, // Some components may not have been allocated. | 1085 UNINITIALIZED, // Some components may not have been allocated. |
1081 INITIALIZED // All components are fully initialized. | 1086 INITIALIZED // All components are fully initialized. |
1082 }; | 1087 }; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 // between compilation units. | 1293 // between compilation units. |
1289 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1294 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1290 static const intptr_t name##_debug_offset_; | 1295 static const intptr_t name##_debug_offset_; |
1291 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1296 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1292 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1297 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1293 #undef ISOLATE_FIELD_OFFSET | 1298 #undef ISOLATE_FIELD_OFFSET |
1294 #endif | 1299 #endif |
1295 | 1300 |
1296 DeferredHandles* deferred_handles_head_; | 1301 DeferredHandles* deferred_handles_head_; |
1297 OptimizingCompilerThread optimizing_compiler_thread_; | 1302 OptimizingCompilerThread optimizing_compiler_thread_; |
| 1303 SweeperThread** sweeper_thread_; |
1298 | 1304 |
1299 friend class ExecutionAccess; | 1305 friend class ExecutionAccess; |
1300 friend class HandleScopeImplementer; | 1306 friend class HandleScopeImplementer; |
1301 friend class IsolateInitializer; | 1307 friend class IsolateInitializer; |
1302 friend class OptimizingCompilerThread; | 1308 friend class OptimizingCompilerThread; |
| 1309 friend class SweeperThread; |
1303 friend class ThreadManager; | 1310 friend class ThreadManager; |
1304 friend class Simulator; | 1311 friend class Simulator; |
1305 friend class StackGuard; | 1312 friend class StackGuard; |
1306 friend class ThreadId; | 1313 friend class ThreadId; |
1307 friend class TestMemoryAllocatorScope; | 1314 friend class TestMemoryAllocatorScope; |
1308 friend class v8::Isolate; | 1315 friend class v8::Isolate; |
1309 friend class v8::Locker; | 1316 friend class v8::Locker; |
1310 friend class v8::Unlocker; | 1317 friend class v8::Unlocker; |
1311 | 1318 |
1312 DISALLOW_COPY_AND_ASSIGN(Isolate); | 1319 DISALLOW_COPY_AND_ASSIGN(Isolate); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 | 1450 |
1444 // Mark the native context with out of memory. | 1451 // Mark the native context with out of memory. |
1445 inline void Context::mark_out_of_memory() { | 1452 inline void Context::mark_out_of_memory() { |
1446 native_context()->set_out_of_memory(HEAP->true_value()); | 1453 native_context()->set_out_of_memory(HEAP->true_value()); |
1447 } | 1454 } |
1448 | 1455 |
1449 | 1456 |
1450 } } // namespace v8::internal | 1457 } } // namespace v8::internal |
1451 | 1458 |
1452 #endif // V8_ISOLATE_H_ | 1459 #endif // V8_ISOLATE_H_ |
OLD | NEW |