Skip to content

Commit a978c3c

Browse files
authored
Merge pull request dlang-community#144 from dlang-community/issue-143
fix dlang-community#143 - Still issues in unrolled list merged-on-behalf-of: Basile-z <Basile-z@users.noreply.github.com>
2 parents f718ec1 + aa08d97 commit a978c3c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/containers/unrolledlist.d

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ module containers.unrolledlist;
1010
private import containers.internal.node : shouldAddGCRange;
1111
private import stdx.allocator.mallocator : Mallocator;
1212

13+
version (X86_64)
14+
version (LDC)
15+
version = LDC_64;
16+
1317
/**
1418
* Unrolled Linked List.
1519
*
@@ -252,7 +256,7 @@ struct UnrolledList(T, Allocator = Mallocator,
252256
}
253257
body
254258
{
255-
version (LDC)
259+
version (LDC_64)
256260
{
257261
import ldc.intrinsics : llvm_cttz;
258262
size_t index = llvm_cttz(_front.registry, true);
@@ -310,7 +314,7 @@ struct UnrolledList(T, Allocator = Mallocator,
310314
}
311315
body
312316
{
313-
version (LDC)
317+
version (LDC_64)
314318
{
315319
import ldc.intrinsics : llvm_cttz;
316320
immutable index = llvm_cttz(_front.registry, true);
@@ -397,7 +401,7 @@ struct UnrolledList(T, Allocator = Mallocator,
397401
this.current = current;
398402
if (current !is null)
399403
{
400-
version (LDC)
404+
version(LDC_64)
401405
{
402406
import ldc.intrinsics : llvm_cttz;
403407
index = llvm_cttz(current.registry, true);
@@ -516,7 +520,7 @@ private:
516520
{
517521
if (first is null || second is null)
518522
return false;
519-
version (LDC)
523+
version (LDC_64)
520524
{
521525
import ldc.intrinsics : llvm_ctpop;
522526

@@ -566,7 +570,7 @@ private:
566570
immutable uint notReg = ~(cast(uint) registry);
567571
else
568572
immutable uint notReg = cast(uint) (~registry);
569-
version (LDC)
573+
version (LDC_64)
570574
{
571575
import ldc.intrinsics : llvm_cttz;
572576
return llvm_cttz(notReg, true);

0 commit comments

Comments
 (0)