Skip to content

Commit 785a080

Browse files
committed
fix rebase issues
1 parent 7d49ce3 commit 785a080

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

scripts/csv2html/csv2html.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,4 @@ tail -n +2 "$1" | sed -e 's/^/<tr><td>/' -e 's/,/<\/td><td>/g' -e 's/$/<\/td><\/
5757
echo " </tbody>
5858
</table>
5959
<body>
60-
<<<<<<< HEAD
6160
</html>"
62-
=======
63-
</html>"
64-
>>>>>>> bdd5b43f5 (fixing CI)

sway-core/src/ir_generation/convert.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ use sway_types::{integer_bits::IntegerBits, span::Span};
1414

1515
pub(super) fn convert_literal_to_value(context: &mut Context, ast_literal: &Literal) -> Value {
1616
match ast_literal {
17+
// In Sway for now we don't have `as` casting and for integers which may be implicitly cast
18+
// between widths we just emit a warning, and essentially ignore it. We also assume a
19+
// 'Numeric' integer of undetermined width is 'u64`. The IR would like to be type
20+
// consistent and doesn't tolerate missing integers of different width, so for now, until we
21+
// do introduce explicit `as` casting, all integers are `u64` as far as the IR is
22+
// concerned.
23+
//
24+
// XXX The above isn't true for other targets. We need to improved this.
25+
// FIXME
1726
Literal::U8(n) => ConstantContent::get_uint(context, 8, *n as u64),
1827
Literal::U16(n) => ConstantContent::get_uint(context, 64, *n as u64),
1928
Literal::U32(n) => ConstantContent::get_uint(context, 64, *n as u64),
@@ -32,6 +41,7 @@ pub(super) fn convert_literal_to_constant(
3241
ast_literal: &Literal,
3342
) -> Constant {
3443
let c = match ast_literal {
44+
// All integers are `u64`. See comment above.
3545
Literal::U8(n) => ConstantContent::new_uint(context, 8, *n as u64),
3646
Literal::U16(n) => ConstantContent::new_uint(context, 64, *n as u64),
3747
Literal::U32(n) => ConstantContent::new_uint(context, 64, *n as u64),

0 commit comments

Comments
 (0)