Jump to content

David Heffernan

Members
  • Content Count

    3462
  • Joined

  • Last visited

  • Days Won

    171

Everything posted by David Heffernan

  1. Can you link the documentation you refer to so that there is no ambiguity in the question
  2. David Heffernan

    Disabled floating point exceptions are problematic for DLLs

    That's easy to fix. You just make sure that they call internal methods only. Not really. You can store the FPCR to a local variable in the exported method. The thing is, the change in Delphi 12 isn't actually causing any new issues. These issues always existed. It's just a consequence of the "design" of DLLs not making FPCR part of the ABI.
  3. David Heffernan

    Disabled floating point exceptions are problematic for DLLs

    One very obvious problem is that you need to write code like this everywhere. Not just at the top level. I stand by my advice before. Either: 1. Make FPCR part of the contract, or 2. Take control on entry, and restore on exit.
  4. David Heffernan

    Disabled floating point exceptions are problematic for DLLs

    This is the worst advice I've seen in quite some time!!
  5. David Heffernan

    Disabled floating point exceptions are problematic for DLLs

    DLLs should take charge of this. They should either make it part of their contract that the host sets the fp control state to a specific state. Or they should set it on entry, and restore it on exit. My DLL does the latter.
  6. David Heffernan

    Uses Clause Sorting??

    It's time to start using revision control
  7. David Heffernan

    Windows Paint 3D open file using ShellExecute

    Why are you using ShellExecute. That's a deprecated function that used to be used to execute shell actions, but has been replaced by ShellExecuteEx. If you want to execute a specific program why aren't you using CreateProcess?
  8. David Heffernan

    C Libraries to Delphi

    This is pretty epic, let's be honest. Take all the drudge out, and let us work on the brain stuff.
  9. David Heffernan

    Delphi and "Use only memory safe languages"

    That's kind of a vague specification. For instance, is the data pushed or pulled? I would imagine that makes a difference.
  10. David Heffernan

    Delphi and "Use only memory safe languages"

    The real trick there is not to do it. Avoid it at all costs.
  11. David Heffernan

    Delphi and "Use only memory safe languages"

    I don't really understand this. I always write the try/finally immediately after the construction, and always bang the Free in immediately. Then I fill out the body. It's just a habit that you form so that you don't make such mistakes. And honestly, this is never one that is hard to debug because you just have a leak. And presumably you use leak detection tools so that you'd always find them immediately. I don't really understand this scenario either. If you have a reference to something that may or may not exist, you would test Assigned() before using it. And when you were finished, you'd set the reference back to nil once you'd destroyed it. The scenario that is tricky is when you have multiple references to an object.
  12. David Heffernan

    Delphi and "Use only memory safe languages"

    Keep searching then
  13. David Heffernan

    Delphi and "Use only memory safe languages"

    It's odd you say that, but I never have to debug issues like this. There are two simple patterns for lifetime and they are so ingrained, nobody ever makes a mistake in my team.
  14. David Heffernan

    Delphi and "Use only memory safe languages"

    (PDF) Application of artificial intelligence in compiler design (researchgate.net)  (ijresm.com)
  15. David Heffernan

    Delphi and "Use only memory safe languages"

    Yeah, you are wrong. Such people exist. I am one. Not necessarily. No reason why pointer arithmetic should be faster than, for example, plain indexing of arrays. Again, good compilers are often better than humans. I don't think pointers are used in the RTL especially more than other libraries, and I don't think pointers are used there fore for optimisation and performance. As far as this whole memory safety debate goes, you can't exclude the RTL from it. That code executes in the code that is subject to attack.
  16. David Heffernan

    C Libraries to Delphi

    I'm not quite sure what you are saying here? Are you looking to hire somebody?
  17. David Heffernan

    What is the target Win 64 (Modern) in Delphi 12.1

    This was in fact mentioned
  18. David Heffernan

    Delphi 12.1 is available

    I guess they will be able to say that the numbers of bugs reported is going down and claim that indicates quality has improved.
  19. David Heffernan

    Delphi 12.1 is available

    Split views which other IDEs have had for years. And bug fixes. But still no way to report bugs. Does this seem like value for money to anybody?
  20. David Heffernan

    Do you need an ARM64 compiler for Windows?

    Unlucky for you. I've so far never encountered such a problem. The type of thing that forces me to debug 64 bit is when it's my DLL hosted in a 64 bit process, and I don't have a 32 bit version of the host.
  21. David Heffernan

    Do you need an ARM64 compiler for Windows?

    I think all in all, it's clear that the current in-process design is the right one
  22. David Heffernan

    Do you need an ARM64 compiler for Windows?

    How are you going to have the components paint themselves on the design surface?
  23. David Heffernan

    Do you need an ARM64 compiler for Windows?

    Win64 debugger is known to be terrible. Perhaps slightly less so with more recent versions. I always debug 32 bit if at all possible. But sometimes you have a scenario where that's not possible. Unlucky if you do.
  24. David Heffernan

    Do you need an ARM64 compiler for Windows?

    I can imagine this working fine for non visual components but what about components that paint themselves on the design surface? Cross process window hierarchies are basically untenable.
  25. Automatic stack allocation is faster than all heap allocators, and has no thread contention. And Delphi's current heap allocator is known not to be scalable. I've measured this in a real world setting. Avoiding heap allocations when converting numbers (integer and real) to text makes a huge performance difference when creating files, e.g. XML, JSON, YAML. Even when single threaded. When multi-threading the impact is even greater, if using the default heap allocator. I personally use isolated per thread heaps to reduce contention. This doesn't eliminate it because every allocation/deallocation that requires a call to VirtualAlloc and friends has contention.
×