| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d98789b commit 9135bc2
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | 39 | # Reset this number to 0 on major V8 upgrades. | |
| 40 | 40 | # Increment by one for each non-official patch applied to deps/v8. | |
| 41 | - 'v8_embedder_string': '-node.5', | ||
| 41 | + 'v8_embedder_string': '-node.6', | ||
| 42 | 42 | ||
| 43 | 43 | ##### V8 defaults for Node.js ##### | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -152,9 +152,6 @@ class CompilationUnitQueues { | |||
| 152 | 152 | for (int task_id = 0; task_id < max_tasks; ++task_id) { | |
| 153 | 153 | queues_[task_id].next_steal_task_id = next_task_id(task_id); | |
| 154 | 154 | } | |
| 155 | - for (auto& atomic_counter : num_units_) { | ||
| 156 | - std::atomic_init(&atomic_counter, size_t{0}); | ||
| 157 | - } | ||
| 158 | 155 | } | |
| 159 | 156 | ||
| 160 | 157 | base::Optional<WasmCompilationUnit> GetNextUnit( | |
@@ -257,14 +254,15 @@ class CompilationUnitQueues { | |||
| 257 | 254 | }; | |
| 258 | 255 | ||
| 259 | 256 | struct BigUnitsQueue { | |
| 260 | - BigUnitsQueue() { | ||
| 261 | - for (auto& atomic : has_units) std::atomic_init(&atomic, false); | ||
| 262 | - } | ||
| 257 | + BigUnitsQueue() = default; | ||
| 263 | 258 | ||
| 264 | 259 | base::Mutex mutex; | |
| 265 | 260 | ||
| 266 | 261 | // Can be read concurrently to check whether any elements are in the queue. | |
| 267 | - std::atomic<bool> has_units[kNumTiers]; | ||
| 262 | + std::atomic_bool has_units[kNumTiers] = { | ||
| 263 | + ATOMIC_VAR_INIT(false), | ||
| 264 | + ATOMIC_VAR_INIT(false) | ||
| 265 | + }; | ||
| 268 | 266 | ||
| 269 | 267 | // Protected by {mutex}: | |
| 270 | 268 | std::priority_queue<BigUnit> units[kNumTiers]; | |
@@ -273,8 +271,11 @@ class CompilationUnitQueues { | |||
| 273 | 271 | std::vector<Queue> queues_; | |
| 274 | 272 | BigUnitsQueue big_units_queue_; | |
| 275 | 273 | ||
| 276 | - std::atomic<size_t> num_units_[kNumTiers]; | ||
| 277 | - std::atomic<int> next_queue_to_add{0}; | ||
| 274 | + std::atomic_size_t num_units_[kNumTiers] = { | ||
| 275 | + ATOMIC_VAR_INIT(0), | ||
| 276 | + ATOMIC_VAR_INIT(0) | ||
| 277 | + }; | ||
| 278 | + std::atomic_int next_queue_to_add{0}; | ||
| 278 | 279 | ||
| 279 | 280 | int next_task_id(int task_id) const { | |
| 280 | 281 | int next = task_id + 1; | |
@@ -481,7 +482,7 @@ class CompilationStateImpl { | |||
| 481 | 482 | ||
| 482 | 483 | // Compilation error, atomically updated. This flag can be updated and read | |
| 483 | 484 | // using relaxed semantics. | |
| 484 | - std::atomic<bool> compile_failed_{false}; | ||
| 485 | + std::atomic_bool compile_failed_{false}; | ||
| 485 | 486 | ||
| 486 | 487 | const int max_background_tasks_ = 0; | |
| 487 | 488 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments