branch: externals/beardbolt commit f0d13c4ac2ba26e3e9671a727e4df678acf7e186 Author: Jay Kamat <jaygka...@gmail.com> Commit: Jay Kamat <jaygka...@gmail.com>
Add a stronger blacklist for ocaml asm --- rmsbolt.el | 41 ++++++++++++++++++++++++----------------- starters/rmsbolt.ml | 1 - 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/rmsbolt.el b/rmsbolt.el index 286f445270..a8fb8fb8c7 100644 --- a/rmsbolt.el +++ b/rmsbolt.el @@ -269,24 +269,31 @@ Needed as ocaml cannot output asm to a non-hardcoded file" " ")) " "))) cmd)) -(defvar rmsbolt--hidden-func-c (rx bol (or (and "__" (0+ any)) - (and "_" (or "init" "start" "fini")) - (and (opt "de") "register_tm_clones") - "call_gmon_start" - "frame_dummy" - (and ".plt" (0+ any))) - eol)) +(defvar rmsbolt--hidden-func-c + (rx bol (or (and "__" (0+ any)) + (and "_" (or "init" "start" "fini")) + (and (opt "de") "register_tm_clones") + "call_gmon_start" + "frame_dummy" + (and ".plt" (0+ any))) + eol)) (defvar rmsbolt--hidden-func-ocaml) -(setq rmsbolt--hidden-func-ocaml (rx bol - (or (and "__" (0+ any)) - (and "_" (or "init" "start" "fini")) - (and (opt "de") "register_tm_clones") - "call_gmon_start" - "frame_dummy" - (and ".plt" (0+ any)) - (and "camlCamlinternalFormat__" (0+ any)) - (and (1+ (not (any "@"))) "@plt")) - eol)) +(setq rmsbolt--hidden-func-ocaml + (rx bol + (or (and "__" (0+ any)) + (and "_" (or "init" "start" "fini")) + (and (opt "de") "register_tm_clones") + (and ".plt" (0+ any)) + (and "camlCamlinternalFormat" (0+ any)) + (and (1+ (not (any "@"))) "@plt") + (and (or "caml_" "camlStd_") (0+ any)) + (and "caml" (or "Pervasives" "List" "Bytes" + "String" "Buffer" "Printf" + "Char" "Sys") "__" (0+ any)) + ;; Ocaml likes to make labels following camlModule__, + ;; filter out any lowercase + (and (1+ (1+ lower) (opt (or "64" "32" "8" "16")) (opt "_")))) + eol)) ;;;; Language Definitions (defvar rmsbolt-languages) (setq diff --git a/starters/rmsbolt.ml b/starters/rmsbolt.ml index deee3757a5..23872d40de 100644 --- a/starters/rmsbolt.ml +++ b/starters/rmsbolt.ml @@ -9,7 +9,6 @@ rmsbolt-dissasemble: nil End: *) - let rec fib num = if num <= 1 then num