summaryrefslogtreecommitdiff
path: root/test/unit/test_features.py
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-07-23 17:12:22 -0700
committerGitHub <noreply@github.com>2019-07-23 17:12:22 -0700
commita2741b360b444a26cd87327a3d60a601bb33119f (patch)
treee7ea331a4236f33c4f8e28b8ef30a8a09ab29740 /test/unit/test_features.py
parent0beba8aad60e4bdadcd3fc3e5126e7befb7b7994 (diff)
downloadbinaryen-a2741b360b444a26cd87327a3d60a601bb33119f.tar.gz
binaryen-a2741b360b444a26cd87327a3d60a601bb33119f.tar.bz2
binaryen-a2741b360b444a26cd87327a3d60a601bb33119f.zip
Finalize tail call support (#2246)
Adds tail call support to fuzzer and makes small changes to handle return calls in multiple utilities and passes. Makes larger changes to DAE and inlining passes to properly handle tail calls.
Diffstat (limited to 'test/unit/test_features.py')
-rw-r--r--test/unit/test_features.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/test_features.py b/test/unit/test_features.py
index 968aaa252..2a0eca39b 100644
--- a/test/unit/test_features.py
+++ b/test/unit/test_features.py
@@ -131,6 +131,20 @@ class FeatureValidationTest(BinaryenTestCase):
'''
self.check_tail_call(module, 'return_call requires tail calls to be enabled')
+ def test_tail_call_indirect(self):
+ module = '''
+ (module
+ (type $T (func))
+ (table $0 1 1 funcref)
+ (func $foo
+ (return_call_indirect (type $T)
+ (i32.const 0)
+ )
+ )
+ )
+ '''
+ self.check_tail_call(module, 'return_call_indirect requires tail calls to be enabled')
+
class TargetFeaturesSectionTest(BinaryenTestCase):
def test_atomics(self):