Giter VIP home page Giter VIP logo

Comments (10)

bhelx avatar bhelx commented on August 27, 2024

Thanks for reporting!

Might be related: #405

There is work being done to split methods that are too large. In the meantime could you try: -XX:-DontCompileHugeMethods

That seemed to work for me when the compiled method was on the edge of being too big.

from chicory.

bhelx avatar bhelx commented on August 27, 2024

You could also try some running wasm-opt and other post processing optimizers on the resulting module. Some things may not be runnable until we can split methods though.

from chicory.

heroicefforts avatar heroicefforts commented on August 27, 2024

I think it's in the same category as #405. I interpreted the error as ASM saying, "I can't generate your class bytecode because it is invalid." It seems to me that this step would come before the decision to natively compile the methods (e.g. rendering the DontCompileHugeMethods JVM arg irrelevant), is that correct or am I misunderstanding?

I've tried wasm-opt, but the output wasms from various optimization levels are always unstable / crashy.

from chicory.

bhelx avatar bhelx commented on August 27, 2024

Yes, definitely a different error and earlier in the process. I'm unsure if the method splitting work would address this const pool issue. @electrum is working on this and he would know.

from chicory.

electrum avatar electrum commented on August 27, 2024

The -XX:-DontCompileHugeMethods flag is to allow the JVM JIT to work for large methods. The error here is that the WASM method is to large to convert to a single JVM method. So these aren't really related (other than that method splitting might prevent the need for that JVM flag).

from chicory.

electrum avatar electrum commented on August 27, 2024

If you could provide a reproduction, possibly based on #450, that would be helpful to ensure that the method splitting will work for this. What does your original method look like?

from chicory.

electrum avatar electrum commented on August 27, 2024

The constant pool issue might require splitting the methods across multiple classes, as you suggest. It's hard to say what might be required without seeing an example of the WASM input. I'm not sure if there is a good generic solution to this problem, as it is easy to construct pathological cases given the much larger WASM limits compared to JVM bytecode.

from chicory.

heroicefforts avatar heroicefforts commented on August 27, 2024

I can't supply the specific WASM, but I'll try to take a closer look at the class file that is attempting to be generated and try to get a grasp of what is going on there.

from chicory.

electrum avatar electrum commented on August 27, 2024

Seeing what is in the constant pool would be helpful.

from chicory.

electrum avatar electrum commented on August 27, 2024

@heroicefforts Could you send us a dump of the constant pool? You could obfuscate it if necessary.

from chicory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.