Skip to content

Commit

Permalink
fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Nov 26, 2024
1 parent faccb21 commit e4a24e9
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 292 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,87 +74,87 @@
{
"concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903",
"name": "BOOL",
"offset": 7700
"offset": 7612
},
{
"concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b",
"name": "U8",
"offset": 7795
"offset": 7707
},
{
"concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b",
"name": "ANOTHER_U8",
"offset": 7640
"offset": 7552
},
{
"concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef",
"name": "U16",
"offset": 7749
"offset": 7661
},
{
"concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc",
"name": "U32",
"offset": 7783
"offset": 7695
},
{
"concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
"name": "U64",
"offset": 7787
"offset": 7699
},
{
"concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e",
"name": "U256",
"offset": 7751
"offset": 7663
},
{
"concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b",
"name": "B256",
"offset": 7668
"offset": 7580
},
{
"concreteTypeId": "81fc10c4681a3271cf2d66b2ec6fbc8ed007a442652930844fcf11818c295bff",
"name": "CONFIGURABLE_STRUCT",
"offset": 7726
"offset": 7638
},
{
"concreteTypeId": "a2922861f03be8a650595dd76455b95383a61b46dd418f02607fa2e00dc39d5c",
"name": "CONFIGURABLE_ENUM_A",
"offset": 7701
"offset": 7613
},
{
"concreteTypeId": "a2922861f03be8a650595dd76455b95383a61b46dd418f02607fa2e00dc39d5c",
"name": "CONFIGURABLE_ENUM_B",
"offset": 7710
"offset": 7622
},
{
"concreteTypeId": "4926d35d1a5157936b0a29bc126b8aace6d911209a5c130e9b716b0c73643ea6",
"name": "ARRAY_BOOL",
"offset": 7641
"offset": 7553
},
{
"concreteTypeId": "776fb5a3824169d6736138565fdc20aad684d9111266a5ff6d5c675280b7e199",
"name": "ARRAY_U64",
"offset": 7644
"offset": 7556
},
{
"concreteTypeId": "c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be",
"name": "TUPLE_BOOL_U64",
"offset": 7740
"offset": 7652
},
{
"concreteTypeId": "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a",
"name": "STR_4",
"offset": 7736
"offset": 7648
},
{
"concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e",
"name": "VEC_U8",
"offset": 7796
"offset": 7708
},
{
"concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b",
"name": "NOT_USED",
"offset": 7735
"offset": 7647
}
],
"encodingVersion": "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ validate_abi = true
expected_warnings = 1
unsupported_profiles = ["debug"]

# check: $()Configurable "ANOTHER_U8": offset: 7640, size: 1
# check: $()Configurable "ARRAY_BOOL": offset: 7641, size: 3
# check: $()Configurable "ARRAY_U64": offset: 7644, size: 24
# check: $()Configurable "B256": offset: 7668, size: 32
# check: $()Configurable "BOOL": offset: 7700, size: 1
# check: $()Configurable "CONFIGURABLE_ENUM_A": offset: 7701, size: 9
# check: $()Configurable "CONFIGURABLE_ENUM_B": offset: 7710, size: 16
# check: $()Configurable "CONFIGURABLE_STRUCT": offset: 7726, size: 9
# check: $()Configurable "NOT_USED": offset: 7735, size: 1
# check: $()Configurable "STR_4": offset: 7736, size: 4
# check: $()Configurable "TUPLE_BOOL_U64": offset: 7740, size: 9
# check: $()Configurable "U16": offset: 7749, size: 2
# check: $()Configurable "U256": offset: 7751, size: 32
# check: $()Configurable "U32": offset: 7783, size: 4
# check: $()Configurable "U64": offset: 7787, size: 8
# check: $()Configurable "U8": offset: 7795, size: 1
# check: $()Configurable "VEC_U8": offset: 7796, size: 8
# check: $()Configurable "ANOTHER_U8": offset: 7552, size: 1
# check: $()Configurable "ARRAY_BOOL": offset: 7553, size: 3
# check: $()Configurable "ARRAY_U64": offset: 7556, size: 24
# check: $()Configurable "B256": offset: 7580, size: 32
# check: $()Configurable "BOOL": offset: 7612, size: 1
# check: $()Configurable "CONFIGURABLE_ENUM_A": offset: 7613, size: 9
# check: $()Configurable "CONFIGURABLE_ENUM_B": offset: 7622, size: 16
# check: $()Configurable "CONFIGURABLE_STRUCT": offset: 7638, size: 9
# check: $()Configurable "NOT_USED": offset: 7647, size: 1
# check: $()Configurable "STR_4": offset: 7648, size: 4
# check: $()Configurable "TUPLE_BOOL_U64": offset: 7652, size: 9
# check: $()Configurable "U16": offset: 7661, size: 2
# check: $()Configurable "U256": offset: 7663, size: 32
# check: $()Configurable "U32": offset: 7695, size: 4
# check: $()Configurable "U64": offset: 7699, size: 8
# check: $()Configurable "U8": offset: 7707, size: 1
# check: $()Configurable "VEC_U8": offset: 7708, size: 8
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ script {
!129 = fn_call_path_span !0 235 236
!130 = (!128 !129)

<<<<<<< HEAD
;; ASM: Final program
;; Program kind: Script
.program:
Expand All @@ -378,16 +377,16 @@ CONFIGURABLES_OFFSET[32..64]
lw $$ds $$tmp i1
add $$ds $$ds $$tmp
cfei i16 ; allocate stack space for globals
addr $$arg0 data_Configurable_0; get pointer to configurable TUPLE default value
addi $$arg1 $zero i8 ; get length of configurable TUPLE default value
addi $$arg2 $ssp i0 ; get pointer to configurable TUPLE stack address
lw $$retv $$tmp i2 ; load configurables offset
add $$retv $$retv $$tmp ; translate it into real memory offset
move $$arg0 $$retv ; pointer to configurable TUPLE default value
addi $$arg1 $ssp i0 ; pointer to configurable TUPLE stack address
sub $$reta $pc $is ; get current instruction offset from instructions start ($is)
srli $$reta $$reta i2 ; get current instruction offset in 32-bit words
addi $$reta $$reta i4 ; set new return address
jmpf $zero i93 ; decode configurable TUPLE
addr $$arg0 data_Configurable_1; get pointer to configurable WRAPPED default value
addi $$arg1 $zero i8 ; get length of configurable WRAPPED default value
addi $$arg2 $ssp i8 ; get pointer to configurable WRAPPED stack address
jmpf $zero i91 ; decode configurable TUPLE
move $$arg0 $$retv ; pointer to configurable WRAPPED default value
addi $$arg1 $ssp i8 ; pointer to configurable WRAPPED stack address
sub $$reta $pc $is ; get current instruction offset from instructions start ($is)
srli $$reta $$reta i2 ; get current instruction offset in 32-bit words
addi $$reta $$reta i4 ; set new return address
Expand Down Expand Up @@ -482,30 +481,30 @@ pshh i524288 ; save registers 40..64
move $$locbase $sp ; save locals base register for function abi_decode_in_place_0
cfei i24 ; allocate 24 bytes for locals and 0 slots for call arguments
move $r0 $$arg0 ; save argument 0 (ptr)
move $r1 $$arg1 ; save argument 1 (len)
move $r2 $$arg2 ; save argument 2 (target)
move $r1 $$arg1 ; save argument 1 (target)
move $r3 $$reta ; save return address
move $$arg0 $r0 ; [call]: pass argument 0
move $$arg1 $r1 ; [call]: pass argument 1
move $$arg1 $zero ; [call]: pass argument 1
move $$arg2 $$locbase ; [call]: pass argument 2
sub $$reta $pc $is ; get current instruction offset from instructions start ($is)
srli $$reta $$reta i2 ; get current instruction offset in 32-bit words
addi $$reta $$reta i4 ; [call]: set new return address
jmpf $zero i19 ; [call]: call from_parts_1
jmpf $zero i20 ; [call]: call from_parts_1
lw $r0 $$retv i0 ; load word
sw $$locbase $r0 i1 ; store word
addi $r0 $$locbase i8 ; get offset to local
move $$arg0 $r0 ; [call]: pass argument 0
sub $$reta $pc $is ; get current instruction offset from instructions start ($is)
srli $$reta $$reta i2 ; get current instruction offset in 32-bit words
addi $$reta $$reta i4 ; [call]: set new return address
jmpf $zero i23 ; [call]: call abi_decode_3
jmpf $zero i24 ; [call]: call abi_decode_3
move $r0 $$retv ; [call]: copy the return value
sw $$locbase $r0 i2 ; store word
addi $r0 $$locbase i16 ; get offset to local
movi $r1 i8 ; initialize constant into register
mcp $r2 $r0 $r1 ; mcp target temp size
move $$retv $zero ; set return value
movi $r2 i8 ; initialize constant into register
mcp $r1 $r0 $r2 ; mcp target temp size
lw $r0 $$locbase i1 ; load word
move $$retv $r0 ; set return value
cfsi i24 ; free 24 bytes for locals and 0 slots for extra call arguments
move $$reta $r3 ; restore return address
poph i524288 ; restore registers 40..64
Expand Down Expand Up @@ -556,6 +555,4 @@ data_<Configurable, TUPLE>_0 .bytes[8] 00 00 00 00 00 00 00 02 ........
data_<Configurable, WRAPPED>_1 .bytes[8] 00 00 00 00 00 00 00 01 ........


=======
>>>>>>> 03833190f (allow dynamic types in configurables)
Finished release [optimized + fuel] target(s) [752 B] in ???
Finished release [optimized + fuel] target(s) [744 B] in ???
Original file line number Diff line number Diff line change
@@ -1,57 +1,11 @@
{
"concreteTypes": [
{
"concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e",
"metadataTypeId": 3,
"type": "struct std::vec::Vec<u8>",
"typeArguments": [
"c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b"
]
},
{
"concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef",
"type": "u16"
},
{
"concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc",
"type": "u32"
},
{
"concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
"type": "u64"
},
{
"concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b",
"type": "u8"
}
],
"configurables": [
{
"concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b",
"name": "A",
"offset": 4752
},
{
"concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef",
"name": "B",
"offset": 4753
},
{
"concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e",
"name": "V",
"offset": 4767
},
{
"concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc",
"name": "C",
"offset": 4755
},
{
"concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
"name": "D",
"offset": 4759
}
],
"configurables": [],
"encodingVersion": "1",
"functions": [
{
Expand All @@ -61,79 +15,9 @@
"output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
}
],
"loggedTypes": [
{
"concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b",
"logId": "14454674236531057292"
},
{
"concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef",
"logId": "2992671284987479467"
},
{
"concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc",
"logId": "15520703124961489725"
},
{
"concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
"logId": "1515152261580153489"
},
{
"concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e",
"logId": "2855558404146077188"
}
],
"loggedTypes": [],
"messagesTypes": [],
"metadataTypes": [
{
"metadataTypeId": 0,
"type": "generic T"
},
{
"metadataTypeId": 1,
"type": "raw untyped ptr"
},
{
"components": [
{
"name": "ptr",
"typeId": 1
},
{
"name": "cap",
"typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
}
],
"metadataTypeId": 2,
"type": "struct std::vec::RawVec",
"typeParameters": [
0
]
},
{
"components": [
{
"name": "buf",
"typeArguments": [
{
"name": "",
"typeId": 0
}
],
"typeId": 2
},
{
"name": "len",
"typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
}
],
"metadataTypeId": 3,
"type": "struct std::vec::Vec",
"typeParameters": [
0
]
}
],
"metadataTypes": [],
"programType": "script",
"specVersion": "1"
}
Loading

0 comments on commit e4a24e9

Please sign in to comment.