@@ -12,6 +12,8 @@ BinaryenFloat64: 4
1212 (type $v (func))
1313 (type $3 (func))
1414 (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
15+ (global $a-global i32 (i32.const 7))
16+ (global $a-mutable-global (mut f32) (f32.const 7.5))
1517 (table 1 1 anyfunc)
1618 (elem (i32.const 0) "$kitchen()sinker")
1719 (memory $0 1 256)
@@ -1386,6 +1388,10 @@ int main() {
13861388 BinaryenType varTypes[] = { 1 };
13871389 functions[0] = BinaryenAddFunction(the_module, "kitchen()sinker", functionTypes[0], varTypes, 1, expressions[251]);
13881390 }
1391+ expressions[252] = BinaryenConst(the_module, BinaryenLiteralInt32(7));
1392+ BinaryenAddGlobal(the_module, "a-global", 1, 0, expressions[252]);
1393+ expressions[253] = BinaryenConst(the_module, BinaryenLiteralFloat32(7.5));
1394+ BinaryenAddGlobal(the_module, "a-mutable-global", 3, 1, expressions[253]);
13891395 {
13901396 BinaryenType paramTypes[] = { 1, 4 };
13911397 functionTypes[1] = BinaryenAddFunctionType(the_module, "fiF", 3, paramTypes, 2);
@@ -1396,22 +1402,22 @@ int main() {
13961402 BinaryenFunctionRef funcs[] = { functions[0] };
13971403 BinaryenSetFunctionTable(the_module, funcs, 1);
13981404 }
1399- expressions[252 ] = BinaryenConst(the_module, BinaryenLiteralInt32(10));
1405+ expressions[254 ] = BinaryenConst(the_module, BinaryenLiteralInt32(10));
14001406 {
14011407 const char segment0[] = { 104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100 };
14021408 const char* segments[] = { segment0 };
1403- BinaryenExpressionRef segmentOffsets[] = { expressions[252 ] };
1409+ BinaryenExpressionRef segmentOffsets[] = { expressions[254 ] };
14041410 BinaryenIndex segmentSizes[] = { 12 };
14051411 BinaryenSetMemory(the_module, 1, 256, "mem", segments, segmentOffsets, segmentSizes, 1);
14061412 }
14071413 {
14081414 BinaryenType paramTypes[] = { 0 };
14091415 functionTypes[2] = BinaryenAddFunctionType(the_module, "v", 0, paramTypes, 0);
14101416 }
1411- expressions[253 ] = BinaryenNop(the_module);
1417+ expressions[255 ] = BinaryenNop(the_module);
14121418 {
14131419 BinaryenType varTypes[] = { 0 };
1414- functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[2], varTypes, 0, expressions[253 ]);
1420+ functions[1] = BinaryenAddFunction(the_module, "starter", functionTypes[2], varTypes, 0, expressions[255 ]);
14151421 }
14161422 BinaryenSetStart(the_module, functions[1]);
14171423 {
@@ -1427,6 +1433,8 @@ int main() {
14271433 (type $v (func))
14281434 (type $3 (func))
14291435 (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
1436+ (global $a-global i32 (i32.const 7))
1437+ (global $a-mutable-global (mut f32) (f32.const 7.5))
14301438 (table 1 1 anyfunc)
14311439 (elem (i32.const 0) "$kitchen()sinker")
14321440 (memory $0 1 256)
0 commit comments