Class GraalJsSeamTest

java.lang.Object
scripting.GraalJsSeamTest

public class GraalJsSeamTest extends Object
Track B(Nashorn → GraalJS)— C0 SPIKE 黃金參考 differ / 接縫驗證。

同一 JVM 並存 nashorn-core(黃金參考)與 GraalJS(候選),命名空間不相交 (org.openjdk.nashorn.* vs org.graalvm.*/com.oracle.truffle.js.*)。 兩者皆透過 ScriptEngines.fresh(ScriptEngines.Backend) 取得,故本測試也順帶驗證接縫工廠。

涵蓋:
  • prelude/shim:load('nashorn:mozilla_compat.js') 變 no-op、importPackagePackages.*
  • 黃金參考轉錄相等:數值強制(double→int)、String 型別、array.length 在兩引擎一致
  • getInterface(SAM)(portal 路徑)在 GraalJS nashorn-compat 下可用
  • C2 codemod 等價:原始 E4X for each 與改寫後計數迴圈在 nashorn-core / GraalJS 三者輸出相同
  • 實機檔冒煙:3 個已 codemod 的 NPC + importPackage NPC + special/event 真檔在 GraalJS 可解析(E4X 已消失)
不需 DB / wz / 網路 / Timer。
  • Constructor Details

    • GraalJsSeamTest

      public GraalJsSeamTest()
  • Method Details

    • mozillaCompatLoadResolvesAndImportPackageWorksOnGraal

      public void mozillaCompatLoadResolvesAndImportPackageWorksOnGraal() throws Exception
      Throws:
      Exception
    • packagesFullyQualifiedResolvesOnGraal

      public void packagesFullyQualifiedResolvesOnGraal() throws Exception
      Throws:
      Exception
    • coercionAndStringTranscriptsMatchAcrossEngines

      public void coercionAndStringTranscriptsMatchAcrossEngines() throws Exception
      Throws:
      Exception
    • getInterfacePortalScriptSamMatchesAcrossEngines

      public void getInterfacePortalScriptSamMatchesAcrossEngines() throws Exception
      Throws:
      Exception
    • realImportPackageScriptEvalsCleanOnGraal

      public void realImportPackageScriptEvalsCleanOnGraal() throws Exception
      Throws:
      Exception
    • e4xForEachLoweringIsEquivalent

      public void e4xForEachLoweringIsEquivalent() throws Exception
      Throws:
      Exception
    • realScriptsParseCleanOnGraal

      public void realScriptsParseCleanOnGraal() throws Exception
      Throws:
      Exception