OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | |
jochen (gone - plz use gerrit)
2015/07/20 13:37:20
nit. empty line after this one
epertoso
2015/07/20 13:40:20
Done.
| |
9 #include "include/v8-debug.h" | 10 #include "include/v8-debug.h" |
10 #include "src/allocation.h" | 11 #include "src/allocation.h" |
11 #include "src/assert-scope.h" | 12 #include "src/assert-scope.h" |
12 #include "src/base/atomicops.h" | 13 #include "src/base/atomicops.h" |
13 #include "src/builtins.h" | 14 #include "src/builtins.h" |
15 #include "src/cancelable-task.h" | |
14 #include "src/contexts.h" | 16 #include "src/contexts.h" |
15 #include "src/date.h" | 17 #include "src/date.h" |
16 #include "src/execution.h" | 18 #include "src/execution.h" |
17 #include "src/frames.h" | 19 #include "src/frames.h" |
18 #include "src/futex-emulation.h" | 20 #include "src/futex-emulation.h" |
19 #include "src/global-handles.h" | 21 #include "src/global-handles.h" |
20 #include "src/handles.h" | 22 #include "src/handles.h" |
21 #include "src/hashmap.h" | 23 #include "src/hashmap.h" |
22 #include "src/heap/heap.h" | 24 #include "src/heap/heap.h" |
23 #include "src/optimizing-compile-dispatcher.h" | 25 #include "src/optimizing-compile-dispatcher.h" |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1126 | 1128 |
1127 void set_array_buffer_allocator(v8::ArrayBuffer::Allocator* allocator) { | 1129 void set_array_buffer_allocator(v8::ArrayBuffer::Allocator* allocator) { |
1128 array_buffer_allocator_ = allocator; | 1130 array_buffer_allocator_ = allocator; |
1129 } | 1131 } |
1130 v8::ArrayBuffer::Allocator* array_buffer_allocator() const { | 1132 v8::ArrayBuffer::Allocator* array_buffer_allocator() const { |
1131 return array_buffer_allocator_; | 1133 return array_buffer_allocator_; |
1132 } | 1134 } |
1133 | 1135 |
1134 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } | 1136 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } |
1135 | 1137 |
1138 void RegisterCancelableTask(CancelableTask* task); | |
1139 void RemoveCancelableTask(CancelableTask* task); | |
1140 | |
1136 protected: | 1141 protected: |
1137 explicit Isolate(bool enable_serializer); | 1142 explicit Isolate(bool enable_serializer); |
1138 | 1143 |
1139 private: | 1144 private: |
1140 friend struct GlobalState; | 1145 friend struct GlobalState; |
1141 friend struct InitializeGlobalState; | 1146 friend struct InitializeGlobalState; |
1142 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, | 1147 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, |
1143 const char* name); | 1148 const char* name); |
1144 | 1149 |
1145 // These fields are accessed through the API, offsets must be kept in sync | 1150 // These fields are accessed through the API, offsets must be kept in sync |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1361 | 1366 |
1362 v8::Isolate::UseCounterCallback use_counter_callback_; | 1367 v8::Isolate::UseCounterCallback use_counter_callback_; |
1363 BasicBlockProfiler* basic_block_profiler_; | 1368 BasicBlockProfiler* basic_block_profiler_; |
1364 | 1369 |
1365 List<Object*> partial_snapshot_cache_; | 1370 List<Object*> partial_snapshot_cache_; |
1366 | 1371 |
1367 v8::ArrayBuffer::Allocator* array_buffer_allocator_; | 1372 v8::ArrayBuffer::Allocator* array_buffer_allocator_; |
1368 | 1373 |
1369 FutexWaitListNode futex_wait_list_node_; | 1374 FutexWaitListNode futex_wait_list_node_; |
1370 | 1375 |
1376 std::set<CancelableTask*> cancelable_tasks_; | |
1377 | |
1371 friend class ExecutionAccess; | 1378 friend class ExecutionAccess; |
1372 friend class HandleScopeImplementer; | 1379 friend class HandleScopeImplementer; |
1373 friend class OptimizingCompileDispatcher; | 1380 friend class OptimizingCompileDispatcher; |
1374 friend class SweeperThread; | 1381 friend class SweeperThread; |
1375 friend class ThreadManager; | 1382 friend class ThreadManager; |
1376 friend class Simulator; | 1383 friend class Simulator; |
1377 friend class StackGuard; | 1384 friend class StackGuard; |
1378 friend class ThreadId; | 1385 friend class ThreadId; |
1379 friend class TestMemoryAllocatorScope; | 1386 friend class TestMemoryAllocatorScope; |
1380 friend class TestCodeRangeScope; | 1387 friend class TestCodeRangeScope; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1589 } | 1596 } |
1590 | 1597 |
1591 EmbeddedVector<char, 128> filename_; | 1598 EmbeddedVector<char, 128> filename_; |
1592 FILE* file_; | 1599 FILE* file_; |
1593 int scope_depth_; | 1600 int scope_depth_; |
1594 }; | 1601 }; |
1595 | 1602 |
1596 } } // namespace v8::internal | 1603 } } // namespace v8::internal |
1597 | 1604 |
1598 #endif // V8_ISOLATE_H_ | 1605 #endif // V8_ISOLATE_H_ |
OLD | NEW |