<commit_before>; tré – Copyright (c) 2008–2015 <NAME> <<EMAIL>>

(defmacro define-shared-std-macro (targets &rest x)
  `(progn
     ,@(@ [`(,($ 'define- _ '-std-macro) ,@x)]
          (intersect *targets* (make-keywords targets)))))

(define-shared-std-macro (js php) defvar-native (&rest x)
  (print-definition `(defvar-native ,@x))
  (+! (predefined-symbols) x)
  (apply #'add-obfuscation-exceptions x)
  nil)

(define-shared-std-macro (js php) dont-obfuscate (&rest symbols)
  (apply #'add-obfuscation-exceptions symbols)
  nil)

(define-shared-std-macro (js php) declare-native-cps-function (&rest symbols)
  (print-definition `(declare-native-cps-function ,@symbols))
  (adolist symbols
    (add-native-cps-function !))
  nil)

(define-shared-std-macro (js php) declare-cps-exception (&rest symbols)
  (print-definition `(declare-cps-exception ,@symbols))
  (adolist symbols
    (add-cps-exception !))
  nil)

(define-shared-std-macro (js php) declare-cps-wrapper (&rest symbols)
  (print-definition `(declare-cps-wrapper ,@symbols))
  (adolist symbols
    (add-cps-wrapper !))
  nil)

(define-shared-std-macro (js php) assert (x &optional (txt nil) &rest args)
  (& (assert?)
     (make-assertion x txt args)))

(define-shared-std-macro (js php) functional (&rest x)
  (print-definition `(functional ,@x))
  (adolist x
    (? (transpiler-functional? *transpiler* !)
       (warn "Redefinition of functional ~A." !))
    (transpiler-add-functional *transpiler* !))
  nil)

(define-shared-std-macro (c js php) not (&rest x)
   `(? ,x. nil ,(!? .x
                    `(not ,@!)
                    t)))

(define-shared-std-macro (bc c js php) mapcar (fun &rest lsts)
  `(,(? .lsts
        'mapcar
        'filter)
        ,fun ,@lsts))

(define-shared-std-macro (bc c js php) defmacro (name args &body body)
  (print-definition `(defmacro ,name ,args))
  (make-transpiler-std-macro name args body))
;  `(%defmacro ,name ,args ,@body))

(define-shared-std-macro (bc c js php) defconstant (&rest x)
  `(defvar ,@x))

(define-shared-std-macro (bc c js php) defvar (name &optional (val '%%no-value))
  (& (eq '%%no-value val)
     (= val `',name))
  (print-definition `(defvar ,name))
  (& (defined-variable name)
     (redef-warn "Redefinition of variable ~A.~%" name))
  (add-defined-variable name)
  (& *have-compiler?*
     (add-delayed-var-init `((= *variables* (. (. ',name ',val) *variables*)))))
  `(progn
     ,@(& (needs-var-declarations?)
          `((%var ,name)))
     (%= ,name ,val)))<commit_msg>Disabled %SET-ATOM-FUN in frontend macroexpanders.<commit_after>; tré – Copyright (c) 2008–2015 <NAME> <<EMAIL>>

(defmacro define-shared-std-macro (targets &rest x)
  `(progn
     ,@(@ [`(,($ 'define- _ '-std-macro) ,@x)]
          (intersect *targets* (make-keywords targets)))))

(define-shared-std-macro (js php) defvar-native (&rest x)
  (print-definition `(defvar-native ,@x))
  (+! (predefined-symbols) x)
  (apply #'add-obfuscation-exceptions x)
  nil)

(define-shared-std-macro (js php) dont-obfuscate (&rest symbols)
  (apply #'add-obfuscation-exceptions symbols)
  nil)

(define-shared-std-macro (js php) declare-native-cps-function (&rest symbols)
  (print-definition `(declare-native-cps-function ,@symbols))
  (adolist symbols
    (add-native-cps-function !))
  nil)

(define-shared-std-macro (js php) declare-cps-exception (&rest symbols)
  (print-definition `(declare-cps-exception ,@symbols))
  (adolist symbols
    (add-cps-exception !))
  nil)

(define-shared-std-macro (js php) declare-cps-wrapper (&rest symbols)
  (print-definition `(declare-cps-wrapper ,@symbols))
  (adolist symbols
    (add-cps-wrapper !))
  nil)

(define-shared-std-macro (js php) assert (x &optional (txt nil) &rest args)
  (& (assert?)
     (make-assertion x txt args)))

(define-shared-std-macro (js php) functional (&rest x)
  (print-definition `(functional ,@x))
  (adolist x
    (? (transpiler-functional? *transpiler* !)
       (warn "Redefinition of functional ~A." !))
    (transpiler-add-functional *transpiler* !))
  nil)

(define-shared-std-macro (c js php) not (&rest x)
   `(? ,x. nil ,(!? .x
                    `(not ,@!)
                    t)))

(define-shared-std-macro (bc c js php) mapcar (fun &rest lsts)
  `(,(? .lsts
        'mapcar
        'filter)
        ,fun ,@lsts))

(define-shared-std-macro (bc c js php) defmacro (name args &body body)
  (print-definition `(defmacro ,name ,args))
  (make-transpiler-std-macro name args body))
;  `(%defmacro ,name ,args ,@body))

(define-shared-std-macro (bc c js php) defconstant (&rest x)
  `(defvar ,@x))

(define-shared-std-macro (bc c js php) defvar (name &optional (val '%%no-value))
  (& (eq '%%no-value val)
     (= val `',name))
  (print-definition `(defvar ,name))
  (& (defined-variable name)
     (redef-warn "Redefinition of variable ~A.~%" name))
  (add-defined-variable name)
  (& *have-compiler?*
     (add-delayed-var-init `((= *variables* (. (. ',name ',val) *variables*)))))
  `(progn
     ,@(& (needs-var-declarations?)
          `((%var ,name)))
     (%= ,name ,val)))

(define-shared-std-macro (bc c js php) %set-atom-fun (a b)
  `(%set-atom-fun ,a ,b))
{'fraction_non_alphanumeric': 0.18853255587949466, 'fraction_numerical': 0.003109815354713314, 'mean_word_length': 3.3870417732310316, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '824235', 'n_tokens_mistral': 2004, 'n_tokens_neox': 1893, 'n_words': 452}