ldc/gen
Luna 82878ef32c
Improve Objective-C support (#4777)
* WIP: Objective-C support

* Further work on implementation

* ObjC dynamic cast

* Add swift stub class attribute

* Classes, protocols and ivars

* Fix compilation issues

* Fix objc ir codegen

* Add objc linker option

* Add swift stub classref get ir gen

* Minor cleanup

* Fix objc link flag being added on non-darwin platforms

* Refactor objc gen

* remove use of std::nullopt

* Emit protocol tables

* Remove unused variable

* Formatting

* Fix build in release mode. Thanks for nothing, c++.

* Fix consistency

* Fix dynamic casts

* Fix tocall parentfd ref and arm msgsend call

* Make instance variables work

* Implicitly add isa pointer to objc classes.

* Fix protocol referencing & allow pragma mangle

* Fix protocol linkage

* Fix direct call support

* always generate var type for methods

* Fix test 16096a

* Fix extern ivar symbol gen, retain method decls

* Remove arm32 and x86 support

* Check method and ivar info before pushing to member list

* Make ObjcMethod info untyped.

* Make ivar and method gen more robust

* Generate optional protocol symbols

* Use bitcasting instead of creating multiple type defs

* Fix invalid protocol list struct gen

* More codegen robustness

* emit protocol table as const

* Make protocol table anon struct

* Fix callable type, generate protocol_list_t properly.

* Cast vthis to argtype

* Handle protorefs and classrefs properly

* seperate label ref and deref

* Fix method lookup

* Enable objective-c tests

* Enable objc_call_static test

* Scan both classes and protocols for method ref

* Enable objective-c tests on arm as well.

* supress objc linker warning in tests

* Fix class and protocol gen structure

* Fix objc_protocol_sections test

* ObjcMethod only get callee for functions with bodies

* Fix protocol class method gen

* Make ObjcMethod anon again

* Fix missing emit calls

* Fix classref gen

* Implement some of the requested changes

* Enable compilable tests

* Fix property selector gen, ugly hack for final funcs.

* Fix segfault in referencing fd->type

* Refactor implementation

* Fix null references in class and method lookup

* include unordered_map

* Get functionality on-par with prev impl.

* Fix super context calls

* Move -L-w flag to d_do_test and use IN_LLVM in objc.d/h

* add LDC version tag to -L-w flag

* Update CHANGELOG.md
2024-12-03 04:26:27 +01:00
..
abi Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
dcompute gen/dcompute/targetOCL.cpp: update target data layout for LLVM 19 2024-11-26 08:46:15 -07:00
passes Skip some more superfluous bitcasts NOT using the DtoBitCast() helper 2024-05-20 17:29:55 +02:00
aa.cpp Get rid of now unused variables 2024-05-20 17:48:59 +02:00
aa.h
arrays.cpp gen/llvm.h: add a type parameter to GET_INTRINSIC_DECL macro ... 2024-11-26 08:46:15 -07:00
arrays.h Replace getPtrToType() 2024-07-18 22:33:24 +02:00
asm-gcc.cpp
asm-x86.h Adapt to free-standing size(Type*) function 2024-07-16 16:22:35 +02:00
asmstmt.cpp
attributes.cpp
attributes.h
binops.cpp Adapt to free-standing size(Type*) function 2024-07-16 16:22:35 +02:00
binops.h
classes.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
classes.h Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
complex.cpp Adapt to free-standing size(Type*) function 2024-07-16 16:22:35 +02:00
complex.h
coverage.cpp
coverage.h
cpp-imitating-naming.d
ctfloat.cpp
declarations.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
dibuilder.cpp gen/dibuilder.cpp: use the newer debug record API 2024-11-26 08:46:15 -07:00
dibuilder.h
dpragma.d
dvalue.cpp Merge pull request #4710 from kinke/getOpaquePtrType 2024-07-26 20:08:27 +02:00
dvalue.h
dynamiccompile.cpp
dynamiccompile.h
funcgenstate.cpp
funcgenstate.h
function-inlining.cpp
function-inlining.h
functions.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
functions.h
inlineir.cpp Skip superfluous IR pointer bitcasts, now that they are always opaque 2024-05-20 16:45:09 +02:00
inlineir.h
irstate.cpp Adapt to somewhat simpler global-var-replacement for mismatching initializers 2024-05-20 18:49:46 +02:00
irstate.h Adapt to somewhat simpler global-var-replacement for mismatching initializers 2024-05-20 18:49:46 +02:00
ldctraits.cpp
ldctraits.d
ldctraits.h
linkage.cpp
linkage.h
llvm.h Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
llvmhelpers.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
llvmhelpers.d
llvmhelpers.h Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
logger.cpp
logger.d
logger.h
mangling.cpp
mangling.h
moduleinfo.cpp Replace getVoidPtrType() 2024-07-18 23:21:10 +02:00
moduleinfo.h
modules.cpp Replace getVoidPtrType() 2024-07-18 23:21:10 +02:00
modules.h
ms-cxx-helper.cpp Replace getVoidPtrType() 2024-07-18 23:21:10 +02:00
ms-cxx-helper.h Replace getPtrToType() 2024-07-18 22:33:24 +02:00
naked.cpp Adapt to free-standing size(Type*) function 2024-07-16 16:22:35 +02:00
nested.cpp Replace getVoidPtrType() 2024-07-18 23:21:10 +02:00
nested.h
objcgen.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
objcgen.h Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
optimizer.cpp Implement -fsanitize-recover for ASan and MSan. (#4783) 2024-11-29 19:35:56 +01:00
optimizer.h
pgo_ASTbased.cpp gen/llvm.h: add a type parameter to GET_INTRINSIC_DECL macro ... 2024-11-26 08:46:15 -07:00
pgo_ASTbased.h
pragma.cpp
pragma.h
recursivevisitor.h
rttibuilder.cpp Replace getVoidPtrType() 2024-07-18 23:21:10 +02:00
rttibuilder.h Skip superfluous IR pointer bitcasts, now that they are always opaque 2024-05-20 16:45:09 +02:00
runtime.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
runtime.h
scope_exit.h
semantic-dcompute.cpp
semantic.d
statements.cpp Skip some more superfluous bitcasts NOT using the DtoBitCast() helper 2024-05-20 17:29:55 +02:00
structs.cpp Skip superfluous IR pointer bitcasts, now that they are always opaque 2024-05-20 16:45:09 +02:00
structs.h
target.cpp wasm: Add a preliminary TargetABI implementation (#4758) 2024-09-24 15:00:38 +02:00
to_string.h
tocall.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
toconstelem.cpp Merge remote-tracking branch 'origin/master' into merge-2.110 2024-08-02 19:15:45 +02:00
toir.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
tollvm.cpp Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
tollvm.h Improve Objective-C support (#4777) 2024-12-03 04:26:27 +01:00
trycatchfinally.cpp gen/llvm.h: add a type parameter to GET_INTRINSIC_DECL macro ... 2024-11-26 08:46:15 -07:00
trycatchfinally.h
typinf.cpp
typinf.h
uda.cpp Merge remote-tracking branch 'origin/master' into merge-2.109 2024-06-02 17:01:26 +02:00
uda.h
variable_lifetime.cpp Skip some more superfluous bitcasts NOT using the DtoBitCast() helper 2024-05-20 17:29:55 +02:00
variable_lifetime.h