Skip to content

Commit d6c1a62

Browse files
committed
binaryen.js tests
1 parent b5b453a commit d6c1a62

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/binaryen-c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ BinaryenExpressionRef BinaryenRefNull(BinaryenModuleRef module,
15081508
BinaryenType type) {
15091509
Type type_(type);
15101510
assert(type_.isNullable());
1511-
return static_cast<Expression*>(Builder(*(Module*)module).makeRefNull(type_));
1511+
return static_cast<Expression*>(Builder(*(Module*)module).makeRefNull(type_.getHeapType()));
15121512
}
15131513

15141514
BinaryenExpressionRef BinaryenRefIs(BinaryenModuleRef module,

test/binaryen.js/kitchen-sink.js.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,12 +2072,12 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
20722072
)
20732073
(drop
20742074
(ref.is_null
2075-
(ref.null extern)
2075+
(ref.null noextern)
20762076
)
20772077
)
20782078
(drop
20792079
(ref.is_null
2080-
(ref.null func)
2080+
(ref.null nofunc)
20812081
)
20822082
)
20832083
(drop
@@ -2087,15 +2087,15 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
20872087
)
20882088
(drop
20892089
(select (result funcref)
2090-
(ref.null func)
2090+
(ref.null nofunc)
20912091
(ref.func "$kitchen()sinker")
20922092
(i32.const 1)
20932093
)
20942094
)
20952095
(drop
20962096
(ref.eq
2097-
(ref.null eq)
2098-
(ref.null eq)
2097+
(ref.null none)
2098+
(ref.null none)
20992099
)
21002100
)
21012101
(try
@@ -4176,12 +4176,12 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
41764176
)
41774177
(drop
41784178
(ref.is_null
4179-
(ref.null extern)
4179+
(ref.null noextern)
41804180
)
41814181
)
41824182
(drop
41834183
(ref.is_null
4184-
(ref.null func)
4184+
(ref.null nofunc)
41854185
)
41864186
)
41874187
(drop
@@ -4191,15 +4191,15 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
41914191
)
41924192
(drop
41934193
(select (result funcref)
4194-
(ref.null func)
4194+
(ref.null nofunc)
41954195
(ref.func "$kitchen()sinker")
41964196
(i32.const 1)
41974197
)
41984198
)
41994199
(drop
42004200
(ref.eq
4201-
(ref.null eq)
4202-
(ref.null eq)
4201+
(ref.null none)
4202+
(ref.null none)
42034203
)
42044204
)
42054205
(try

0 commit comments

Comments
 (0)