diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-08-04 17:05:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 00:05:54 +0000 |
commit | 6759371b5239efa3daa9d988455abdd14a8b18ca (patch) | |
tree | 0c3a3e371ed742bdbd790f7344ec86e8536bc167 /scripts | |
parent | 9534e6927c41f4a6a5d06d58d00c271c9f066e9a (diff) | |
download | binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.tar.gz binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.tar.bz2 binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.zip |
Remove RTTs (#4848)
RTTs were removed from the GC spec and if they are added back in in the future,
they will be heap types rather than value types as in our implementation.
Updating our implementation to have RTTs be heap types would have been more work
than deleting them for questionable benefit since we don't know how long it will
be before they are specced again.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fuzz_opt.py | 17 | ||||
-rwxr-xr-x | scripts/gen-s-parser.py | 10 |
2 files changed, 9 insertions, 18 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index e43d40dec..bb25dd808 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -340,17 +340,17 @@ def pick_initial_contents(): FEATURE_OPTS += [ # has not been fuzzed in general yet '--disable-memory64', - # avoid multivalue for now due to bad interactions with gc rtts in - # stacky code. for example, this fails to roundtrip as the tuple code - # ends up creating stacky binary code that needs to spill rtts to locals, - # which is not allowed: + # avoid multivalue for now due to bad interactions with gc non-nullable + # locals in stacky code. for example, this fails to roundtrip as the + # tuple code ends up creating stacky binary code that needs to spill + # non-nullable references to locals, which is not allowed: # # (module # (type $other (struct)) - # (func $foo (result (rtt $other)) + # (func $foo (result (ref $other)) # (select - # (rtt.canon $other) - # (rtt.canon $other) + # (struct.new $other) + # (struct.new $other) # (tuple.extract 1 # (tuple.make # (i32.const 0) @@ -1223,9 +1223,10 @@ def randomize_opt_flags(): continue if '--enable-multivalue' in FEATURE_OPTS and '--enable-reference-types' in FEATURE_OPTS: print('avoiding --flatten due to multivalue + reference types not supporting it (spilling of non-nullable tuples)') + print('TODO: Resolving https://github.com/WebAssembly/binaryen/issues/4824 may fix this') continue if '--gc' not in FEATURE_OPTS: - print('avoiding --flatten due to GC not supporting it (spilling of RTTs)') + print('avoiding --flatten due to GC not supporting it (spilling of non-nullable locals)') continue if INITIAL_CONTENTS and os.path.getsize(INITIAL_CONTENTS) > 2000: print('avoiding --flatten due using a large amount of initial contents, which may blow up') diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index e36caf02e..bb56b76e3 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -567,9 +567,7 @@ instructions = [ ("i31.new", "makeI31New(s)"), ("i31.get_s", "makeI31Get(s, true)"), ("i31.get_u", "makeI31Get(s, false)"), - ("ref.test", "makeRefTest(s)"), ("ref.test_static", "makeRefTestStatic(s)"), - ("ref.cast", "makeRefCast(s)"), ("ref.cast_static", "makeRefCastStatic(s)"), ("ref.cast_nop_static", "makeRefCastNopStatic(s)"), ("br_on_null", "makeBrOn(s, BrOnNull)"), @@ -584,22 +582,14 @@ instructions = [ ("br_on_non_data", "makeBrOn(s, BrOnNonData)"), ("br_on_i31", "makeBrOn(s, BrOnI31)"), ("br_on_non_i31", "makeBrOn(s, BrOnNonI31)"), - ("rtt.canon", "makeRttCanon(s)"), - ("rtt.sub", "makeRttSub(s)"), - ("rtt.fresh_sub", "makeRttFreshSub(s)"), - ("struct.new_with_rtt", "makeStructNew(s, false)"), - ("struct.new_default_with_rtt", "makeStructNew(s, true)"), ("struct.new", "makeStructNewStatic(s, false)"), ("struct.new_default", "makeStructNewStatic(s, true)"), ("struct.get", "makeStructGet(s)"), ("struct.get_s", "makeStructGet(s, true)"), ("struct.get_u", "makeStructGet(s, false)"), ("struct.set", "makeStructSet(s)"), - ("array.new_with_rtt", "makeArrayNew(s, false)"), - ("array.new_default_with_rtt", "makeArrayNew(s, true)"), ("array.new", "makeArrayNewStatic(s, false)"), ("array.new_default", "makeArrayNewStatic(s, true)"), - ("array.init", "makeArrayInit(s)"), ("array.init_static", "makeArrayInitStatic(s)"), ("array.get", "makeArrayGet(s)"), ("array.get_s", "makeArrayGet(s, true)"), |