<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p>Hi Steve, <br>
    </p>
    <p>   that's great. I haven't looked at the whole PR just yet.  </p>
    <p>Just one minor thing to consider when using the SPIR-V Toolkit.
      You might want to use a new ID to identify the code gen, since the
      ID 29 is taken. You can see all definitions here: <br>
    </p>
    <p><a class="moz-txt-link-freetext" href="https://github.com/KhronosGroup/SPIRV-Headers/blob/main/include/spirv/spir-v.xml#L82C25-L82C48">https://github.com/KhronosGroup/SPIRV-Headers/blob/main/include/spirv/spir-v.xml#L82C25-L82C48</a></p>
    <p>So something like this will do the job, as the ID 42 is
      available:<br>
    </p>
    <p><span class="pl-smi"
style="box-sizing: border-box; color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">this</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">.</span><span
      class="pl-s1"
style="box-sizing: border-box; color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">module</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> = </span><span
      class="pl-k"
style="box-sizing: border-box; color: var(--color-prettylights-syntax-keyword); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">new</span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> </span><span
      class="pl-smi"
style="box-sizing: border-box; color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">SPIRVModule</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">(</span><span
      class="pl-k"
style="box-sizing: border-box; color: var(--color-prettylights-syntax-keyword); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">new</span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> </span><span
      class="pl-smi"
style="box-sizing: border-box; color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">SPIRVHeader</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">(</span><span
      class="pl-c1"
style="box-sizing: border-box; color: var(--color-prettylights-syntax-constant); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">1</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">, </span><span
      class="pl-c1"
style="box-sizing: border-box; color: var(--color-prettylights-syntax-constant); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">2</span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">, </span>42<span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">, </span><span
      class="pl-c1"
style="box-sizing: border-box; color: var(--color-prettylights-syntax-constant); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">0</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">, </span><span
      class="pl-c1"
style="box-sizing: border-box; color: var(--color-prettylights-syntax-constant); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span
      class="pl-token" style="box-sizing: border-box;">0</span></span><span
style="color: rgb(173, 186, 199); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(70, 149, 74, 0.15); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">));</span></p>
    <p>Kind regards</p>
    <p>Juan<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 12/03/2024 23:57, Steve Dohrmann
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:r72JbCSdcq6JfNtjaKTixHoYL4DNFcRqZDWZAdTQNrU=.dc0a9bed-59d8-4be5-9c42-0632fdb3e7ea@github.com">
      <pre class="moz-quote-pre" wrap="">Example code showing use of code reflection in translation from Java to SPIR-V intermediate language.  For more information on SPIR-V see [<a class="moz-txt-link-freetext" href="https://www.khronos.org/spir">https://www.khronos.org/spir</a>](<a class="moz-txt-link-freetext" href="https://www.khronos.org/spir">https://www.khronos.org/spir</a>).

Translates from a Java CoreOps.FuncOp object to a SpirvOps.FuncOp object and then to an entry point in a SPIR-V binary module.  One test is included that demonstrates use and renders the Java model, SPIR-V model, and disassembled binary representations of an example Java method. 

A subsequent pull-request will provide additional test code, including the ability to test SPIR-V binaries on GPU hardware. 

Dependencies:

This code depends on a Java SPIR-V builder API (<a class="moz-txt-link-freetext" href="https://github.com/beehive-lab/beehive-spirv-toolkit">https://github.com/beehive-lab/beehive-spirv-toolkit</a>).  The toolkit can be installed locally with:

git clone <a class="moz-txt-link-freetext" href="https://github.com/beehive-lab/beehive-spirv-toolkit">https://github.com/beehive-lab/beehive-spirv-toolkit</a> 
cd beehive-spirv-toolkit
mvn clean install

-------------

Commit messages:
 - fix more whitespace issues
 - fix whitespace issues
 - fix README
 - fix pom header
 - spirv-example initial commit

Changes: <a class="moz-txt-link-freetext" href="https://git.openjdk.org/babylon/pull/38/files">https://git.openjdk.org/babylon/pull/38/files</a>
  Webrev: <a class="moz-txt-link-freetext" href="https://webrevs.openjdk.org/?repo=babylon&pr=38&range=00">https://webrevs.openjdk.org/?repo=babylon&pr=38&range=00</a>
  Stats: 2448 lines in 10 files changed: 2448 ins; 0 del; 0 mod
  Patch: <a class="moz-txt-link-freetext" href="https://git.openjdk.org/babylon/pull/38.diff">https://git.openjdk.org/babylon/pull/38.diff</a>
  Fetch: git fetch <a class="moz-txt-link-freetext" href="https://git.openjdk.org/babylon.git">https://git.openjdk.org/babylon.git</a> pull/38/head:pull/38

PR: <a class="moz-txt-link-freetext" href="https://git.openjdk.org/babylon/pull/38">https://git.openjdk.org/babylon/pull/38</a>
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>