* 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
Base it on the IR alignments of the fields only.
Also fix the alignment of variables captured by ref (=> pointer
alignment, not the pointee's) and captured lazy params (=>
delegate alignment) in nested frames, something that cropped up with
a new assertion.
As *the* way to access the IrType associated with a Type via its `ctype`
field. Most importantly, it makes sure all access is redirected to the
*unqualified* type's `ctype`, which allows to get rid of the 'multiple
types' workaround for aggregates in DtoType(). Those were e.g. hit for
`shared struct SpinLock`, where the struct's type includes the `shared`
modifier...
* fix issue 2422
remove overzealous error check - global.errors may be nonzero due to speculative error at this point!
ie. when trying to speculatively make a constant class expression
This is as per DMD a54e89d, but has not been tested all too carefully
yet – there still seem to be issues with extern(C++) interfaces (see
test suite).
Notably, the glue layer side of the changed multiple interface
inheritance layout (DMD a54e89d) has not been implemented yet.
This corresponds to DMD commit 3f6a763c0589dd03c1c206eafd434b593702564e.
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
This fixes a regression introduced in caa2f15c8a. The IrDsymbol
metadata is obviously reset in between modules, while IrTypes
are not. Thus, we can never set symbol metadata when resolving
types, as the symbol data will be wrong in all modules following
the one where the type was first resolved.
GitHub: Fixes#739.
Fixes ABI mismatch when e.g. padding a 28 byte union from a
20 byte member, where previously, an i64 would be emitted,
yielding a 32 byte LLVM struct size on ulong.alignof == 8
platforms.
Test case will follow on the 2.064 branch.
This also allows us to enable the assert in IrType::IrType.
Unfortunately, this is mostly a "peace of mind" commit, there
doesn't seem to have been a bug actually caused by the transitory
duplicate IrTypePointer/IrTypeStruct instances.
The remaining xyz2llvm static methods are not exactly pretty,
they should probably just be folded into get.
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find,
e.g. by grep. Using const_cast also shuts up some compiler warnings.