<commit_before>;;;;; TRE transpiler
;;;;; Copyright (c) 2008-2009 <NAME> <<EMAIL>>

;;;; EXPRESSION FINALIZATION

;; Make jump labels.
;; Remove (IDENTITY ~%RET)  expressions.
;; Add %VAR declarations for expex symbols.
(defun transpiler-finalize-sexprs (tr x)
  (when x
	(with (a          x.
		   ret		  (transpiler-obfuscate tr '~%ret))
	  (if
		; Ignore top-level NIL.
		(not a)
		  (transpiler-finalize-sexprs tr .x)

		; Make jump label.
	  	(atom a) 
		  (cons (funcall (transpiler-make-label tr) a)
		        (transpiler-finalize-sexprs tr .x))

		; Recurse into function.
        (and (%setq? a)
		     (lambda? (%setq-value a)))
	      (cons `(%setq ,(%setq-place a)
				        ,(copy-recurse-into-lambda
					       (%setq-value a)
					       #'((body)
						        (transpiler-finalize-sexprs tr body))))
				(transpiler-finalize-sexprs tr .x))

		; Recurse into named top-level function.
		(eq 'function a.)
		  (cons `(function
				   ,(second a) ; name
				   (,@(lambda-funinfo-and-args (third a))
				       ,(transpiler-finalize-sexprs tr
						    (lambda-body (third a)))))
				 (transpiler-finalize-sexprs tr .x))

		; Ignore (IDENTITY ~%RET).
	    (and (identity? a)
		     (eq ret (second a)))
		  (transpiler-finalize-sexprs tr .x)

	    ; Just copy with separator. Make return-value assignment if missing.
		(cons (if (or (vm-jump? a)
					  (%setq? a)
					  (in? a. '%var '%transpiler-native))
				  a
				  `(%setq ,ret ,a))
			  (transpiler-finalize-sexprs tr .x))))))<commit_msg>Only give name to top-level functions.<commit_after>;;;;; TRE transpiler
;;;;; Copyright (c) 2008-2009 <NAME> <<EMAIL>>

;;;; EXPRESSION FINALIZATION

;; Make jump labels.
;; Remove (IDENTITY ~%RET)  expressions.
;; Add %VAR declarations for expex symbols.
(defun transpiler-finalize-sexprs (tr x &optional (toplevel t))
  (when x
	(with (a          x.
		   ret		  (transpiler-obfuscate tr '~%ret))
	  (if
		; Ignore top-level NIL.
		(not a)
		  (transpiler-finalize-sexprs tr .x)

		; Make jump label.
	  	(atom a) 
		  (cons (funcall (transpiler-make-label tr) a)
		        (transpiler-finalize-sexprs tr .x))

		; Recurse into function.
        (and (%setq? a)
		     (lambda? (%setq-value a)))
	      (cons `(%setq ,(%setq-place a)
				        ,(copy-recurse-into-lambda
					       (%setq-value a)
					       #'((body)
						        (transpiler-finalize-sexprs tr body))))
				(transpiler-finalize-sexprs tr .x))

		; Recurse into named top-level function.
		(and toplevel
			 (eq 'function a.))
		  (cons `(function
				   ,(second a) ; name
				   (,@(lambda-funinfo-and-args (third a))
				       ,(transpiler-finalize-sexprs tr
						    (lambda-body (third a))
							nil)))
				 (transpiler-finalize-sexprs tr .x))

		; Ignore (IDENTITY ~%RET).
	    (and (identity? a)
		     (eq ret (second a)))
		  (transpiler-finalize-sexprs tr .x)

	    ; Just copy with separator. Make return-value assignment if missing.
		(cons (if (or (vm-jump? a)
					  (%setq? a)
					  (in? a. '%var '%transpiler-native))
				  a
				  `(%setq ,ret ,a))
			  (transpiler-finalize-sexprs tr .x))))))
{'fraction_non_alphanumeric': 0.15645161290322582, 'fraction_numerical': 0.005161290322580645, 'mean_word_length': 2.3236870310825295, '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': '2469548', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1120, 'n_words': 300}