소스 검색

Remove some TODO. Leave important note

Harold Brenes 4 달 전
부모
커밋
fc082f5ea5
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 0
      src/check_decl.cpp
  2. 0 2
      src/llvm_backend.cpp

+ 4 - 0
src/check_decl.cpp

@@ -1283,6 +1283,9 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
 		break;
 	}
 
+	// NOTE(harold): For Objective-C method implementations, this must happen after
+	//				 check_objc_methods() is called as it re-sets ac.is_export to true unconditionally.
+	//				 The same is true for the linkage, set below.
 	e->Procedure.entry_point_only = ac.entry_point_only;
 	e->Procedure.is_export = ac.is_export;
 
@@ -1382,6 +1385,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
 		}
 	}
 
+	// NOTE(harold): See export/linkage note above(where is_export is assigned) regarding Objective-C method implementations
 	bool is_foreign = e->Procedure.is_foreign;
 	bool is_export  = e->Procedure.is_export;
 	

+ 0 - 2
src/llvm_backend.cpp

@@ -1649,8 +1649,6 @@ gb_internal void lb_finalize_objc_names(lbGenerator *gen, lbProcedure *p) {
 			isize method_param_count  = method_type->Proc.param_count;
 			isize method_param_offset = 0;
 
-			// TODO(harold): Need to make sure (at checker stage) that the non-class method has the self parameter already.
-			//               (Maybe this is already accounted for?.)
 			if (!md.ac.objc_is_class_method) {
 				GB_ASSERT(method_param_count >= 1);
 				method_param_count -= 1;