forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In this function fn constant(&self, mc: &sbc::Constant, vec_mty: Option<&mty::Type>) -> llvm::Constant we hit this condition:
let aval = match elt_mty {
_ if elt_mty.is_number() || elt_mty.is_bool() => {
let vals = self.rewrap_vec_constant(val_vec);
llcx.const_array(&vals, self.module_cx.to_llvm_type(&elt_mty, &[]).unwrap())
}
Type::Vector(bt) if bt.is_number_u8() => {
// This is a Constant::ByteArray element type.
assert!(matches!(val_vec[0], Constant::ByteArray(_)));
todo!("{:?}", mc);
}
To reproduce compile Move provided example:
/home/sol/work/git/sui-solana-032024/external-crates/move/target/debug/move-mv-llvm-compiler -c tests/flash_lender_tests.move -p /home/sol/work/git/sui-solana-032024/sui_programmability/examples/defi/Move.toml --test -o ~/tmp/defi
Notice that some modules will be built:
sol@dev-equinix-new-york-2:~/work/git/sui-solana-032024/sui_programmability/examples/defi:solana $% u+6$ ll ~/tmp/defi/
total 40
drwxr-xr-x 2 sol users 4096 May 29 01:26 ./
drwxr-xr-x 42 sol users 4096 May 29 01:26 ../
-rw-r--r-- 1 sol users 2520 May 29 01:26 0x1__bcs.ll
-rw-r--r-- 1 sol users 2536 May 29 01:26 0x1__unit_test.ll
-rw-r--r-- 1 sol users 3036 May 29 01:26 0x1__vector.ll
-rw-r--r-- 1 sol users 10992 May 29 01:26 0x2__tx_context.ll
-rw-r--r-- 1 sol users 5167 May 29 01:26 solana_entrypoint.ll
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working