anchor.diff:  (defmethod cffi:translate-into-foreign-memory ((value (eql t)) (type jx:jx-value-type) js-value)
     (new js-value :boolean value))
   
  +(defmethod cffi:translate-into-foreign-memory ((value js-value-handle) (type jx:jx-value-type) js-value)
  +  (cffi:foreign-funcall "memcpy"
  +			:pointer js-value
  +			:pointer (js-value value)
  +			:int (cffi:foreign-type-size '(:struct jx:jx-value))
  +			:void))
   
   ;;; **************************************************
   
   ;;; **************************************************
   
  -(defvar *js-callbacks*
  +(defvar *callbacks*
     (make-hash-table :test 'equal))
   
  -(defun register-callback (callback)
  -  (let ((callback-id (string (gensym))))
  -    (setf (gethash callback-id *js-callbacks*) callback)
  -    callback-id))
  +(defclass callback-handle (js-value-handle)
  +  ((cb :initarg :cb
  +       :reader cb)
  +   (persistent :initarg :persistent
  +	       :reader persistentp)))
   
  -(defun invoke-callback (callback-id)
  -  (let ((callback (gethash callback-id *js-callbacks*)))
  -    (remhash callback-id *js-callbacks*)
  -    callback))
  +(defun make-callback (fn &key persistent)
  +  (flet ((make-callback-js-code (id)
  +	   (concatenate 'string
  +			"(function(){ console.log(arguments); process.natives.cl_call.apply(null,['"
  +			id
  +			"'].concat(Array.prototype.slice.call(arguments)))})")))
  +  (let* ((id (string (gensym)))
  +	 (js-value (js-value (evaluate (make-callback-js-code id)))))
  +    (setf (gethash id *callbacks*)
  +	  (make-instance 'callback-handle
  +			 :js-value js-value
  +			 :persistent persistent
  +			 :cb fn)))))
   
  +(cffi:defcallback cl-call :void ((args :pointer) (argc :int))
  +  (let* ((callback-id (convert-js-value (cffi:mem-aptr args '(:struct jx:jx-value) 0)))
  +	 (callback-handle (gethash callback-id *callbacks*))
  +	 (converted-args
  +	  (loop
  +	     for i from 1 to (1- argc)
  +	     collect (convert-js-value (cffi:mem-aptr args '(:struct jx:jx-value) i)))))
  +    (apply (cb callback-handle) converted-args)
  +    (unless (persistentp callback-handle)
  +      (remhash callback-id *callbacks*)
  +      (free callback-handle))))
  +      
  +  
  +;;; **************************************************
  +
  +;;; **************************************************
  +
  +      
   (defun call-function (js-value-handle &rest args)
     (without-fp-traps
       (let ((num-args (length args))
  
positive.code:   (jx:initialize-once "")
    (jx:initialize-new-engine)
    (jx:define-main-file "console.log('Engine Started');")
    (jx:define-extension "cl_return" (cffi:callback cl-return)))
  
  (defun start-engine ()
    (without-fp-traps (jx:start-engine)))
  
negative.code: 	  (jx:free result)
  	  (cffi:foreign-free result))))))
  	  
  ;;; **************************************************
  
  ;;; **************************************************
  