@@ -9224,20 +9224,6 @@ pub fn binValue(self: *Builder, tag: Constant.Tag, lhs: Constant, rhs: Constant)
9224
9224
return (try self .binConst (tag , lhs , rhs )).toValue ();
9225
9225
}
9226
9226
9227
- pub fn selectConst (
9228
- self : * Builder ,
9229
- cond : Constant ,
9230
- lhs : Constant ,
9231
- rhs : Constant ,
9232
- ) Allocator.Error ! Constant {
9233
- try self .ensureUnusedConstantCapacity (1 , Constant .Select , 0 );
9234
- return self .selectConstAssumeCapacity (cond , lhs , rhs );
9235
- }
9236
-
9237
- pub fn selectValue (self : * Builder , cond : Constant , lhs : Constant , rhs : Constant ) Allocator.Error ! Value {
9238
- return (try self .selectConst (cond , lhs , rhs )).toValue ();
9239
- }
9240
-
9241
9227
pub fn asmConst (
9242
9228
self : * Builder ,
9243
9229
ty : Type ,
@@ -10125,7 +10111,7 @@ fn arrayTypeAssumeCapacity(self: *Builder, len: u64, child: Type) Type {
10125
10111
.data = self .addTypeExtraAssumeCapacity (data ),
10126
10112
});
10127
10113
if (self .useLibLlvm ()) self .llvm .types .appendAssumeCapacity (
10128
- child .toLlvm (self ).arrayType ( @intCast ( len ) ),
10114
+ child .toLlvm (self ).arrayType2 ( len ),
10129
10115
);
10130
10116
}
10131
10117
return @enumFromInt (gop .index );
@@ -10158,7 +10144,7 @@ fn arrayTypeAssumeCapacity(self: *Builder, len: u64, child: Type) Type {
10158
10144
.data = self .addTypeExtraAssumeCapacity (data ),
10159
10145
});
10160
10146
if (self .useLibLlvm ()) self .llvm .types .appendAssumeCapacity (
10161
- child .toLlvm (self ).arrayType ( @intCast ( len ) ),
10147
+ child .toLlvm (self ).arrayType2 ( len ),
10162
10148
);
10163
10149
}
10164
10150
return @enumFromInt (gop .index );
@@ -10823,7 +10809,7 @@ fn arrayConstAssumeCapacity(
10823
10809
for (llvm_vals , vals ) | * llvm_val , val | llvm_val .* = val .toLlvm (self );
10824
10810
10825
10811
self .llvm .constants .appendAssumeCapacity (
10826
- type_extra .child .toLlvm (self ).constArray (llvm_vals .ptr , @intCast ( llvm_vals .len ) ),
10812
+ type_extra .child .toLlvm (self ).constArray2 (llvm_vals .ptr , llvm_vals .len ),
10827
10813
);
10828
10814
}
10829
10815
return result .constant ;
@@ -11536,42 +11522,6 @@ fn binConstAssumeCapacity(
11536
11522
return @enumFromInt (gop .index );
11537
11523
}
11538
11524
11539
- comptime {
11540
- _ = & selectValue ;
11541
- }
11542
-
11543
- fn selectConstAssumeCapacity (self : * Builder , cond : Constant , lhs : Constant , rhs : Constant ) Constant {
11544
- const Adapter = struct {
11545
- builder : * const Builder ,
11546
- pub fn hash (_ : @This (), key : Constant .Select ) u32 {
11547
- return @truncate (std .hash .Wyhash .hash (
11548
- std .hash .uint32 (@intFromEnum (Constant .Tag .select )),
11549
- std .mem .asBytes (& key ),
11550
- ));
11551
- }
11552
- pub fn eql (ctx : @This (), lhs_key : Constant .Select , _ : void , rhs_index : usize ) bool {
11553
- if (ctx .builder .constant_items .items (.tag )[rhs_index ] != .select ) return false ;
11554
- const rhs_data = ctx .builder .constant_items .items (.data )[rhs_index ];
11555
- const rhs_extra = ctx .builder .constantExtraData (Constant .Select , rhs_data );
11556
- return std .meta .eql (lhs_key , rhs_extra );
11557
- }
11558
- };
11559
- const data = Constant.Select { .cond = cond , .lhs = lhs , .rhs = rhs };
11560
- const gop = self .constant_map .getOrPutAssumeCapacityAdapted (data , Adapter { .builder = self });
11561
- if (! gop .found_existing ) {
11562
- gop .key_ptr .* = {};
11563
- gop .value_ptr .* = {};
11564
- self .constant_items .appendAssumeCapacity (.{
11565
- .tag = .select ,
11566
- .data = self .addConstantExtraAssumeCapacity (data ),
11567
- });
11568
- if (self .useLibLlvm ()) self .llvm .constants .appendAssumeCapacity (
11569
- cond .toLlvm (self ).constSelect (lhs .toLlvm (self ), rhs .toLlvm (self )),
11570
- );
11571
- }
11572
- return @enumFromInt (gop .index );
11573
- }
11574
-
11575
11525
fn asmConstAssumeCapacity (
11576
11526
self : * Builder ,
11577
11527
ty : Type ,
0 commit comments