From 11b34169f802908348e99d0a52b9c50a64028964 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 16 Nov 2019 15:12:37 +0100 Subject: [PATCH] add comp-tests-trampoline-removal --- test/src/comp-test-funcs.el | 3 +++ test/src/comp-tests.el | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 5f33eacdb2f..214e07e6dde 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -241,6 +241,9 @@ (defun comp-tests-string-trim-f (url) (string-trim url)) +(defun comp-tests-trampoline-removal-f () + (make-hash-table)) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; ;;;;;;;;;;;;;;;;;;;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 1f43a91d49c..34d00896b4f 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -306,6 +306,11 @@ Check that the resulting binaries do not differ." (ert-deftest comp-tests-string-trim () (should (string= (comp-tests-string-trim-f "dsaf ") "dsaf"))) +(ert-deftest comp-tests-trampoline-removal () + ;; This tests that we can can call primitives with no dedicated bytecode. + ;; At speed >= 2 the trampoline will not be used. + (should (hash-table-p (comp-tests-trampoline-removal-f)))) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; ;;;;;;;;;;;;;;;;;;;; -- 2.39.5