@@ -933,10 +933,10 @@ def load(cx, ptr, t):
933
933
case U16Type () : return load_int (cx , ptr , 2 )
934
934
case U32Type () : return load_int (cx , ptr , 4 )
935
935
case U64Type () : return load_int (cx , ptr , 8 )
936
- case S8Type () : return load_int (cx , ptr , 1 , signed = True )
937
- case S16Type () : return load_int (cx , ptr , 2 , signed = True )
938
- case S32Type () : return load_int (cx , ptr , 4 , signed = True )
939
- case S64Type () : return load_int (cx , ptr , 8 , signed = True )
936
+ case S8Type () : return load_int (cx , ptr , 1 , signed = True )
937
+ case S16Type () : return load_int (cx , ptr , 2 , signed = True )
938
+ case S32Type () : return load_int (cx , ptr , 4 , signed = True )
939
+ case S64Type () : return load_int (cx , ptr , 8 , signed = True )
940
940
case F32Type () : return decode_i32_as_float (load_int (cx , ptr , 4 ))
941
941
case F64Type () : return decode_i64_as_float (load_int (cx , ptr , 8 ))
942
942
case CharType () : return convert_i32_to_char (cx , load_int (cx , ptr , 4 ))
@@ -952,7 +952,7 @@ def load(cx, ptr, t):
952
952
case FutureType (t ) : return lift_future (cx , load_int (cx , ptr , 4 ), t )
953
953
954
954
def load_int (cx , ptr , nbytes , signed = False ):
955
- return int .from_bytes (cx .opts .memory [ptr : ptr + nbytes ], 'little' , signed = signed )
955
+ return int .from_bytes (cx .opts .memory [ptr : ptr + nbytes ], 'little' , signed = signed )
956
956
957
957
def convert_int_to_bool (i ):
958
958
assert (i >= 0 )
@@ -1133,10 +1133,10 @@ def store(cx, v, t, ptr):
1133
1133
case U16Type () : store_int (cx , v , ptr , 2 )
1134
1134
case U32Type () : store_int (cx , v , ptr , 4 )
1135
1135
case U64Type () : store_int (cx , v , ptr , 8 )
1136
- case S8Type () : store_int (cx , v , ptr , 1 , signed = True )
1137
- case S16Type () : store_int (cx , v , ptr , 2 , signed = True )
1138
- case S32Type () : store_int (cx , v , ptr , 4 , signed = True )
1139
- case S64Type () : store_int (cx , v , ptr , 8 , signed = True )
1136
+ case S8Type () : store_int (cx , v , ptr , 1 , signed = True )
1137
+ case S16Type () : store_int (cx , v , ptr , 2 , signed = True )
1138
+ case S32Type () : store_int (cx , v , ptr , 4 , signed = True )
1139
+ case S64Type () : store_int (cx , v , ptr , 8 , signed = True )
1140
1140
case F32Type () : store_int (cx , encode_float_as_i32 (v ), ptr , 4 )
1141
1141
case F64Type () : store_int (cx , encode_float_as_i64 (v ), ptr , 8 )
1142
1142
case CharType () : store_int (cx , char_to_i32 (v ), ptr , 4 )
@@ -1152,7 +1152,7 @@ def store(cx, v, t, ptr):
1152
1152
case FutureType (t ) : store_int (cx , lower_future (cx , v , t ), ptr , 4 )
1153
1153
1154
1154
def store_int (cx , v , ptr , nbytes , signed = False ):
1155
- cx .opts .memory [ptr : ptr + nbytes ] = int .to_bytes (v , nbytes , 'little' , signed = signed )
1155
+ cx .opts .memory [ptr : ptr + nbytes ] = int .to_bytes (v , nbytes , 'little' , signed = signed )
1156
1156
1157
1157
def maybe_scramble_nan32 (f ):
1158
1158
if math .isnan (f ):
@@ -1401,7 +1401,7 @@ def pack_flags_into_int(v, labels):
1401
1401
return i
1402
1402
1403
1403
def lower_own (cx , rep , t ):
1404
- h = ResourceHandle (rep , own = True )
1404
+ h = ResourceHandle (rep , own = True )
1405
1405
return cx .inst .resources .add (t .rt , h )
1406
1406
1407
1407
def lower_borrow (cx , rep , t ):
@@ -1818,7 +1818,7 @@ async def do_call(on_block):
1818
1818
1819
1819
async def canon_resource_new (rt , task , rep ):
1820
1820
trap_if (not task .inst .may_leave )
1821
- h = ResourceHandle (rep , own = True )
1821
+ h = ResourceHandle (rep , own = True )
1822
1822
i = task .inst .resources .add (rt , h )
1823
1823
return [i ]
1824
1824
0 commit comments