From jfumero at openjdk.org Mon Nov 3 13:10:36 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 3 Nov 2025 13:10:36 GMT Subject: [code-reflection] RFR: Deprecated APIs for accessing GPU global thread information removed. Message-ID: <9PMkgGwDH2PQdioPVJmkS5RyLXFEg5xVG5MM0FOpois=.7b73cca5-3282-4b26-a97f-5a27a8f7067a@github.com> This PR refactors the `KernelContext` to remove the old accessor `kernelContext.x` and `kernelContext.maxX` to a `gix` for thread builtins and `gsx` (as in global size or x) for specifying the total number of threads. ------------- Commit messages: - minor change - [hat] Native CUDA thread dispatch fixed - [hat] OpenCL native dispatch refined - [hat][wip] towards thread-id unification Changes: https://git.openjdk.org/babylon/pull/656/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=656&range=00 Stats: 290 lines in 38 files changed: 26 ins; 65 del; 199 mod Patch: https://git.openjdk.org/babylon/pull/656.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/656/head:pull/656 PR: https://git.openjdk.org/babylon/pull/656 From jfumero at openjdk.org Mon Nov 3 13:31:48 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 3 Nov 2025 13:31:48 GMT Subject: [code-reflection] Integrated: Deprecated APIs for accessing GPU global thread information removed. In-Reply-To: <9PMkgGwDH2PQdioPVJmkS5RyLXFEg5xVG5MM0FOpois=.7b73cca5-3282-4b26-a97f-5a27a8f7067a@github.com> References: <9PMkgGwDH2PQdioPVJmkS5RyLXFEg5xVG5MM0FOpois=.7b73cca5-3282-4b26-a97f-5a27a8f7067a@github.com> Message-ID: On Mon, 3 Nov 2025 12:46:16 GMT, Juan Fumero wrote: > This PR refactors the `KernelContext` to remove the old accessor `kernelContext.x` and `kernelContext.maxX` to a `gix` for thread builtins and `gsx` (as in global size or x) for specifying the total number of threads. This pull request has now been integrated. Changeset: 29f14199 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/29f14199d5c1840a4f14cf36da289f3148db2d2e Stats: 290 lines in 38 files changed: 26 ins; 65 del; 199 mod Deprecated APIs for accessing GPU global thread information removed. ------------- PR: https://git.openjdk.org/babylon/pull/656 From jfumero at openjdk.org Mon Nov 3 13:32:59 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Mon, 3 Nov 2025 13:32:59 GMT Subject: git: openjdk/babylon: code-reflection: Deprecated APIs for accessing GPU global thread information removed. Message-ID: <807fa4d1-3071-47c4-b423-491c6ea5fd6a@openjdk.org> Changeset: 29f14199 Branch: code-reflection Author: Juan Fumero Date: 2025-11-03 13:28:42 +0000 URL: https://git.openjdk.org/babylon/commit/29f14199d5c1840a4f14cf36da289f3148db2d2e Deprecated APIs for accessing GPU global thread information removed. ! hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend_queue.cpp ! hat/backends/ffi/mock/src/main/native/cpp/mock_backend.cpp ! hat/backends/ffi/opencl/src/main/native/cpp/opencl_backend_queue.cpp ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/shared/src/main/native/cpp/shared.cpp ! hat/backends/ffi/shared/src/main/native/include/shared.h ! hat/backends/java/seq/src/main/java/hat/backend/java/JavaSequentialBackend.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/C99JExtractedBackend.java ! hat/core/src/main/java/hat/KernelContext.java ! hat/core/src/main/java/hat/backend/BackendAdaptor.java ! hat/core/src/main/java/hat/backend/DebugBackend.java ! hat/core/src/main/java/hat/backend/java/WorkStealer.java ! hat/core/src/main/java/hat/buffer/KernelBufferContext.java ! hat/examples/blackscholes/src/main/java/blackscholes/Main.java ! hat/examples/experiments/src/main/java/experiments/ForTests.java ! hat/examples/experiments/src/main/java/experiments/Mesh.java ! hat/examples/experiments/src/main/java/experiments/MinBufferTest.java ! hat/examples/experiments/src/main/java/experiments/QuotedArrayArg.java ! hat/examples/experiments/src/main/java/experiments/QuotedConstantArgs.java ! hat/examples/experiments/src/main/java/experiments/spirv/GetBackend.java ! hat/examples/experiments/src/main/java/experiments/spirv/MatrixMultiply.java ! hat/examples/heal/src/main/java/heal/Compute.java ! hat/examples/life/src/main/java/life/Main.java ! hat/examples/mandel/src/main/java/mandel/Main.java ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/examples/nbody/src/main/java/nbody/opencl/OpenCLNBodyGLWindow.java ! hat/examples/squares/src/main/java/squares/Main.java ! hat/examples/violajones/src/main/java/violajones/ViolaJonesCoreCompute.java ! hat/examples/violajones/src/main/java/violajones/attic/ViolaJones.java ! hat/tests/src/main/java/hat/test/TestArrayView.java ! hat/tests/src/main/java/hat/test/TestArrays.java ! hat/tests/src/main/java/hat/test/TestBlackscholes.java ! hat/tests/src/main/java/hat/test/TestConstants.java ! hat/tests/src/main/java/hat/test/TestMandel.java ! hat/tests/src/main/java/hat/test/TestMatMul.java ! hat/tests/src/main/java/hat/test/TestParenthesis.java ! hat/tools/src/main/java/hat/tools/text/TestJavaHATCodeBuilder.java ! hat/tools/src/main/java/hat/tools/textmodel/ui/TestFuncOpViewer.java From asotona at openjdk.org Mon Nov 3 20:08:42 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 3 Nov 2025 20:08:42 GMT Subject: [code-reflection] RFR: New model store implementation Message-ID: This PR adds an alternative code model storage implementation. With the new implementation compiler attaches a code-model attribute to the synthesized helper method. The method then returns the model by `invokedynamic` of a bootstrap method that reads and materializes the attribute at runtime. The new implementation can be selected by setting the compiler option `codeModelStorageOption` to `"CODE_MODEL_ATTRIBUTE"`. Please review. Thanks, Adam ------------- Commit messages: - added javadoc - switched default CodeModelStorageOption back to CODE_BUILDER - added javadoc - caching vs. non-caching callsite construction - synth method body refactored to use indy call - reducing API surface - reducing API surface - annotations refactored to the synthetic methods - class file footprint optimizations - CodeModelSymbols & OpParser work in progress - ... and 5 more: https://git.openjdk.org/babylon/compare/b6b09e85...b2be1ee3 Changes: https://git.openjdk.org/babylon/pull/654/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=00 Stats: 839 lines in 6 files changed: 744 ins; 84 del; 11 mod Patch: https://git.openjdk.org/babylon/pull/654.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/654/head:pull/654 PR: https://git.openjdk.org/babylon/pull/654 From asotona at openjdk.org Mon Nov 3 20:24:11 2025 From: asotona at openjdk.org (Adam Sotona) Date: Mon, 3 Nov 2025 20:24:11 GMT Subject: [code-reflection] RFR: New model store implementation [v2] In-Reply-To: References: Message-ID: > This PR adds an alternative code model storage implementation. > > With the new implementation compiler attaches a code-model attribute to the synthesized helper method. The method then returns the model by `invokedynamic` of a bootstrap method that reads and materializes the attribute at runtime. > > The new implementation can be selected by setting the compiler option `codeModelStorageOption` to `"CODE_MODEL_ATTRIBUTE"`. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision: - Merge branch 'code-reflection' into new-model-store - added javadoc - switched default CodeModelStorageOption back to CODE_BUILDER - added javadoc - caching vs. non-caching callsite construction - synth method body refactored to use indy call - reducing API surface - reducing API surface - annotations refactored to the synthetic methods - class file footprint optimizations - ... and 6 more: https://git.openjdk.org/babylon/compare/dc5f36d8...8ab47cd0 ------------- Changes: - all: https://git.openjdk.org/babylon/pull/654/files - new: https://git.openjdk.org/babylon/pull/654/files/b2be1ee3..8ab47cd0 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=00-01 Stats: 437927 lines in 6687 files changed: 292416 ins; 100588 del; 44923 mod Patch: https://git.openjdk.org/babylon/pull/654.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/654/head:pull/654 PR: https://git.openjdk.org/babylon/pull/654 From gfrost at openjdk.org Tue Nov 4 11:15:50 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 11:15:50 GMT Subject: git: openjdk/babylon: code-reflection: Hat fix vj parsing Message-ID: Changeset: 58ae25b9 Branch: code-reflection Author: Gary Frost Date: 2025-11-04 11:14:00 +0000 URL: https://git.openjdk.org/babylon/commit/58ae25b94e3cbfeadc96a2d5036ac5d4a19ff970 Hat fix vj parsing ! hat/examples/view/src/main/java/view/EliteMeshReader.java ! hat/examples/view/src/main/java/view/F32.java + hat/examples/view/src/main/java/view/Graphics2DRenderer.java ! hat/examples/view/src/main/java/view/Main.java - hat/examples/view/src/main/java/view/ModelHighWaterMark.java - hat/examples/view/src/main/java/view/Rasterizer.java + hat/examples/view/src/main/java/view/RasterizingRenderer.java ! hat/examples/view/src/main/java/view/Renderer.java - hat/examples/view/src/main/java/view/View.java ! hat/examples/view/src/main/java/view/ViewFrame.java - hat/examples/view/src/main/java/view/ViewFrameNew.java - hat/examples/view/src/main/java/view/ViewFrameOld.java - hat/examples/view/src/main/java/view/ZPos.java - hat/examples/view/src/main/java/view/f32/F32Line3D.java ! hat/examples/view/src/main/java/view/f32/F32Matrix4x4.java ! hat/examples/view/src/main/java/view/f32/F32Mesh3D.java ! hat/examples/view/src/main/java/view/f32/F32Triangle2D.java ! hat/examples/view/src/main/java/view/f32/F32Triangle3D.java ! hat/examples/view/src/main/java/view/f32/F32Vec2.java ! hat/examples/view/src/main/java/view/f32/F32Vec3.java ! hat/examples/view/src/main/java/view/f32/FloatPool.java - hat/examples/view/src/main/java/view/f32/IndexPool.java + hat/examples/view/src/main/java/view/f32/ModelHighWaterMark.java ! hat/examples/view/src/main/java/view/f32/Pool.java + hat/examples/view/src/main/java/view/f32/ZPos.java ! hat/examples/violajones/src/main/java/violajones/Main.java ! hat/examples/violajones/src/main/java/violajones/XMLHaarCascadeModel.java + hat/examples/violajones/src/main/resources/cascades/haarcascade_smile.xml From gfrost at openjdk.org Tue Nov 4 11:19:52 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 11:19:52 GMT Subject: [code-reflection] Integrated: Hat fix vj parsing Message-ID: Fixes to example-violajones. Bug was reported that XML parser failed if cascade did not have size element, but instead had explicit width and height. Also added the ability to select the image and cascade via properties. java @hat/run ffi-opencl -Dimage=highett -Dcascade=haarcascade_frontalface_default violajones ------------- Commit messages: - Fix cascade parsing, and allow image/cascade to be selected via properties - Converging on new float4x4 - Converging on new float4x4 - Zpos using floats - Triangle2d using floats - collapse new/old elite mesh reader - collapse new/old elite mesh reader - collapse new/old elite mesh reader - collapse new/old elite mesh reader - collapse new/old elite mesh reader - ... and 5 more: https://git.openjdk.org/babylon/compare/3db08a3e...39eb2f05 Changes: https://git.openjdk.org/babylon/pull/658/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=658&range=00 Stats: 10710 lines in 28 files changed: 9434 ins; 897 del; 379 mod Patch: https://git.openjdk.org/babylon/pull/658.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/658/head:pull/658 PR: https://git.openjdk.org/babylon/pull/658 From gfrost at openjdk.org Tue Nov 4 11:19:54 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 11:19:54 GMT Subject: [code-reflection] Integrated: Hat fix vj parsing In-Reply-To: References: Message-ID: On Tue, 4 Nov 2025 11:09:52 GMT, Gary Frost wrote: > Fixes to example-violajones. Bug was reported that XML parser failed if cascade did not have size element, but instead had explicit width and height. > > Also added the ability to select the image and cascade via properties. > > > java @hat/run ffi-opencl -Dimage=highett -Dcascade=haarcascade_frontalface_default violajones This pull request has now been integrated. Changeset: 58ae25b9 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/58ae25b94e3cbfeadc96a2d5036ac5d4a19ff970 Stats: 10710 lines in 28 files changed: 9434 ins; 897 del; 379 mod Hat fix vj parsing ------------- PR: https://git.openjdk.org/babylon/pull/658 From gfrost at openjdk.org Tue Nov 4 13:39:20 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 13:39:20 GMT Subject: git: openjdk/babylon: code-reflection: allow -Dconstraint.scale.[start|stop] and -Dconstraint.inc properties Message-ID: <9bff244e-dfa3-4be0-b01c-f3aac736a124@openjdk.org> Changeset: fc0db21d Branch: code-reflection Author: Gary Frost Date: 2025-11-04 13:36:15 +0000 URL: https://git.openjdk.org/babylon/commit/fc0db21d3e33aa2f4433c6ea78b7c5f0f5976ed1 allow -Dconstraint.scale.[start|stop] and -Dconstraint.inc properties ! hat/examples/violajones/src/main/java/violajones/ifaces/ScaleTable.java From gfrost at openjdk.org Tue Nov 4 13:41:48 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 13:41:48 GMT Subject: [code-reflection] Integrated: allow -Dconstraint.scale.[start|stop] and -Dconstraint.inc properties Message-ID: Allow user to select cascade scale constraints via properties java @hat/run ffi-opencl -Dconstraint.scale.start=1 -Dconstraint.scale.multiplier=2 -Dconstraint.inc=.06 violajones ------------- Commit messages: - allow -Dconstraint.scale.[start|stop] and -Dconstraint.inc properties Changes: https://git.openjdk.org/babylon/pull/659/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=659&range=00 Stats: 8 lines in 1 file changed: 2 ins; 0 del; 6 mod Patch: https://git.openjdk.org/babylon/pull/659.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/659/head:pull/659 PR: https://git.openjdk.org/babylon/pull/659 From gfrost at openjdk.org Tue Nov 4 13:41:50 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 13:41:50 GMT Subject: [code-reflection] Integrated: allow -Dconstraint.scale.[start|stop] and -Dconstraint.inc properties In-Reply-To: References: Message-ID: On Tue, 4 Nov 2025 13:32:15 GMT, Gary Frost wrote: > Allow user to select cascade scale constraints via properties > > > java @hat/run ffi-opencl -Dconstraint.scale.start=1 -Dconstraint.scale.multiplier=2 -Dconstraint.inc=.06 violajones This pull request has now been integrated. Changeset: fc0db21d Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/fc0db21d3e33aa2f4433c6ea78b7c5f0f5976ed1 Stats: 8 lines in 1 file changed: 2 ins; 0 del; 6 mod allow -Dconstraint.scale.[start|stop] and -Dconstraint.inc properties ------------- PR: https://git.openjdk.org/babylon/pull/659 From asotona at openjdk.org Tue Nov 4 14:37:43 2025 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 4 Nov 2025 14:37:43 GMT Subject: [code-reflection] RFR: New model store implementation [v3] In-Reply-To: References: Message-ID: > This PR adds an alternative code model storage implementation. > > With the new implementation compiler attaches a code-model attribute to the synthesized helper method. The method then returns the model by `invokedynamic` of a bootstrap method that reads and materializes the attribute at runtime. > > The new implementation can be selected by setting the compiler option `codeModelStorageOption` to `"CODE_MODEL_ATTRIBUTE"`. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: storing TypeElement as tree ------------- Changes: - all: https://git.openjdk.org/babylon/pull/654/files - new: https://git.openjdk.org/babylon/pull/654/files/8ab47cd0..62ec88d9 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=01-02 Stats: 121 lines in 3 files changed: 87 ins; 5 del; 29 mod Patch: https://git.openjdk.org/babylon/pull/654.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/654/head:pull/654 PR: https://git.openjdk.org/babylon/pull/654 From jfumero at openjdk.org Tue Nov 4 14:40:22 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 4 Nov 2025 14:40:22 GMT Subject: [code-reflection] RFR: [hat][API] ComputeRange moved to NDRange Message-ID: This PR refactors the `NDRange` and the `ComputeRange`. NDRange removes the need for the accelerator object, and the internal kernelContext. Instead the `ComputeRange` has been moved to an `NDRange`. Thus, from this change, this is how we will dispatch kernels: NDRange ndRange = NDRange.of(new Global2D(globalSize, globalSize), new Local2D(BLOCK_SIZE, BLOCK_SIZE)); cc.dispatchKernel(ndRange, kc -> matrixMultiplyKernel2DLI(kc, matrixA, matrixB, matrixC, globalSize) ); We add also a set of factory methods to facilitate composing NDRanges when 1D is required : For instance: cc.dispatchKernel( NDRange.of(call.length()), kc -> blackScholesKernel(kc, call, put, S, X, T, r, v) ); ------------- Commit messages: - [hat] Using factory methods of to create NDRanges - [hat] Restore the NDRange - [hat][wip] NDRange completely removed - [hat][wip] NDRange removed - [hat] NDRange setup simplified - [hat] NDRange.of to specify 1D programs Changes: https://git.openjdk.org/babylon/pull/657/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=657&range=00 Stats: 943 lines in 64 files changed: 256 ins; 387 del; 300 mod Patch: https://git.openjdk.org/babylon/pull/657.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/657/head:pull/657 PR: https://git.openjdk.org/babylon/pull/657 From jfumero at openjdk.org Tue Nov 4 14:43:04 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 4 Nov 2025 14:43:04 GMT Subject: [code-reflection] RFR: [hat][API] ComputeRange moved to NDRange In-Reply-To: References: Message-ID: On Tue, 4 Nov 2025 10:28:32 GMT, Juan Fumero wrote: > This PR refactors the `NDRange` and the `ComputeRange`. > > NDRange removes the need for the accelerator object, and the internal kernelContext. > > Instead the `ComputeRange` has been moved to an `NDRange`. Thus, from this change, this is how we will dispatch kernels: > > > NDRange ndRange = NDRange.of(new Global2D(globalSize, globalSize), new Local2D(BLOCK_SIZE, BLOCK_SIZE)); > cc.dispatchKernel(ndRange, > kc -> matrixMultiplyKernel2DLI(kc, matrixA, matrixB, matrixC, globalSize) > ); > > > We add also a set of factory methods to facilitate composing NDRanges when 1D is required : > > For instance: > > > cc.dispatchKernel( NDRange.of(call.length()), > kc -> blackScholesKernel(kc, call, put, S, X, T, r, v) > ); To provide the (e.g., `Global1D.of(x)` we need code-reflection to support the `RECORD` type. So we can merge this one, and once the code-reflection integrates this change, we can refine this part in the HAT API. ------------- PR Comment: https://git.openjdk.org/babylon/pull/657#issuecomment-3486331466 From jfumero at openjdk.org Tue Nov 4 14:44:03 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 4 Nov 2025 14:44:03 GMT Subject: git: openjdk/babylon: code-reflection: [hat][API] ComputeRange moved to NDRange Message-ID: <47287b0c-12c9-4b2d-b08d-49ffa485a0c2@openjdk.org> Changeset: 5332a2e3 Branch: code-reflection Author: Juan Fumero Date: 2025-11-04 14:43:23 +0000 URL: https://git.openjdk.org/babylon/commit/5332a2e37c02e790c3023847e0191dba3616b22c [hat][API] ComputeRange moved to NDRange ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/hip/src/main/java/hat/backend/HIPBackend.java ! hat/backends/ffi/mock/src/main/java/hat/backend/ffi/MockBackend.java ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/spirv/src/main/java/hat/backend/SpirvBackend.java ! hat/backends/ffi/spirv/src/main/java/intel/code/spirv/LevelZero.java ! hat/backends/java/mt/src/main/java/hat/backend/java/JavaMultiThreadedBackend.java ! hat/backends/java/seq/src/main/java/hat/backend/java/JavaSequentialBackend.java ! hat/backends/jextracted/opencl/src/main/java/hat/backend/jextracted/OpenCLBackend.java ! hat/backends/jextracted/shared/src/main/java/hat/backend/jextracted/C99JExtractedBackend.java ! hat/core/src/main/java/hat/Accelerator.java ! hat/core/src/main/java/hat/ComputeContext.java - hat/core/src/main/java/hat/ComputeRange.java = hat/core/src/main/java/hat/Global1D.java = hat/core/src/main/java/hat/Global2D.java + hat/core/src/main/java/hat/Global3D.java - hat/core/src/main/java/hat/GlobalMesh3D.java ! hat/core/src/main/java/hat/KernelContext.java = hat/core/src/main/java/hat/Local1D.java = hat/core/src/main/java/hat/Local2D.java + hat/core/src/main/java/hat/Local3D.java - hat/core/src/main/java/hat/LocalMesh3D.java ! hat/core/src/main/java/hat/NDRange.java = hat/core/src/main/java/hat/Range.java ! hat/core/src/main/java/hat/backend/Backend.java ! hat/core/src/main/java/hat/backend/BackendAdaptor.java ! hat/core/src/main/java/hat/backend/DebugBackend.java ! hat/core/src/main/java/hat/backend/java/WorkStealer.java ! hat/examples/blackscholes/src/main/java/blackscholes/Main.java ! hat/examples/experiments/src/main/java/experiments/ForTests.java ! hat/examples/experiments/src/main/java/experiments/LocalArray.java ! hat/examples/experiments/src/main/java/experiments/LocalIds.java ! hat/examples/experiments/src/main/java/experiments/Mesh.java ! hat/examples/experiments/src/main/java/experiments/MinBufferTest.java ! hat/examples/experiments/src/main/java/experiments/PrefixSum.java ! hat/examples/experiments/src/main/java/experiments/QuotedArrayArg.java ! hat/examples/experiments/src/main/java/experiments/QuotedConstantArgs.java ! hat/examples/experiments/src/main/java/experiments/Reduction.java ! hat/examples/experiments/src/main/java/experiments/spirv/GetBackend.java ! hat/examples/experiments/src/main/java/experiments/spirv/MatrixMultiply.java ! hat/examples/heal/src/main/java/heal/Compute.java ! hat/examples/life/src/main/java/life/Main.java ! hat/examples/mandel/src/main/java/mandel/Main.java ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/examples/nbody/src/main/java/nbody/opencl/OpenCLNBodyGLWindow.java ! hat/examples/squares/src/main/java/squares/Main.java ! hat/examples/violajones/src/main/java/violajones/ViolaJonesCoreCompute.java ! hat/examples/violajones/src/main/java/violajones/attic/ViolaJones.java ! hat/tests/src/main/java/hat/test/TestArrayView.java ! hat/tests/src/main/java/hat/test/TestArrays.java ! hat/tests/src/main/java/hat/test/TestBlackscholes.java ! hat/tests/src/main/java/hat/test/TestConstants.java ! hat/tests/src/main/java/hat/test/TestF16Type.java ! hat/tests/src/main/java/hat/test/TestLocal.java ! hat/tests/src/main/java/hat/test/TestMandel.java ! hat/tests/src/main/java/hat/test/TestMatMul.java ! hat/tests/src/main/java/hat/test/TestNbody.java ! hat/tests/src/main/java/hat/test/TestParenthesis.java ! hat/tests/src/main/java/hat/test/TestPrivate.java ! hat/tests/src/main/java/hat/test/TestReductions.java ! hat/tests/src/main/java/hat/test/TestVectorTypes.java ! hat/tools/src/main/java/hat/tools/text/TestJavaHATCodeBuilder.java ! hat/tools/src/main/java/hat/tools/textmodel/ui/TestFuncOpViewer.java From jfumero at openjdk.org Tue Nov 4 14:46:28 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Tue, 4 Nov 2025 14:46:28 GMT Subject: [code-reflection] Integrated: [hat][API] ComputeRange moved to NDRange In-Reply-To: References: Message-ID: On Tue, 4 Nov 2025 10:28:32 GMT, Juan Fumero wrote: > This PR refactors the `NDRange` and the `ComputeRange`. > > NDRange removes the need for the accelerator object, and the internal kernelContext. > > Instead the `ComputeRange` has been moved to an `NDRange`. Thus, from this change, this is how we will dispatch kernels: > > > NDRange ndRange = NDRange.of(new Global2D(globalSize, globalSize), new Local2D(BLOCK_SIZE, BLOCK_SIZE)); > cc.dispatchKernel(ndRange, > kc -> matrixMultiplyKernel2DLI(kc, matrixA, matrixB, matrixC, globalSize) > ); > > > We add also a set of factory methods to facilitate composing NDRanges when 1D is required : > > For instance: > > > cc.dispatchKernel( NDRange.of(call.length()), > kc -> blackScholesKernel(kc, call, put, S, X, T, r, v) > ); This pull request has now been integrated. Changeset: 5332a2e3 Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/5332a2e37c02e790c3023847e0191dba3616b22c Stats: 943 lines in 64 files changed: 256 ins; 387 del; 300 mod [hat][API] ComputeRange moved to NDRange ------------- PR: https://git.openjdk.org/babylon/pull/657 From asotona at openjdk.org Tue Nov 4 15:09:24 2025 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 4 Nov 2025 15:09:24 GMT Subject: [code-reflection] RFR: New model store implementation [v4] In-Reply-To: References: Message-ID: <5QydHKgDkAWZD-IKpR0oNKo4vYU08gIP7Uk5_MKs6og=.ea404120-c141-47a4-8eca-e7e8b873a366@github.com> > This PR adds an alternative code model storage implementation. > > With the new implementation compiler attaches a code-model attribute to the synthesized helper method. The method then returns the model by `invokedynamic` of a bootstrap method that reads and materializes the attribute at runtime. > > The new implementation can be selected by setting the compiler option `codeModelStorageOption` to `"CODE_MODEL_ATTRIBUTE"`. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: types indexing fix ------------- Changes: - all: https://git.openjdk.org/babylon/pull/654/files - new: https://git.openjdk.org/babylon/pull/654/files/62ec88d9..cc3bac7e Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=03 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=654&range=02-03 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.org/babylon/pull/654.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/654/head:pull/654 PR: https://git.openjdk.org/babylon/pull/654 From gfrost at openjdk.org Tue Nov 4 16:22:22 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 16:22:22 GMT Subject: [code-reflection] Integrated: Retired some config bits and added some new ones. Message-ID: We were getting close to our 32 bit image for ffi config bits. So I rationalized some, retired some and clarified the use of SHOW_DEVICE_INFO (bit formerly known as INFO) INFO and WARN now reserved for log levels in FFI backends I synced config.h and all tests pass. I hope the cuda code changes work out. ------------- Commit messages: - cleaned up some config bits Changes: https://git.openjdk.org/babylon/pull/660/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=660&range=00 Stats: 104 lines in 24 files changed: 27 ins; 10 del; 67 mod Patch: https://git.openjdk.org/babylon/pull/660.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/660/head:pull/660 PR: https://git.openjdk.org/babylon/pull/660 From gfrost at openjdk.org Tue Nov 4 16:22:23 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 16:22:23 GMT Subject: [code-reflection] Integrated: Retired some config bits and added some new ones. In-Reply-To: References: Message-ID: On Tue, 4 Nov 2025 16:17:05 GMT, Gary Frost wrote: > We were getting close to our 32 bit image for ffi config bits. > > So I rationalized some, retired some and clarified the use of SHOW_DEVICE_INFO (bit formerly known as INFO) > > INFO and WARN now reserved for log levels in FFI backends > > I synced config.h and all tests pass. I hope the cuda code changes work out. This pull request has now been integrated. Changeset: 5b5db174 Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/5b5db174360434dab09ef7267359b5bac71962f4 Stats: 104 lines in 24 files changed: 27 ins; 10 del; 67 mod Retired some config bits and added some new ones. ------------- PR: https://git.openjdk.org/babylon/pull/660 From gfrost at openjdk.org Tue Nov 4 16:22:58 2025 From: gfrost at openjdk.org (Gary Frost) Date: Tue, 4 Nov 2025 16:22:58 GMT Subject: git: openjdk/babylon: code-reflection: Retired some config bits and added some new ones. Message-ID: <3aae9734-9a4c-4e70-910a-e41abd2c622e@openjdk.org> Changeset: 5b5db174 Branch: code-reflection Author: Gary Frost Date: 2025-11-04 16:19:17 +0000 URL: https://git.openjdk.org/babylon/commit/5b5db174360434dab09ef7267359b5bac71962f4 Retired some config bits and added some new ones. ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaBackend.java ! hat/backends/ffi/cuda/src/main/java/hat/backend/ffi/CudaDeviceInfo.java ! hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend.cpp ! hat/backends/ffi/cuda/src/main/native/cpp/info.cpp ! hat/backends/ffi/cuda/src/main/native/include/cuda_backend.h ! hat/backends/ffi/hip/src/main/native/cpp/hip_backend.cpp ! hat/backends/ffi/hip/src/main/native/cpp/info.cpp ! hat/backends/ffi/hip/src/main/native/include/hip_backend.h ! hat/backends/ffi/mock/src/main/java/hat/backend/ffi/MockDeviceInfo.java ! hat/backends/ffi/mock/src/main/native/cpp/mock_backend.cpp ! hat/backends/ffi/opencl/src/main/java/hat/backend/ffi/OpenCLDeviceInfo.java ! hat/backends/ffi/opencl/src/main/native/cpp/info.cpp ! hat/backends/ffi/opencl/src/main/native/cpp/opencl_backend_info.cpp ! hat/backends/ffi/opencl/src/main/native/include/opencl_backend.h ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackend.java ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/FFIBackendDriver.java ! hat/backends/ffi/shared/src/main/native/cpp/shared.cpp ! hat/backends/ffi/shared/src/main/native/include/config.h ! hat/backends/ffi/shared/src/main/native/include/shared.h ! hat/backends/ffi/spirv/src/main/native/cpp/spirv_backend.cpp ! hat/core/src/main/java/hat/Config.java ! hat/core/src/main/java/hat/FFIConfigCreator.java ! hat/examples/violajones/src/main/java/violajones/Main.java From psandoz at openjdk.org Tue Nov 4 19:12:34 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 4 Nov 2025 19:12:34 GMT Subject: [code-reflection] RFR: Fix modeling of expressions with record symbols Message-ID: Fix modeling of expressions with record symbols. ------------- Commit messages: - Fix modeling of expressions with record symbols. Changes: https://git.openjdk.org/babylon/pull/661/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=661&range=00 Stats: 68 lines in 2 files changed: 66 ins; 0 del; 2 mod Patch: https://git.openjdk.org/babylon/pull/661.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/661/head:pull/661 PR: https://git.openjdk.org/babylon/pull/661 From psandoz at openjdk.org Tue Nov 4 19:38:39 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 4 Nov 2025 19:38:39 GMT Subject: git: openjdk/babylon: code-reflection: Fix modeling of expressions with record symbols Message-ID: <15550ac1-6ab4-4bec-9fb1-27cf5b72cb46@openjdk.org> Changeset: f4c7e327 Branch: code-reflection Author: Paul Sandoz Date: 2025-11-04 19:36:48 +0000 URL: https://git.openjdk.org/babylon/commit/f4c7e327c32ed938256c644891552ce4964feb94 Fix modeling of expressions with record symbols ! src/jdk.incubator.code/share/classes/jdk/incubator/code/internal/ReflectMethods.java + test/langtools/tools/javac/reflect/RecordAccessTest.java From psandoz at openjdk.org Tue Nov 4 19:39:56 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Tue, 4 Nov 2025 19:39:56 GMT Subject: [code-reflection] Integrated: Fix modeling of expressions with record symbols In-Reply-To: References: Message-ID: On Tue, 4 Nov 2025 19:02:11 GMT, Paul Sandoz wrote: > Fix modeling of expressions with record symbols. This pull request has now been integrated. Changeset: f4c7e327 Author: Paul Sandoz URL: https://git.openjdk.org/babylon/commit/f4c7e327c32ed938256c644891552ce4964feb94 Stats: 68 lines in 2 files changed: 66 ins; 0 del; 2 mod Fix modeling of expressions with record symbols ------------- PR: https://git.openjdk.org/babylon/pull/661 From jfumero at openjdk.org Wed Nov 5 08:53:27 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 5 Nov 2025 08:53:27 GMT Subject: [code-reflection] RFR: [hat] NDRange API using marking interfaces Message-ID: This PR refines the NDRange interface with marking interfaces for 1D, 2D and 3D ranges. The end-user API remains the same, except that the records and classes have been moved to the `NDRange` interface. ------------- Commit messages: - [hat] NDRange using marking interfaces Changes: https://git.openjdk.org/babylon/pull/662/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=662&range=00 Stats: 676 lines in 27 files changed: 90 ins; 448 del; 138 mod Patch: https://git.openjdk.org/babylon/pull/662.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/662/head:pull/662 PR: https://git.openjdk.org/babylon/pull/662 From jfumero at openjdk.org Wed Nov 5 12:18:31 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 5 Nov 2025 12:18:31 GMT Subject: [code-reflection] RFR: [hat] Extensions of F16 (API and codegen) Message-ID: - New dialect nodes to do `OpConvert` from `float` to `half` and `half` to `float`: note that conversions differ between CUDA and OpenCL - Add Fluent API for F16 operations (similar to `Float4`) - Add mixed float-precision operations (`F16` -> `float`) - Refactor of `F16` interface to a new file - Fix parenthesis in the codegen - Initialization of `F16` values using the `float2F16` builtin and `Float16Tofloat` also allowed on the GPU ------------- Commit messages: - [hat] minor change - [hat] F16 with mixed float types supported for CUDA backend - [hat] F16 ops with mixed f32 operations - [hat][f16] Concatenation of F16 operations supported - Merge branch 'code-reflection' into hat/fp16/extension - [hat][f16] WIP for local memory - minor recformating - patch for matmul in fp16 - [hat] refine F16Phase - [hat] matmul express with F16: wip - ... and 6 more: https://git.openjdk.org/babylon/compare/f4c7e327...a6673799 Changes: https://git.openjdk.org/babylon/pull/663/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=663&range=00 Stats: 1158 lines in 21 files changed: 1006 ins; 73 del; 79 mod Patch: https://git.openjdk.org/babylon/pull/663.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/663/head:pull/663 PR: https://git.openjdk.org/babylon/pull/663 From jfumero at openjdk.org Wed Nov 5 13:09:29 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 5 Nov 2025 13:09:29 GMT Subject: [code-reflection] RFR: [hat] NDRange API using marking interfaces [v2] In-Reply-To: References: Message-ID: > This PR refines the NDRange interface with marking interfaces for 1D, 2D and 3D ranges. > > The end-user API remains the same, except that the records and classes have been moved to the `NDRange` interface. Juan Fumero has updated the pull request incrementally with one additional commit since the last revision: [hat] Avoid NULL in LocalIds for non-specified thread-blocks ------------- Changes: - all: https://git.openjdk.org/babylon/pull/662/files - new: https://git.openjdk.org/babylon/pull/662/files/b43913e4..36cadd37 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=662&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=662&range=00-01 Stats: 17 lines in 3 files changed: 10 ins; 1 del; 6 mod Patch: https://git.openjdk.org/babylon/pull/662.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/662/head:pull/662 PR: https://git.openjdk.org/babylon/pull/662 From jfumero at openjdk.org Wed Nov 5 13:24:47 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 5 Nov 2025 13:24:47 GMT Subject: [code-reflection] Integrated: [hat] NDRange API using marking interfaces In-Reply-To: References: Message-ID: On Wed, 5 Nov 2025 08:46:49 GMT, Juan Fumero wrote: > This PR refines the NDRange interface with marking interfaces for 1D, 2D and 3D ranges. > > The end-user API remains the same, except that the records and classes have been moved to the `NDRange` interface. This pull request has now been integrated. Changeset: 6be4588e Author: Juan Fumero URL: https://git.openjdk.org/babylon/commit/6be4588edb846b777a9dff41fccfc243f0d00a03 Stats: 682 lines in 27 files changed: 96 ins; 445 del; 141 mod [hat] NDRange API using marking interfaces ------------- PR: https://git.openjdk.org/babylon/pull/662 From jfumero at openjdk.org Wed Nov 5 13:26:26 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 5 Nov 2025 13:26:26 GMT Subject: git: openjdk/babylon: code-reflection: [hat] NDRange API using marking interfaces Message-ID: <8e23801b-18c6-4652-9a8c-833ccc09a4df@openjdk.org> Changeset: 6be4588e Branch: code-reflection Author: Juan Fumero Date: 2025-11-05 13:22:20 +0000 URL: https://git.openjdk.org/babylon/commit/6be4588edb846b777a9dff41fccfc243f0d00a03 [hat] NDRange API using marking interfaces ! hat/backends/ffi/shared/src/main/java/hat/backend/ffi/C99FFIBackend.java - hat/core/src/main/java/hat/Global1D.java - hat/core/src/main/java/hat/Global2D.java - hat/core/src/main/java/hat/Global3D.java ! hat/core/src/main/java/hat/KernelContext.java - hat/core/src/main/java/hat/Local1D.java - hat/core/src/main/java/hat/Local2D.java - hat/core/src/main/java/hat/Local3D.java ! hat/core/src/main/java/hat/NDRange.java - hat/core/src/main/java/hat/Range.java ! hat/examples/experiments/src/main/java/experiments/LocalArray.java ! hat/examples/experiments/src/main/java/experiments/LocalIds.java ! hat/examples/experiments/src/main/java/experiments/Reduction.java ! hat/examples/matmul/src/main/java/matmul/Main.java ! hat/examples/squares/src/main/java/squares/Main.java ! hat/examples/violajones/src/main/java/violajones/attic/ViolaJones.java ! hat/tests/src/main/java/hat/test/TestArrays.java ! hat/tests/src/main/java/hat/test/TestConstants.java ! hat/tests/src/main/java/hat/test/TestF16Type.java ! hat/tests/src/main/java/hat/test/TestLocal.java ! hat/tests/src/main/java/hat/test/TestMandel.java ! hat/tests/src/main/java/hat/test/TestMatMul.java ! hat/tests/src/main/java/hat/test/TestNbody.java ! hat/tests/src/main/java/hat/test/TestParenthesis.java ! hat/tests/src/main/java/hat/test/TestPrivate.java ! hat/tests/src/main/java/hat/test/TestReductions.java ! hat/tests/src/main/java/hat/test/TestVectorTypes.java From jfumero at openjdk.org Wed Nov 5 14:29:30 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Wed, 5 Nov 2025 14:29:30 GMT Subject: [code-reflection] RFR: [hat] Extensions of F16 (API and codegen) [v2] In-Reply-To: References: Message-ID: > - New dialect nodes to do `OpConvert` from `float` to `half` and `half` to `float`: note that conversions differ between CUDA and OpenCL > - Add Fluent API for F16 operations (similar to `Float4`) > - Add mixed float-precision operations (`F16` -> `float`) > - Refactor of `F16` interface to a new file > - Fix parenthesis in the codegen > - Initialization of `F16` values using the `float2F16` builtin and `Float16Tofloat` also allowed on the GPU Juan Fumero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits: - Merge branch 'code-reflection' into hat/fp16/extension - [hat] minor change - [hat] F16 with mixed float types supported for CUDA backend - [hat] F16 ops with mixed f32 operations - [hat][f16] Concatenation of F16 operations supported - Merge branch 'code-reflection' into hat/fp16/extension - [hat][f16] WIP for local memory - minor recformating - patch for matmul in fp16 - [hat] refine F16Phase - ... and 7 more: https://git.openjdk.org/babylon/compare/6be4588e...84e6de6e ------------- Changes: https://git.openjdk.org/babylon/pull/663/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=663&range=01 Stats: 1155 lines in 21 files changed: 1004 ins; 72 del; 79 mod Patch: https://git.openjdk.org/babylon/pull/663.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/663/head:pull/663 PR: https://git.openjdk.org/babylon/pull/663 From gfrost at openjdk.org Wed Nov 5 17:49:21 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 5 Nov 2025 17:49:21 GMT Subject: git: openjdk/babylon: code-reflection: Hat view example even more tinkering Message-ID: <092dc11a-5510-4daa-9d95-cef04a00e8e7@openjdk.org> Changeset: f54db4fd Branch: code-reflection Author: Gary Frost Date: 2025-11-05 17:48:09 +0000 URL: https://git.openjdk.org/babylon/commit/f54db4fd57cfb2e7147c71d3b3d317938e65aa8f Hat view example even more tinkering ! hat/examples/view/src/main/java/view/EliteMeshReader.java - hat/examples/view/src/main/java/view/F32.java ! hat/examples/view/src/main/java/view/Graphics2DRenderer.java ! hat/examples/view/src/main/java/view/Main.java ! hat/examples/view/src/main/java/view/RasterizingRenderer.java ! hat/examples/view/src/main/java/view/Renderer.java ! hat/examples/view/src/main/java/view/ViewFrame.java ! hat/examples/view/src/main/java/view/f32/F32Mesh3D.java ! hat/examples/view/src/main/java/view/f32/F32Triangle3D.java ! hat/examples/view/src/main/java/view/f32/F32Vec3.java ! hat/examples/view/src/main/java/view/f32/ZPos.java From gfrost at openjdk.org Wed Nov 5 17:51:08 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 5 Nov 2025 17:51:08 GMT Subject: [code-reflection] Integrated: Hat view example even more tinkering Message-ID: You can safely ignore this. I hit a merge issue and had to slowly back out and merge some code. Sadly lots of commits which I hope get squashed ------------- Commit messages: - towards common pools - towards common pools - towards common pools - towards common pools - towards common pools - towards common pools - towards common pools - towards common pools - towards common pools - towards common pools - ... and 5 more: https://git.openjdk.org/babylon/compare/5b5db174...2f31a90c Changes: https://git.openjdk.org/babylon/pull/665/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=665&range=00 Stats: 1907 lines in 11 files changed: 121 ins; 1496 del; 290 mod Patch: https://git.openjdk.org/babylon/pull/665.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/665/head:pull/665 PR: https://git.openjdk.org/babylon/pull/665 From gfrost at openjdk.org Wed Nov 5 17:51:09 2025 From: gfrost at openjdk.org (Gary Frost) Date: Wed, 5 Nov 2025 17:51:09 GMT Subject: [code-reflection] Integrated: Hat view example even more tinkering In-Reply-To: References: Message-ID: On Wed, 5 Nov 2025 17:46:07 GMT, Gary Frost wrote: > You can safely ignore this. > > I hit a merge issue and had to slowly back out and merge some code. Sadly lots of commits which I hope get squashed This pull request has now been integrated. Changeset: f54db4fd Author: Gary Frost URL: https://git.openjdk.org/babylon/commit/f54db4fd57cfb2e7147c71d3b3d317938e65aa8f Stats: 1907 lines in 11 files changed: 121 ins; 1496 del; 290 mod Hat view example even more tinkering ------------- PR: https://git.openjdk.org/babylon/pull/665 From duke at openjdk.org Wed Nov 5 18:14:57 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Wed, 5 Nov 2025 18:14:57 GMT Subject: [code-reflection] RFR: Improve runtime invocation Message-ID: This PR, co-authored with @LizeRaes, enhances the way FER demo iterates over the input received: * Take arena invocation out of the loop, together with provider configuration. * Separate session preparation from the actual inference and remove progressbar. ------------- Commit messages: - Fix empty spaces - Update full name - Improve runtime invocation (#2) Changes: https://git.openjdk.org/babylon/pull/664/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=664&range=00 Stats: 82 lines in 2 files changed: 29 ins; 18 del; 35 mod Patch: https://git.openjdk.org/babylon/pull/664.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/664/head:pull/664 PR: https://git.openjdk.org/babylon/pull/664 From duke at openjdk.org Thu Nov 6 06:58:10 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 6 Nov 2025 06:58:10 GMT Subject: [code-reflection] RFR: Improve runtime invocation [v2] In-Reply-To: References: Message-ID: > This PR, co-authored with @LizeRaes, enhances the way FER demo iterates over the input received: > * Take arena invocation out of the loop, together with provider configuration. > * Separate session preparation from the actual inference and remove progressbar. Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: Update full name ------------- Changes: - all: https://git.openjdk.org/babylon/pull/664/files - new: https://git.openjdk.org/babylon/pull/664/files/701393b5..23f0bb9c Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=664&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=664&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/664.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/664/head:pull/664 PR: https://git.openjdk.org/babylon/pull/664 From jfumero at openjdk.org Thu Nov 6 11:29:23 2025 From: jfumero at openjdk.org (Juan Fumero) Date: Thu, 6 Nov 2025 11:29:23 GMT Subject: [code-reflection] RFR: [hat] Float2 supported Message-ID: This PR adds `float2` in the API to generate 2 float instructions for OpenCL and CUDA backends. How to test? HAT=SHOW_CODE java -cp hat/job.jar hat.java test ffi-opencl hat.test.TestFloat2 HAT=SHOW_CODE java -cp hat/job.jar hat.java test ffi-cuda hat.test.TestFloat2 ------------- Commit messages: - [hat] Add tests for float2 similar to float4 - [hat] Adding float2 work Changes: https://git.openjdk.org/babylon/pull/666/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=666&range=00 Stats: 840 lines in 9 files changed: 829 ins; 6 del; 5 mod Patch: https://git.openjdk.org/babylon/pull/666.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/666/head:pull/666 PR: https://git.openjdk.org/babylon/pull/666 From mcimadamore at openjdk.org Thu Nov 6 15:08:03 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 15:08:03 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas Message-ID: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: Quoted q = () -> {} Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: Runnable r = (Runnable & Quotable)() -> {} Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. ------------- Commit messages: - Fix JDK tests to use Quotable - Initial push Changes: https://git.openjdk.org/babylon/pull/667/files Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=667&range=00 Stats: 2055 lines in 36 files changed: 59 ins; 1892 del; 104 mod Patch: https://git.openjdk.org/babylon/pull/667.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/667/head:pull/667 PR: https://git.openjdk.org/babylon/pull/667 From mcimadamore at openjdk.org Thu Nov 6 15:29:20 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 15:29:20 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: > The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: > > > Quoted q = () -> {} > > > Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: > > > Runnable r = (Runnable & Quotable)() -> {} > > > Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. > > This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Re-add accidentally deleted test ------------- Changes: - all: https://git.openjdk.org/babylon/pull/667/files - new: https://git.openjdk.org/babylon/pull/667/files/e81dd7f2..bd6ddc10 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=667&range=01 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=667&range=00-01 Stats: 204 lines in 1 file changed: 204 ins; 0 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/667.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/667/head:pull/667 PR: https://git.openjdk.org/babylon/pull/667 From psandoz at openjdk.org Thu Nov 6 15:51:39 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 6 Nov 2025 15:51:39 GMT Subject: [code-reflection] RFR: Improve runtime invocation [v2] In-Reply-To: References: Message-ID: <48tLr3ApAcONWP3BngepZpmupi2IABcjFqRswrIszhU=.718b2500-da90-4abb-85fb-912b66e2673a@github.com> On Thu, 6 Nov 2025 06:58:10 GMT, Ana Maria Mihalceanu wrote: >> This PR, co-authored with @LizeRaes, enhances the way FER demo iterates over the input received: >> * Take arena invocation out of the loop, together with provider configuration. >> * Separate session preparation from the actual inference and remove progressbar. > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Update full name This change looks fine, I think it's ok for you to `/integrate` changes like these without waiting for a review (if you were doing that), and one of us can quickly sponsor. Skara is reporting an issue with your name not matching for some reason. Do you know why? ------------- Marked as reviewed by psandoz (Lead). PR Review: https://git.openjdk.org/babylon/pull/664#pullrequestreview-3428966420 From duke at openjdk.org Thu Nov 6 16:42:00 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 6 Nov 2025 16:42:00 GMT Subject: [code-reflection] RFR: Improve runtime invocation [v2] In-Reply-To: References: Message-ID: On Thu, 6 Nov 2025 06:58:10 GMT, Ana Maria Mihalceanu wrote: >> This PR, co-authored with @LizeRaes, enhances the way FER demo iterates over the input received: >> * Take arena invocation out of the loop, together with provider configuration. >> * Separate session preparation from the actual inference and remove progressbar. > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Update full name I think I fixed the name part. I ran `git show -s --format='%ae HASH` and all show "Author: Ana-Maria Mihalceanu ". Thank you for review. ? ------------- PR Comment: https://git.openjdk.org/babylon/pull/664#issuecomment-3498251698 From duke at openjdk.org Thu Nov 6 16:42:00 2025 From: duke at openjdk.org (duke) Date: Thu, 6 Nov 2025 16:42:00 GMT Subject: [code-reflection] RFR: Improve runtime invocation [v2] In-Reply-To: References: Message-ID: On Thu, 6 Nov 2025 06:58:10 GMT, Ana Maria Mihalceanu wrote: >> This PR, co-authored with @LizeRaes, enhances the way FER demo iterates over the input received: >> * Take arena invocation out of the loop, together with provider configuration. >> * Separate session preparation from the actual inference and remove progressbar. > > Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision: > > Update full name @ammbra Your change (at version 23f0bb9c08205b49e7819d19297c0eb1560ab73e) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/babylon/pull/664#issuecomment-3498259370 From psandoz at openjdk.org Thu Nov 6 17:14:14 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 6 Nov 2025 17:14:14 GMT Subject: git: openjdk/babylon: code-reflection: Improve runtime invocation Message-ID: <455659d0-0c48-480f-bf8c-59adec9c1121@openjdk.org> Changeset: 5782567a Branch: code-reflection Author: Ana-Maria Mihalceanu Committer: Paul Sandoz Date: 2025-11-06 17:11:44 +0000 URL: https://git.openjdk.org/babylon/commit/5782567a4fb0a65fa3905a1e73b1aec5c3430a2b Improve runtime invocation Reviewed-by: psandoz ! cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERCoreMLDemo.java ! cr-examples/onnx/src/test/java/oracle/code/onnx/fer/FERInference.java From duke at openjdk.org Thu Nov 6 17:14:17 2025 From: duke at openjdk.org (Ana Maria Mihalceanu) Date: Thu, 6 Nov 2025 17:14:17 GMT Subject: [code-reflection] Integrated: Improve runtime invocation In-Reply-To: References: Message-ID: On Wed, 5 Nov 2025 17:42:04 GMT, Ana Maria Mihalceanu wrote: > This PR, co-authored with @LizeRaes, enhances the way FER demo iterates over the input received: > * Take arena invocation out of the loop, together with provider configuration. > * Separate session preparation from the actual inference and remove progressbar. This pull request has now been integrated. Changeset: 5782567a Author: Ana-Maria Mihalceanu Committer: Paul Sandoz URL: https://git.openjdk.org/babylon/commit/5782567a4fb0a65fa3905a1e73b1aec5c3430a2b Stats: 82 lines in 2 files changed: 29 ins; 18 del; 35 mod Improve runtime invocation Reviewed-by: psandoz ------------- PR: https://git.openjdk.org/babylon/pull/664 From psandoz at openjdk.org Thu Nov 6 18:04:32 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 6 Nov 2025 18:04:32 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: On Thu, 6 Nov 2025 15:29:20 GMT, Maurizio Cimadamore wrote: >> The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: >> >> >> Quoted q = () -> {} >> >> >> Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: >> >> >> Runnable r = (Runnable & Quotable)() -> {} >> >> >> Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. >> >> This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Re-add accidentally deleted test Very good! Really simplifies things. The examples and HAT do not target lambda expressions to `Quoted`, so no updates required. To support targeting to `Quoted` we had to add `ClosureOp` and `ClosureCallOp`. We could also remove these too, and their use in the interpreter (the byte code generator never used them). test/jdk/java/lang/reflect/code/bytecode/TestQuoted.java line 49: > 47: @Test > 48: public void testQuoted() throws Throwable { > 49: Quotable q = (IntBinaryOperator & Quotable)(int i, int j) -> { We can delete this test, as there are others testing lambda expressions. ------------- PR Review: https://git.openjdk.org/babylon/pull/667#pullrequestreview-3429706209 PR Review Comment: https://git.openjdk.org/babylon/pull/667#discussion_r2500178383 From mcimadamore at openjdk.org Thu Nov 6 19:08:45 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 19:08:45 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: <3Moqtnib5iXVQBUcyhmO0B-WNpEzq36jn9pXw_YJ278=.f4b4faa5-7382-4113-af2a-e0c5e8f1989f@github.com> On Thu, 6 Nov 2025 18:02:09 GMT, Paul Sandoz wrote: > To support targeting to `Quoted` we had to add `ClosureOp` and `ClosureCallOp`. We could also remove these too, and their use in the interpreter (the byte code generator never used them). Is that ok to do in another PR? > test/jdk/java/lang/reflect/code/bytecode/TestQuoted.java line 49: > >> 47: @Test >> 48: public void testQuoted() throws Throwable { >> 49: Quotable q = (IntBinaryOperator & Quotable)(int i, int j) -> { > > We can delete this test, as there are others testing lambda expressions. Wait... do you mean deleting the full test? ------------- PR Comment: https://git.openjdk.org/babylon/pull/667#issuecomment-3498972588 PR Review Comment: https://git.openjdk.org/babylon/pull/667#discussion_r2500447854 From mcimadamore at openjdk.org Thu Nov 6 19:24:33 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 19:24:33 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: On Thu, 6 Nov 2025 15:29:20 GMT, Maurizio Cimadamore wrote: >> The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: >> >> >> Quoted q = () -> {} >> >> >> Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: >> >> >> Runnable r = (Runnable & Quotable)() -> {} >> >> >> Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. >> >> This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Re-add accidentally deleted test Now that I look at it more -- it seems TestClosureOps is also mostly a dup of TestLambdaOps? Should I delete that one too? ------------- PR Comment: https://git.openjdk.org/babylon/pull/667#issuecomment-3499027773 From mcimadamore at openjdk.org Thu Nov 6 19:24:34 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 19:24:34 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: On Thu, 6 Nov 2025 19:20:20 GMT, Maurizio Cimadamore wrote: > Now that I look at it more -- it seems TestClosureOps is also mostly a dup of TestLambdaOps? Should I delete that one too? Uhm... maybe we can wait until we GC ClosureOp... ------------- PR Comment: https://git.openjdk.org/babylon/pull/667#issuecomment-3499031284 From psandoz at openjdk.org Thu Nov 6 19:30:40 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 6 Nov 2025 19:30:40 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: On Thu, 6 Nov 2025 19:21:28 GMT, Maurizio Cimadamore wrote: > > Now that I look at it more -- it seems TestClosureOps is also mostly a dup of TestLambdaOps? Should I delete that one too? > > Uhm... maybe we can wait until we GC ClosureOp... Yes, we can follow up in a separate PR. ------------- PR Comment: https://git.openjdk.org/babylon/pull/667#issuecomment-3499052603 From psandoz at openjdk.org Thu Nov 6 19:30:41 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 6 Nov 2025 19:30:41 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: <3Moqtnib5iXVQBUcyhmO0B-WNpEzq36jn9pXw_YJ278=.f4b4faa5-7382-4113-af2a-e0c5e8f1989f@github.com> References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> <3Moqtnib5iXVQBUcyhmO0B-WNpEzq36jn9pXw_YJ278=.f4b4faa5-7382-4113-af2a-e0c5e8f1989f@github.com> Message-ID: On Thu, 6 Nov 2025 19:06:10 GMT, Maurizio Cimadamore wrote: >> test/jdk/java/lang/reflect/code/bytecode/TestQuoted.java line 49: >> >>> 47: @Test >>> 48: public void testQuoted() throws Throwable { >>> 49: Quotable q = (IntBinaryOperator & Quotable)(int i, int j) -> { >> >> We can delete this test, as there are others testing lambda expressions. > > Wait... do you mean deleting the full test? Yes, i think its redundant. ------------- PR Review Comment: https://git.openjdk.org/babylon/pull/667#discussion_r2500524230 From psandoz at openjdk.org Thu Nov 6 20:23:40 2025 From: psandoz at openjdk.org (Paul Sandoz) Date: Thu, 6 Nov 2025 20:23:40 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v2] In-Reply-To: References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: On Thu, 6 Nov 2025 15:29:20 GMT, Maurizio Cimadamore wrote: >> The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: >> >> >> Quoted q = () -> {} >> >> >> Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: >> >> >> Runnable r = (Runnable & Quotable)() -> {} >> >> >> Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. >> >> This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. > > Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: > > Re-add accidentally deleted test Marked as reviewed by psandoz (Lead). ------------- PR Review: https://git.openjdk.org/babylon/pull/667#pullrequestreview-3430367202 From mcimadamore at openjdk.org Thu Nov 6 22:17:05 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 22:17:05 GMT Subject: git: openjdk/babylon: code-reflection: Drop support for quoted structural lambdas Message-ID: <3a86aad1-08f0-4a43-866a-56321f4be0fc@openjdk.org> Changeset: df4acf29 Branch: code-reflection Author: Maurizio Cimadamore Date: 2025-11-06 22:14:10 +0000 URL: https://git.openjdk.org/babylon/commit/df4acf29669e71de292c9c552a4ed45d69123bed Drop support for quoted structural lambdas Reviewed-by: psandoz ! src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties ! src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java ! src/jdk.incubator.code/share/classes/jdk/incubator/code/internal/ReflectMethods.java ! test/jdk/java/lang/reflect/code/TestClosureOps.java ! test/jdk/java/lang/reflect/code/TestInline.java - test/jdk/java/lang/reflect/code/TestLinqUsingQuoted.java ! test/jdk/java/lang/reflect/code/TestSealOp.java - test/jdk/java/lang/reflect/code/bytecode/TestQuoted.java ! test/jdk/java/lang/reflect/code/expression/TestExpressionElimination.java ! test/jdk/java/lang/reflect/code/stream/StreamFuser.java - test/jdk/java/lang/reflect/code/stream/StreamFuserUsingQuotable.java ! test/jdk/java/lang/reflect/code/stream/TestStream.java - test/jdk/java/lang/reflect/code/stream/TestStreamUsingQuotable.java ! test/langtools/tools/javac/diags/examples.not-yet.txt - test/langtools/tools/javac/reflect/QuotedTest.java = test/langtools/tools/javac/reflect/TestCaptureQuotable.java ! test/langtools/tools/javac/reflect/TestNoCodeReflectionInInnerClasses.java ! test/langtools/tools/javac/reflect/TestNoCodeReflectionInInnerClasses.out ! test/langtools/tools/javac/reflect/UnreachableTest.java - test/langtools/tools/javac/reflect/quoted/TestAssignment.java - test/langtools/tools/javac/reflect/quoted/TestAssignment.out - test/langtools/tools/javac/reflect/quoted/TestCaptureQuoted.java - test/langtools/tools/javac/reflect/quoted/TestGenericMethodCall.java - test/langtools/tools/javac/reflect/quoted/TestGenericMethodCall.out - test/langtools/tools/javac/reflect/quoted/TestMethodCall.java - test/langtools/tools/javac/reflect/quoted/TestMethodCall.out - test/langtools/tools/javac/reflect/quoted/TestRecovery.java - test/langtools/tools/javac/reflect/quoted/TestRecovery.out From mcimadamore at openjdk.org Thu Nov 6 22:17:09 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 22:17:09 GMT Subject: [code-reflection] RFR: Drop support for quoted structural lambdas [v3] In-Reply-To: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: > The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: > > > Quoted q = () -> {} > > > Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: > > > Runnable r = (Runnable & Quotable)() -> {} > > > Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. > > This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Drop QuotesTest ------------- Changes: - all: https://git.openjdk.org/babylon/pull/667/files - new: https://git.openjdk.org/babylon/pull/667/files/bd6ddc10..80d86cc6 Webrevs: - full: https://webrevs.openjdk.org/?repo=babylon&pr=667&range=02 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=667&range=01-02 Stats: 69 lines in 1 file changed: 0 ins; 69 del; 0 mod Patch: https://git.openjdk.org/babylon/pull/667.diff Fetch: git fetch https://git.openjdk.org/babylon.git pull/667/head:pull/667 PR: https://git.openjdk.org/babylon/pull/667 From mcimadamore at openjdk.org Thu Nov 6 22:17:10 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 6 Nov 2025 22:17:10 GMT Subject: [code-reflection] Integrated: Drop support for quoted structural lambdas In-Reply-To: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> References: <3v9IIaPleSIT7l8uUFHq0NOcgEjLGV1iyxCg65Ob5fg=.f28516d6-de13-4c41-bbe2-61d62ce475ae@github.com> Message-ID: On Thu, 6 Nov 2025 15:02:04 GMT, Maurizio Cimadamore wrote: > The Babylon compiler extension supports structural quoting of lambdas. That is, if a lambda expression has `Quoted` target, then it must have explicit parameter types, and must be type-checked bottom up: > > > Quoted q = () -> {} > > > Historically, `Quoted` was the first way to model quotable lambda expressions, and the language changes to support structural quotable lambdas were fairly invasive. Since then we moved to a more minimalistic approach which is similar to what we do for serializable lambdas: we use an intersection type cast to force quotability of the lambda expression: > > > Runnable r = (Runnable & Quotable)() -> {} > > > Since the surface area of the `Quotable` support is much smaller (it shares the same machinery already available for serializable lambdas), it would be better to remove support for Quoted target when moving towards incubation. > > This PR fixes all existing tests in langtools/JDK to use `Quotable` instead of `Quoted`. I did **not** check HAT, or `cr-examples`. This pull request has now been integrated. Changeset: df4acf29 Author: Maurizio Cimadamore URL: https://git.openjdk.org/babylon/commit/df4acf29669e71de292c9c552a4ed45d69123bed Stats: 1912 lines in 36 files changed: 56 ins; 1754 del; 102 mod Drop support for quoted structural lambdas Reviewed-by: psandoz ------------- PR: https://git.openjdk.org/babylon/pull/667