Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gen/common/util.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
(:function-prototype (%overtype :void))
(:function-prototype-pointer (let ((overriden (%overtype :function-prototype-pointer)))
(if (eq overriden :function-prototype-pointer)
(%overtype :void)
(%overtype :pointer)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this; I based this PR on the wrong commit.

(let ((result-type type)
(param-types opts))
(list* overriden
Expand Down
24 changes: 9 additions & 15 deletions src/resect/resect.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -848,21 +848,6 @@
(parse-record-declaration type decl from-type))


(defmethod parse-type (category (kind (eql :struct)) type)
(declare (ignore category kind))
(parse-declaration-by-kind (%resect:type-declaration type) type))


(defmethod parse-type (category (kind (eql :union)) type)
(declare (ignore category kind))
(parse-declaration-by-kind (%resect:type-declaration type) type))


(defmethod parse-type (category (kind (eql :class)) type)
(declare (ignore category kind))
(parse-declaration-by-kind (%resect:type-declaration type) type))

Comment on lines -851 to -864

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods can't be called — kind here is a type-kind, not a declaration kind, so it can't have these values, only :record — and I found their presence very confusing at first.


;;;
;;; FUNCTION
;;;
Expand Down Expand Up @@ -1199,6 +1184,15 @@
(defmethod parse-type ((category (eql :aux)) (kind (eql :dependent)) type)
(make-unrecognized-type type category kind))

;;; There was no method on `foreign-entity-id' for these. The result is used as an
;;; internal ID only, so resetting the counter between runs is not necessary.
;;; Noticed after warning:
;;; Failed to recognize type of RECORD kind from UNIQUE category: std::basic_string<char, std::char_traits<char>, std::allocator<char>>
;;; On debug, I found that the type's decl was a null foreign pointer. I don't know why.
(defvar *unrecognized-type-id-gensym-counter* 0)
(defmethod claw.spec::foreign-entity-id ((entity unrecognized-type))
(format nil "unrecognized-type-~D" (incf *unrecognized-type-id-gensym-counter*)))


;;;
;;; UNRECOGNIZED DECL
Expand Down