Skip to content

Instantly share code, notes, and snippets.

@nha
Forked from halgari/truffle-in-clojure.clj
Created April 4, 2018 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nha/4fa0ab3ee60c6add8cb0bccdd5174881 to your computer and use it in GitHub Desktop.
Save nha/4fa0ab3ee60c6add8cb0bccdd5174881 to your computer and use it in GitHub Desktop.
(ns morel.core
(:import (com.oracle.truffle.api.nodes RootNode NodeInfo Node$Child))
(:require [clojure.interop :refer [defclass]]
[clojure.reflect :as reflect]))
(defclass
^{NodeInfo {:language "SL"
:description "The root of all SL execution trees"}}
SLRootNode [language
frame-descriptor
^{Node$Child []}
body-node
source-selection]
RootNode [language frame-descriptor])
(.language (first (.getDeclaredAnnotations SLRootNode)))
;; => "SL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment