Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • asm asm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • asmasm
  • asmasm
  • Issues
  • #317837
Closed
Open
Issue created Jun 29, 2018 by dan sutton@dpsutton

Apparent regression in GeneratorAdapter.java `cast` function

Hi. The Clojure compiler uses your library to emit asm and we recently upgraded and have come across a change in behavior that I think might be erroneous.

Previously, the compiler would emit a call to cast with from=Type.BYTE and to=TYPE.INT. This behavior is (I believe) a no-op and it would fall through the if-else structures as seen at https://gitlab.ow2.org/asm/asm/blob/d493987d57b981b21ba97d4226ee7b94b0dc8406/src/org/objectweb/asm/commons/GeneratorAdapter.java#L714.

However, this code now throws an error if it falls through the final if-else block as seen here: https://gitlab.ow2.org/asm/asm/blob/master/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java#L785. The commit that changed this had the message "Reformat the source code with google-java-format 1.3". and changed 262 files.

The result is that now a no-op cast needs to be guarded in the Clojure compiler. This isn't the end of the world I just wanted to see if this was an intentional change. My suspicion is that this change happened automatically and perhaps unintentionally.

More info can be found on the ticket for Clojure at https://dev.clojure.org/jira/browse/CLJ-2367

Thanks so much, Dan Sutton

Links: Previous version of GeneratorAdapter.java: https://gitlab.ow2.org/asm/asm/blob/d493987d57b981b21ba97d4226ee7b94b0dc8406/src/org/objectweb/asm/commons/GeneratorAdapter.java#L714

Current version: https://gitlab.ow2.org/asm/asm/blob/master/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java#L742

Commit that changed it: d493987d

Clojure ticket: https://dev.clojure.org/jira/browse/CLJ-2367

Assignee
Assign to
Time tracking