| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3cbd340 commit 8c1f7ad
4 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.6', | ||
| 41 | + 'v8_embedder_string': '-node.7', | ||
| 42 | 42 | ||
| 43 | 43 | ##### V8 defaults for Node.js ##### | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -477,7 +477,11 @@ struct TagRange { | |||
| 477 | 477 | constexpr TagRange(Tag first, Tag last) : first(first), last(last) { | |
| 478 | 478 | #ifdef V8_ENABLE_CHECKS | |
| 479 | 479 | // This would typically be a DCHECK, but that's not available here. | |
| 480 | + #if V8_HAS_BUILTIN_UNREACHABLE | ||
| 480 | 481 | if (first > last) __builtin_unreachable(); // Invalid tag range. | |
| 482 | + #elif defined(_MSC_VER) | ||
| 483 | + if (first > last) __assume(0); // Invalid tag range. | ||
| 484 | + #endif | ||
| 481 | 485 | #endif | |
| 482 | 486 | } | |
| 483 | 487 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -305,8 +305,13 @@ constexpr size_t kNumFlags = arraysize(flags); | |||
| 305 | 305 | ||
| 306 | 306 | base::Vector<Flag> Flags() { return base::ArrayVector(flags); } | |
| 307 | 307 | ||
| 308 | + #if V8_CC_MSVC && defined(_DEBUG) | ||
| 309 | + std::array<int, kNumFlags> GetSortedFlagIndices() { | ||
| 310 | + const char* kFlagNames[] = { | ||
| 311 | + #else | ||
| 308 | 312 | consteval std::array<int, kNumFlags> GetSortedFlagIndices() { | |
| 309 | 313 | constexpr const char* kFlagNames[] = { | |
| 314 | + #endif | ||
| 310 | 315 | #define FLAG_MODE_APPLY_NAME(nam) #nam, | |
| 311 | 316 | #define FLAG_ALIAS(ftype, ctype, alias, nam) #alias, | |
| 312 | 317 | #include "src/flags/flag-definitions.h" // NOLINT(build/include) | |
@@ -338,7 +343,11 @@ struct FlagNameGreater { | |||
| 338 | 343 | class FlagMapByName { | |
| 339 | 344 | public: | |
| 340 | 345 | FlagMapByName() { | |
| 346 | + #if V8_CC_MSVC && defined(_DEBUG) | ||
| 347 | + const std::array<int, kNumFlags> sorted_indices = | ||
| 348 | + #else | ||
| 341 | 349 | constexpr std::array<int, kNumFlags> sorted_indices = | |
| 350 | + #endif | ||
| 342 | 351 | GetSortedFlagIndices(); | |
| 343 | 352 | for (size_t i = 0; i < kNumFlags; ++i) { | |
| 344 | 353 | flags_[i] = &flags[sorted_indices[i]]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -310,7 +310,7 @@ std::unique_ptr<BackingStore> BackingStore::TryAllocateAndPartiallyCommitMemory( | |||
| 310 | 310 | // For accounting purposes, whether a GC was necessary. | |
| 311 | 311 | bool did_retry = false; | |
| 312 | 312 | ||
| 313 | - auto gc_retry = [&](const std::function<bool()>& fn) { | ||
| 313 | + auto gc_retry = [&](const auto& fn) { | ||
| 314 | 314 | if (fn()) return true; | |
| 315 | 315 | // Collect garbage and retry. | |
| 316 | 316 | did_retry = true; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments