self error: 'A block compiles more than 1K bytes of code'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

self error: 'A block compiles more than 1K bytes of code'

Rob Withers
In ParseNode>>#emitLong:code:on:, this error is being signalled for me and my new transform code.  I think this is emitting a long jump.  Is 1024 the limit a long jump can make and so this represents a hard error?  Would it be possible to code a bytecode (say 127) to use 2 extra bytes for an extraLongJump instruction to get around this?
 


Reply | Threaded
Open this post in threaded view
|

Re: self error: 'A block compiles more than 1K bytes of code'

Randal L. Schwartz
>>>>> "Rob" == Rob Withers <[hidden email]> writes:

Rob> In ParseNode>>#emitLong:code:on:, this error is being signalled for me
Rob> and my new transform code.  I think this is emitting a long jump.  Is
Rob> 1024 the limit a long jump can make and so this represents a hard error?
Rob> Would it be possible to code a bytecode (say 127) to use 2 extra bytes
Rob> for an extraLongJump instruction to get around this?

Is it possible that the warning is there for a good reason, as in perhaps you
should be refactoring the method so that it doesn't have so much source code?

The more I edit long methods, the more I realize how cool short methods
are. :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!