Hi -
I'd like to propose to REMOVE the inline definition of void error(char*) from CCodeGenerator>>emitCHeaderOn:.
Rationale: Allow the support code to handle fatal errors and provide proper feedback. Currently a fatal error will cause the VM to silently quit instead of telling the user that a fatal error happened. It also prevents gathering additional information that the VM could other provide (such as the crash.dmp on Windows).
Anyone opposed to that change?
Cheers, - Andreas
On 10.03.2010, at 09:02, Andreas Raab wrote:
Hi -
I'd like to propose to REMOVE the inline definition of void error(char*) from CCodeGenerator>>emitCHeaderOn:.
Rationale: Allow the support code to handle fatal errors and provide proper feedback. Currently a fatal error will cause the VM to silently quit instead of telling the user that a fatal error happened. It also prevents gathering additional information that the VM could other provide (such as the crash.dmp on Windows).
Anyone opposed to that change?
Cheers,
- Andreas
Sounds good.
- Bert -
On Wed, Mar 10, 2010 at 12:02:58AM -0800, Andreas Raab wrote:
Hi -
I'd like to propose to REMOVE the inline definition of void error(char*) from CCodeGenerator>>emitCHeaderOn:.
Rationale: Allow the support code to handle fatal errors and provide proper feedback. Currently a fatal error will cause the VM to silently quit instead of telling the user that a fatal error happened. It also prevents gathering additional information that the VM could other provide (such as the crash.dmp on Windows).
Anyone opposed to that change?
No objection from me. If we find that we need backward compatibility for support code that does not implement error(), I can add it later (see the generated vm/interp.h for how John and I handled it for sqImageFileReadEntireImage).
Please bump the VMMaker class>>versionString when you make the change. Bert pointed out that we should start labeling new VMs as version 4, so let's go ahead and make the next #versionString be '4.0.0'. That will cause unix VMs to be labeled '4.0.0-2151'.
Dave
On Wed, Mar 10, 2010 at 12:02:58AM -0800, Andreas Raab wrote:
I'd like to propose to REMOVE the inline definition of void error(char*) from CCodeGenerator>>emitCHeaderOn:.
Rationale: Allow the support code to handle fatal errors and provide proper feedback. Currently a fatal error will cause the VM to silently quit instead of telling the user that a fatal error happened. It also prevents gathering additional information that the VM could other provide (such as the crash.dmp on Windows).
Andreas,
Attached is a patch for VMMaker that should enable a replacement error() function without requiring updates to existing platform support code (RiscOS, unix, etc).
You can implement the replacement error() function in platform code, e.g. win32ErrorProc(char *), then: '#define error(str) win32ErrorProc(str)' in the platforms/win32/vm/config.h header file.
If this approach makes sense, I'll add it to VMMaker.
Note, I have not built a win32 VM with this, so mistakes are possible.
Cheers, Dave
Thanks David, that worked fine. I would actually prefer that we just rip out the definition and leave it a support responsibility to implement error() but I'll take what I can get for now :-)
Cheers, - Andreas
On 3/10/2010 8:12 PM, David T. Lewis wrote:
On Wed, Mar 10, 2010 at 12:02:58AM -0800, Andreas Raab wrote:
I'd like to propose to REMOVE the inline definition of void error(char*) from CCodeGenerator>>emitCHeaderOn:.
Rationale: Allow the support code to handle fatal errors and provide proper feedback. Currently a fatal error will cause the VM to silently quit instead of telling the user that a fatal error happened. It also prevents gathering additional information that the VM could other provide (such as the crash.dmp on Windows).
Andreas,
Attached is a patch for VMMaker that should enable a replacement error() function without requiring updates to existing platform support code (RiscOS, unix, etc).
You can implement the replacement error() function in platform code, e.g. win32ErrorProc(char *), then: '#define error(str) win32ErrorProc(str)' in the platforms/win32/vm/config.h header file.
If this approach makes sense, I'll add it to VMMaker.
Note, I have not built a win32 VM with this, so mistakes are possible.
Cheers, Dave
vm-dev@lists.squeakfoundation.org