[erlang-questions] Compile Question

Michael Schmidt Michael.K.Schmidt@REDACTED
Tue Dec 4 20:18:47 CET 2018


Thanks!  I think you might be onto something.  We use a lot of funs in our resolve functions.  Is the limit per-function?  Or per-function-head?

From: Fred Hebert [mailto:mononcqc@REDACTED]
Sent: Tuesday, December 4, 2018 1:06 PM
To: Michael Schmidt <Michael.K.Schmidt@REDACTED>
Cc: Erlang <erlang-questions@REDACTED>
Subject: Re: [erlang-questions] Compile Question


[External email: Use caution with links and attachments]

________________________________



On Tue, Dec 4, 2018 at 1:44 PM Michael Schmidt <Michael.K.Schmidt@REDACTED<mailto:Michael.K.Schmidt@REDACTED>> wrote:
I have been chasing a compile error:
** (CompileError) elixir_compiler_1: function '__MODULE__'/1+17:
  An implementation limit was reached.
  Try reducing the complexity of this function.

  Instruction: {move,{x,0},{y,1555}}
...
Poking around, there is indeed a list of 776 items that generates 2 function defs each, which gives us a final AST list of approx 1552.  I assume this is related to the {y,1555} in Error.

Can lists:each() not handle lists longer than 1024?  What am I missing?



The limit is on the number of funs that can be exported by a single function. Each function gets an id like `#Fun<mod.9.54861464>` where the second integer (9) is a counter of the number of anonymous functions/closures within a single function. You probably overflow that counter.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20181204/cc6a7b5e/attachment.htm>


More information about the erlang-questions mailing list