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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 int id = next_optimization_id_++; | 1104 int id = next_optimization_id_++; |
1105 if (!Smi::IsValid(next_optimization_id_)) { | 1105 if (!Smi::IsValid(next_optimization_id_)) { |
1106 next_optimization_id_ = 0; | 1106 next_optimization_id_ = 0; |
1107 } | 1107 } |
1108 return id; | 1108 return id; |
1109 } | 1109 } |
1110 | 1110 |
1111 // Get (and lazily initialize) the registry for per-isolate symbols. | 1111 // Get (and lazily initialize) the registry for per-isolate symbols. |
1112 Handle<JSObject> GetSymbolRegistry(); | 1112 Handle<JSObject> GetSymbolRegistry(); |
1113 | 1113 |
| 1114 void AddCallCompletedCallback(CallCompletedCallback callback); |
| 1115 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 1116 void FireCallCompletedCallback(); |
| 1117 |
1114 private: | 1118 private: |
1115 Isolate(); | 1119 Isolate(); |
1116 | 1120 |
1117 friend struct GlobalState; | 1121 friend struct GlobalState; |
1118 friend struct InitializeGlobalState; | 1122 friend struct InitializeGlobalState; |
1119 | 1123 |
1120 enum State { | 1124 enum State { |
1121 UNINITIALIZED, // Some components may not have been allocated. | 1125 UNINITIALIZED, // Some components may not have been allocated. |
1122 INITIALIZED // All components are fully initialized. | 1126 INITIALIZED // All components are fully initialized. |
1123 }; | 1127 }; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 DeferredHandles* deferred_handles_head_; | 1328 DeferredHandles* deferred_handles_head_; |
1325 OptimizingCompilerThread* optimizing_compiler_thread_; | 1329 OptimizingCompilerThread* optimizing_compiler_thread_; |
1326 SweeperThread** sweeper_thread_; | 1330 SweeperThread** sweeper_thread_; |
1327 int num_sweeper_threads_; | 1331 int num_sweeper_threads_; |
1328 | 1332 |
1329 // Counts deopt points if deopt_every_n_times is enabled. | 1333 // Counts deopt points if deopt_every_n_times is enabled. |
1330 unsigned int stress_deopt_count_; | 1334 unsigned int stress_deopt_count_; |
1331 | 1335 |
1332 int next_optimization_id_; | 1336 int next_optimization_id_; |
1333 | 1337 |
| 1338 // List of callbacks when a Call completes. |
| 1339 List<CallCompletedCallback> call_completed_callbacks_; |
| 1340 |
1334 friend class ExecutionAccess; | 1341 friend class ExecutionAccess; |
1335 friend class HandleScopeImplementer; | 1342 friend class HandleScopeImplementer; |
1336 friend class IsolateInitializer; | 1343 friend class IsolateInitializer; |
1337 friend class OptimizingCompilerThread; | 1344 friend class OptimizingCompilerThread; |
1338 friend class SweeperThread; | 1345 friend class SweeperThread; |
1339 friend class ThreadManager; | 1346 friend class ThreadManager; |
1340 friend class Simulator; | 1347 friend class Simulator; |
1341 friend class StackGuard; | 1348 friend class StackGuard; |
1342 friend class ThreadId; | 1349 friend class ThreadId; |
1343 friend class TestMemoryAllocatorScope; | 1350 friend class TestMemoryAllocatorScope; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 } | 1531 } |
1525 | 1532 |
1526 EmbeddedVector<char, 128> filename_; | 1533 EmbeddedVector<char, 128> filename_; |
1527 FILE* file_; | 1534 FILE* file_; |
1528 int scope_depth_; | 1535 int scope_depth_; |
1529 }; | 1536 }; |
1530 | 1537 |
1531 } } // namespace v8::internal | 1538 } } // namespace v8::internal |
1532 | 1539 |
1533 #endif // V8_ISOLATE_H_ | 1540 #endif // V8_ISOLATE_H_ |
OLD | NEW |