[code-reflection] RFR: Adjusted tests to use execution of a method and implementation of the execution model cache
    Paul Sandoz 
    psandoz at openjdk.org
       
    Thu Feb 27 19:21:12 UTC 2025
    
    
  
On Thu, 27 Feb 2025 16:50:04 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> Adjusted tests to use execution of a method and implementation of the execution model cache.
Very good.
cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java line 60:
> 58:     record CachedModel(byte[] protoModel, int[] operandsMapping) {}
> 59: 
> 60:     private static final WeakHashMap<Class<?>, CachedModel> MODEL_CACHE = WeakHashMap.newWeakHashMap(10);
Using `ClassValue` is another option.
cr-examples/onnx/src/main/java/oracle/code/onnx/OnnxRuntime.java line 86:
> 84: 
> 85:                 var operands = iop.operands();
> 86:                 var captured = List.of(quotable.capturedValues().sequencedKeySet().toArray());
`var captured = quotable.capturedValues().sequencedKeySet().stream().toList();` ?
-------------
Marked as reviewed by psandoz (Lead).
PR Review: https://git.openjdk.org/babylon/pull/331#pullrequestreview-2648835318
PR Review Comment: https://git.openjdk.org/babylon/pull/331#discussion_r1974200239
PR Review Comment: https://git.openjdk.org/babylon/pull/331#discussion_r1974202463
    
    
More information about the babylon-dev
mailing list