Skip to content

Commit 66abfd1

Browse files
committed
Fix typo in LICENSE and conversion
1 parent d68a2d3 commit 66abfd1

File tree

2 files changed

+61
-58
lines changed

2 files changed

+61
-58
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018
3+
Copyright (c) 2018 dontru
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/conversion.wat

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,83 @@
1-
;; i32
1+
(module
22

3-
(func $i64_to_i32 (param i64) (result i32)
4-
(i32.wrap/i64
5-
(get_local 0)))
3+
;; i32
64

7-
(func $f32_to_i32 (param f32) (result i32)
8-
(i32.trunc_s/f32
9-
(get_local 0)))
5+
(func $i64_to_i32 (param i64) (result i32)
6+
(i32.wrap/i64
7+
(get_local 0)))
108

11-
(func $f64_to_i32 (param f64) (result i32)
12-
(i32.trunc_s/f64
13-
(get_local 0)))
9+
(func $f32_to_i32 (param f32) (result i32)
10+
(i32.trunc_s/f32
11+
(get_local 0)))
1412

13+
(func $f64_to_i32 (param f64) (result i32)
14+
(i32.trunc_s/f64
15+
(get_local 0)))
1516

16-
;; i64
1717

18-
(func $i32_to_i64 (param i32) (result i64)
19-
(i64.extend_s/i32
20-
(get_local 0)))
18+
;; i64
2119

22-
(func $f32_to_i64 (param f32) (result i64)
23-
(i64.trunc_s/f32
24-
(get_local 0)))
20+
(func $i32_to_i64 (param i32) (result i64)
21+
(i64.extend_s/i32
22+
(get_local 0)))
2523

26-
(func $f64_to_i64 (param f64) (result i64)
27-
(i64.trunc_s/f64
28-
(get_local 0)))
24+
(func $f32_to_i64 (param f32) (result i64)
25+
(i64.trunc_s/f32
26+
(get_local 0)))
2927

28+
(func $f64_to_i64 (param f64) (result i64)
29+
(i64.trunc_s/f64
30+
(get_local 0)))
3031

31-
;; f32
3232

33-
(func $i32_to_f32 (param i32) (result f32)
34-
(f32.convert_s/i32
35-
(get_local 0)))
33+
;; f32
3634

37-
(func $i64_to_f32 (param i64) (result f32)
38-
(f32.convert_s/i64
39-
(get_local 0)))
35+
(func $i32_to_f32 (param i32) (result f32)
36+
(f32.convert_s/i32
37+
(get_local 0)))
4038

41-
(func $f64_to_f32 (param f64) (result f32)
42-
(f32.demote/f64
43-
(get_local 0)))
39+
(func $i64_to_f32 (param i64) (result f32)
40+
(f32.convert_s/i64
41+
(get_local 0)))
4442

43+
(func $f64_to_f32 (param f64) (result f32)
44+
(f32.demote/f64
45+
(get_local 0)))
4546

46-
;; f64
4747

48-
(func $i32_to_f64 (param i32) (result f64)
49-
(f64.convert_s/i32
50-
(get_local 0)))
48+
;; f64
5149

52-
(func $i64_to_f64 (param i64) (result f64)
53-
(f64.convert_s/i64
54-
(get_local 0)))
50+
(func $i32_to_f64 (param i32) (result f64)
51+
(f64.convert_s/i32
52+
(get_local 0)))
5553

56-
(func $f32_to_f64 (param f32) (result f64)
57-
(f64.promote/f32
58-
(get_local 0)))
54+
(func $i64_to_f64 (param i64) (result f64)
55+
(f64.convert_s/i64
56+
(get_local 0)))
5957

58+
(func $f32_to_f64 (param f32) (result f64)
59+
(f64.promote/f32
60+
(get_local 0)))
6061

61-
;; bool, i8, i16
6262

63-
(func $i32_to_bool (param i32) (result i32)
64-
(i32.ne
65-
(get_local 0)
66-
(i32.const 0)))
63+
;; bool, i8, i16
6764

68-
(func $i32_to_i8 (param i32) (result i32)
69-
(i32.shr_s
70-
(i32.shl
65+
(func $i32_to_bool (param i32) (result i32)
66+
(i32.ne
7167
(get_local 0)
72-
(i32.const 24))
73-
(i32.const 24)))
74-
75-
(func $i32_to_i16 (param i32) (result i32)
76-
(i32.shr_s
77-
(i32.shl
78-
(get_local 0)
79-
(i32.const 16))
80-
(i32.const 16)))
68+
(i32.const 0)))
69+
70+
(func $i32_to_i8 (param i32) (result i32)
71+
(i32.shr_s
72+
(i32.shl
73+
(get_local 0)
74+
(i32.const 24))
75+
(i32.const 24)))
76+
77+
(func $i32_to_i16 (param i32) (result i32)
78+
(i32.shr_s
79+
(i32.shl
80+
(get_local 0)
81+
(i32.const 16))
82+
(i32.const 16)))
83+
)

0 commit comments

Comments
 (0)