Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR gen for literals with meta is invalid #280

Closed
jeaye opened this issue Feb 18, 2025 · 0 comments
Closed

IR gen for literals with meta is invalid #280

jeaye opened this issue Feb 18, 2025 · 0 comments
Assignees

Comments

@jeaye
Copy link
Member

jeaye commented Feb 18, 2025

@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @clojure_core_jank_global_init_5, ptr null }]
@data_2277397642 = internal global ptr null
@string_3441326907 = internal global ptr null
@0 = private unnamed_addr constant [3 x i8] c"()\00", align 1
@data_1860192556 = internal global ptr null
@string_616596970 = internal global ptr null
@1 = private unnamed_addr constant [109 x i8] c"{:jank/source {:start {:offset 11, :line 2, :col 4}, :end {:offset 13, :line 2, :col 6}}, :jank/type \22list\22}\00", align 1
@data_2703508760 = internal global ptr null
@string_131033145 = internal global ptr null
@2 = private unnamed_addr constant [72 x i8] c"{:name \22clojure.core/clojure_core-fn-1\22, :source \22(fn* [] (quote ()))\22}\00", align 1

define void @clojure_core_jank_global_init_5() {
entry:
  %0 = call ptr @jank_string_create(ptr @0)
  store ptr %0, ptr @string_3441326907, align 8
  %1 = call ptr @jank_read_string(ptr %0)
  store ptr %1, ptr @data_2277397642, align 8
  %2 = call ptr @jank_string_create(ptr @1)
  store ptr %2, ptr @string_616596970, align 8
  %data_2277397642_meta = call ptr @jank_read_string(ptr %2)
  store ptr %data_2277397642_meta, ptr @data_1860192556, align 8
  ; Here we pass the ptr to the global in as the first param, but that's not correct. It needs to be loaded first.
  call void @jank_set_meta(ptr @data_2277397642, ptr %data_2277397642_meta)
  %3 = call ptr @jank_string_create(ptr @2)
  store ptr %3, ptr @string_131033145, align 8
  %4 = call ptr @jank_read_string(ptr %3)
  store ptr %4, ptr @data_2703508760, align 8
  ret void
}```
@jeaye jeaye self-assigned this Feb 18, 2025
@jeaye jeaye closed this as completed in 416b3e6 Feb 19, 2025
jeaye added a commit that referenced this issue Feb 19, 2025
jeaye added a commit that referenced this issue Feb 21, 2025
jeaye added a commit that referenced this issue Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant