From ce239ccc3e577c9f0a02d1a803977fd308195f5d Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Thu, 18 Mar 2021 13:49:55 +0300 Subject: [PATCH] Native runtime: remove unused dependency on common/src/hash No longer required after c8633d8bdae7ea9f1b70a37843e98a900f3475c5. --- kotlin-native/runtime/build.gradle.kts | 4 +--- kotlin-native/runtime/src/main/cpp/KString.cpp | 1 - kotlin-native/runtime/src/main/cpp/TypeInfo.h | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kotlin-native/runtime/build.gradle.kts b/kotlin-native/runtime/build.gradle.kts index 1ee9f42ca74..ee532da6493 100644 --- a/kotlin-native/runtime/build.gradle.kts +++ b/kotlin-native/runtime/build.gradle.kts @@ -19,7 +19,7 @@ googletest { } fun CompileToBitcode.includeRuntime() { - headersDirs += files("../common/src/hash/headers", "src/main/cpp") + headersDirs += files("src/main/cpp") } val hostName: String by project @@ -29,7 +29,6 @@ bitcode { create("runtime", file("src/main")) { dependsOn( ":kotlin-native:dependencies:update", - ":kotlin-native:common:${target}Hash", "${target}StdAlloc", "${target}OptAlloc", "${target}Mimalloc", @@ -46,7 +45,6 @@ bitcode { ) includeRuntime() // TODO: Should depend on the sanitizer. - linkerArgs.add(project.file("../common/build/bitcode/main/$target/hash.bc").path) } create("mimalloc") { diff --git a/kotlin-native/runtime/src/main/cpp/KString.cpp b/kotlin-native/runtime/src/main/cpp/KString.cpp index a1a781b19ec..b0e16395114 100644 --- a/kotlin-native/runtime/src/main/cpp/KString.cpp +++ b/kotlin-native/runtime/src/main/cpp/KString.cpp @@ -18,7 +18,6 @@ #include #include "KAssert.h" -#include "City.h" #include "Exceptions.h" #include "Memory.h" #include "Natives.h" diff --git a/kotlin-native/runtime/src/main/cpp/TypeInfo.h b/kotlin-native/runtime/src/main/cpp/TypeInfo.h index de2d9a9bf1e..118c23c669c 100644 --- a/kotlin-native/runtime/src/main/cpp/TypeInfo.h +++ b/kotlin-native/runtime/src/main/cpp/TypeInfo.h @@ -21,7 +21,6 @@ #include #include "Common.h" -#include "Names.h" #if KONAN_TYPE_INFO_HAS_WRITABLE_PART struct WritableTypeInfo; @@ -30,6 +29,9 @@ struct WritableTypeInfo; struct ObjHeader; struct AssociatedObjectTableRecord; +// Hash of open method name. Must be unique per class/scope (CityHash64 is being used). +typedef int64_t MethodNameHash; + // An element of sorted by hash in-place array representing methods. // For systems where introspection is not needed - only open methods are in // this table.