From c59df4cda843ef11ad261f5c889dddc9a9d59d3b Mon Sep 17 00:00:00 2001 From: Abbas Mashayekh Date: Fri, 2 Apr 2021 21:34:03 +0430 Subject: Reorder global definitions in Print pass (#3770) This is needed to make sure globals are printed before element segments, where `global.get` can appear both as offset and an expression. --- test/reference-types.wast.fromBinary | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/reference-types.wast.fromBinary') diff --git a/test/reference-types.wast.fromBinary b/test/reference-types.wast.fromBinary index 16f59d07a..ee99c0d4e 100644 --- a/test/reference-types.wast.fromBinary +++ b/test/reference-types.wast.fromBinary @@ -10,9 +10,6 @@ (type $externref_=>_funcref (func (param externref) (result funcref))) (import "env" "import_global" (global $import_global externref)) (import "env" "import_func" (func $import_func (param externref) (result funcref))) - (table $0 3 3 funcref) - (elem (i32.const 0) $take_externref $take_funcref $take_anyref) - (elem declare func $foo $ref-taken-but-not-in-table) (global $global_externref (mut externref) (ref.null extern)) (global $global_funcref (mut funcref) (ref.null func)) (global $global_funcref_func (mut funcref) (ref.func $foo)) @@ -20,6 +17,9 @@ (global $global_anyref2 (mut anyref) (ref.null extern)) (global $global_anyref3 (mut anyref) (ref.null func)) (global $global_anyref4 (mut anyref) (ref.func $foo)) + (table $0 3 3 funcref) + (elem (i32.const 0) $take_externref $take_funcref $take_anyref) + (elem declare func $foo $ref-taken-but-not-in-table) (event $event$0 (attr 0) (param i32)) (export "export_func" (func $import_func)) (export "export_global" (global $import_global)) -- cgit v1.2.3