5 #ifndef V8_MICROTASK_QUEUE_H_ 6 #define V8_MICROTASK_QUEUE_H_ 11 #include "src/base/macros.h" 23 static void SetUpDefaultMicrotaskQueue(
Isolate* isolate);
24 static std::unique_ptr<MicrotaskQueue> New(
Isolate* isolate);
29 intptr_t microtask_queue_pointer,
32 void EnqueueMicrotask(
Microtask* microtask);
37 int RunMicrotasks(
Isolate* isolate);
43 intptr_t capacity()
const {
return capacity_; }
44 intptr_t size()
const {
return size_; }
45 intptr_t start()
const {
return start_; }
50 static const size_t kRingBufferOffset;
51 static const size_t kCapacityOffset;
52 static const size_t kSizeOffset;
53 static const size_t kStartOffset;
55 static const intptr_t kMinimumCapacity;
59 void ResizeBuffer(intptr_t new_capacity);
69 Object** ring_buffer_ =
nullptr;
70 intptr_t capacity_ = 0;
78 #endif // V8_MICROTASK_QUEUE_H_