| 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 "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 V(int, pending_microtask_count, 0) \ | 359 V(int, pending_microtask_count, 0) \ |
| 360 V(bool, autorun_microtasks, true) \ | 360 V(bool, autorun_microtasks, true) \ |
| 361 V(HStatistics*, hstatistics, NULL) \ | 361 V(HStatistics*, hstatistics, NULL) \ |
| 362 V(HTracer*, htracer, NULL) \ | 362 V(HTracer*, htracer, NULL) \ |
| 363 V(CodeTracer*, code_tracer, NULL) \ | 363 V(CodeTracer*, code_tracer, NULL) \ |
| 364 V(bool, fp_stubs_generated, false) \ | 364 V(bool, fp_stubs_generated, false) \ |
| 365 V(int, max_available_threads, 0) \ | 365 V(int, max_available_threads, 0) \ |
| 366 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \ | 366 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \ |
| 367 V(InterruptCallback, api_interrupt_callback, NULL) \ | 367 V(InterruptCallback, api_interrupt_callback, NULL) \ |
| 368 V(void*, api_interrupt_callback_data, NULL) \ | 368 V(void*, api_interrupt_callback_data, NULL) \ |
| 369 V(v8::CodeEventHandler*, code_event_handler, NULL) \ |
| 369 ISOLATE_INIT_SIMULATOR_LIST(V) | 370 ISOLATE_INIT_SIMULATOR_LIST(V) |
| 370 | 371 |
| 371 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \ | 372 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \ |
| 372 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \ | 373 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \ |
| 373 inline type name() const { return thread_local_top_.name##_; } | 374 inline type name() const { return thread_local_top_.name##_; } |
| 374 | 375 |
| 375 | 376 |
| 376 class Isolate { | 377 class Isolate { |
| 377 // These forward declarations are required to make the friend declarations in | 378 // These forward declarations are required to make the friend declarations in |
| 378 // PerIsolateThreadData work on some older versions of gcc. | 379 // PerIsolateThreadData work on some older versions of gcc. |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 void AddCallCompletedCallback(CallCompletedCallback callback); | 1091 void AddCallCompletedCallback(CallCompletedCallback callback); |
| 1091 void RemoveCallCompletedCallback(CallCompletedCallback callback); | 1092 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 1092 void FireCallCompletedCallback(); | 1093 void FireCallCompletedCallback(); |
| 1093 | 1094 |
| 1094 void EnqueueMicrotask(Handle<Object> microtask); | 1095 void EnqueueMicrotask(Handle<Object> microtask); |
| 1095 void RunMicrotasks(); | 1096 void RunMicrotasks(); |
| 1096 | 1097 |
| 1097 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback); | 1098 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback); |
| 1098 void CountUsage(v8::Isolate::UseCounterFeature feature); | 1099 void CountUsage(v8::Isolate::UseCounterFeature feature); |
| 1099 | 1100 |
| 1101 // For sampler public API |
| 1102 void CodeCreateEvent(Code* code, const char* source); |
| 1103 void CodeCreateEvent(Code* code, Name* name); |
| 1104 void CodeCreateEvent(Code* code, String* regexp_source); |
| 1105 void CodeCreateEvent(Code* code, |
| 1106 SharedFunctionInfo* shared, |
| 1107 Name* source, int line, int column); |
| 1108 void CodeCreateEvent(Address from, |
| 1109 const char* name_prefix, |
| 1110 Name* name); |
| 1111 |
| 1100 private: | 1112 private: |
| 1101 static void EnsureInitialized(); | 1113 static void EnsureInitialized(); |
| 1102 | 1114 |
| 1103 Isolate(); | 1115 Isolate(); |
| 1104 | 1116 |
| 1105 friend struct GlobalState; | 1117 friend struct GlobalState; |
| 1106 friend struct InitializeGlobalState; | 1118 friend struct InitializeGlobalState; |
| 1107 | 1119 |
| 1108 enum State { | 1120 enum State { |
| 1109 UNINITIALIZED, // Some components may not have been allocated. | 1121 UNINITIALIZED, // Some components may not have been allocated. |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 } | 1537 } |
| 1526 | 1538 |
| 1527 EmbeddedVector<char, 128> filename_; | 1539 EmbeddedVector<char, 128> filename_; |
| 1528 FILE* file_; | 1540 FILE* file_; |
| 1529 int scope_depth_; | 1541 int scope_depth_; |
| 1530 }; | 1542 }; |
| 1531 | 1543 |
| 1532 } } // namespace v8::internal | 1544 } } // namespace v8::internal |
| 1533 | 1545 |
| 1534 #endif // V8_ISOLATE_H_ | 1546 #endif // V8_ISOLATE_H_ |
| OLD | NEW |