Re: [pypy-dev] Number of constants in a jitted rpython interpreter

2011-09-22 Thread Zariko Taba
>>> There is a limit of 256 constants *per function*. If you need more, maybe your functions are too complex :-). Great ! Thanks for the advice ! I was generating a function from meta data, so I didn't care about size of the generated code. When splitting the function, error disappears. :) Thanks

Re: [pypy-dev] Number of constants in a jitted rpython interpreter

2011-09-22 Thread Carl Friedrich Bolz
On 09/22/2011 03:01 PM, Zariko Taba wrote: Hi pypy ! I'm still exploring rpython and I face a problem when adding a jit to an interpreter. In Assembler class (pypy.jit.codewriter.assembler), in emit_const method, it seems to be assumed that there is no more than 256 constants. (constant seems to

Re: [pypy-dev] Number of constants in a jitted rpython interpreter

2011-09-22 Thread Amaury Forgeot d'Arc
2011/9/22 Zariko Taba > [translation:ERROR] ValueError: character code not in range(256) > > With this snippet of code : > > self.constants_dict[key] = 256 - len(constants) > > If len(constants) is 257, > then self.constants_dict[key] is -1 > and chr(-1) raise the ValueError. > > I attached a (r

[pypy-dev] Number of constants in a jitted rpython interpreter

2011-09-22 Thread Zariko Taba
Hi pypy ! I'm still exploring rpython and I face a problem when adding a jit to an interpreter. In Assembler class (pypy.jit.codewriter.assembler), in emit_const method, it seems to be assumed that there is no more than 256 constants. (constant seems to be accessed in a array with a 1 byte index).