From 850b5e720a44bd1ca15820c37f592350e25ca340 Mon Sep 17 00:00:00 2001 From: pavelpozdeev Date: Wed, 12 Feb 2025 16:52:45 +0300 Subject: [PATCH] initial --- incremental-cj/runtime/cjpm.toml | 2 +- interop/src/cangjie/Finalizable.cj | 10 +++++++++- interop/src/cangjie/InteropTypes.cj | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/incremental-cj/runtime/cjpm.toml b/incremental-cj/runtime/cjpm.toml index 5af23c773..1eb7795b1 100644 --- a/incremental-cj/runtime/cjpm.toml +++ b/incremental-cj/runtime/cjpm.toml @@ -2,7 +2,7 @@ [package] cjc-version = "0.53.4" - compile-option = "../runtime/CallsiteKey.o" # other apps are also depend on this relative path + compile-option = "" # other apps are also depend on this relative path description = "Incremental Runtime" link-option = "" name = "KoalaRuntime" diff --git a/interop/src/cangjie/Finalizable.cj b/interop/src/cangjie/Finalizable.cj index 73f7c9f9f..555922042 100644 --- a/interop/src/cangjie/Finalizable.cj +++ b/interop/src/cangjie/Finalizable.cj @@ -22,4 +22,12 @@ public open class Finalizable { this.ptr = ptr this.finalizer = finalizer } -} \ No newline at end of file +} + +public abstract class MaterializedBase { + public var peer: Option = Option.None + + public func getPeer(): ?Finalizable { + return this.peer + } +} diff --git a/interop/src/cangjie/InteropTypes.cj b/interop/src/cangjie/InteropTypes.cj index a4679b852..1be75c021 100644 --- a/interop/src/cangjie/InteropTypes.cj +++ b/interop/src/cangjie/InteropTypes.cj @@ -17,6 +17,7 @@ package Interop import std.collection.* public type KPointer = UInt64 +public type KFloat = Float32 public type pointer = KPointer public type KInt = Int32 public type KStringPtr = String -- Gitee