Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
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);
}
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
In this function
fn constant(&self, mc: &sbc::Constant, vec_mty: Option<&mty::Type>) -> llvm::Constant
we hit this condition:To reproduce compile Move provided example:
Notice that some modules will be built: