Skip to content

Commit 7a458f0

Browse files
committed
Add string array stubs for clean runtime builds
1 parent b7c74b8 commit 7a458f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vm/ByteCodeTranslator/src/cn1_globals.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ static void init_gc_thresholds() {
268268
DEBUG_GC_INIT 0, 999999, 0, 0, 0, 0, 0, 0, 0, 0, cn1_array_1_id_JAVA_DOUBLE, "double[]", JAVA_TRUE, 1, &class__java_lang_Double, JAVA_TRUE, &class__java_lang_Object, EMPTY_INTERFACES, 0, 0, 0
269269
};
270270

271+
// Minimal stubs for String array classes so clean-target builds that only
272+
// reference primitive wrappers still have constant pool backing storage.
273+
struct clazz class_array1__java_lang_String = {0};
274+
struct clazz class_array2__java_lang_String = {0};
275+
271276
struct clazz class_array2__JAVA_DOUBLE = {
272277
DEBUG_GC_INIT 0, 999999, 0, 0, 0, 0, 0, 0, &gcMarkArrayObject, 0, cn1_array_2_id_JAVA_DOUBLE, "double[]", JAVA_TRUE, 2, &class__java_lang_Double, JAVA_TRUE, &class__java_lang_Object, EMPTY_INTERFACES, 0, 0, 0
273278
};
@@ -629,7 +634,7 @@ void codenameOneGCMark() {
629634
}
630635
if (CN1_EDT_THREAD_ID == t->threadId && agressiveAllocator) {
631636
long freeMemory = get_free_memory();
632-
CN1_LOG("[GC] Blocking EDT as aggressive allocator, free memory=%lld", freeMemory);
637+
CN1_LOG("[GC] Blocking EDT as aggressive allocator, free memory=%ld", freeMemory);
633638

634639
}
635640

0 commit comments

Comments
 (0)