Code Monkey home page Code Monkey logo

scala-asm-legacy's Introduction

A fork of ASM for the Scala Compiler

This repository contains a fork of the ASM Java bytecode manipulation and analysis framework for the Scala compiler.

The package name is changed to scala.tools.asm. There is a small number of other patches applied to the original sources. Note that this fork only contains a subset of the source files of the ASM repository.

Longer-term, we plan to retire this fork and move to stock ASM. See issue #4 for details.

Keeping in Synch

When upgrading to a new ASM release, we always import the unmodified source files and re-apply all our patches on top. This makes it easy to see how our fork differs from the official release.

Current Version

The current sources are based on the following version of ASM (browse tags here):

Version 5.0.4, SVN r1779, tags/ASM_5_0_4

Previous ASM Upgrade PR: scala/scala-asm#5

Upgrading ASM

Start by deleting all source files and copy the ones from the latest ASM release.

The original ASM sources are in an SVN repository, which is mirrored here: https://github.com/lrytz/asm. You can use this mirror, your own git-svn mirror, or the original SVN repository to grab the sources of a new ASM version. A description how to work with the git-svn clone is here: https://github.com/lrytz/asm/issues/1.

Excluded Files (don't copy):

  • package.html files
  • org/objectweb/asm/commons, but keep CodeSizeEvaluator.java
  • org/objectweb/asm/optimizer
  • org/objectweb/asm/xml

Take a look at the previous PR that upgraded ASM (see above). Follow the upgrade procedure in the same way.

The re-packaging and cleanup commits can be applied using the following commands:

  • convert line endings (there are some CRLF)
    find src -name '*.java' | xargs dos2unix
  • change package clauses
    find src -name '*.java' | xargs sed -i '' -e 's/package org\.objectweb\.asm/package scala.tools.asm/'
  • update imports
    find src -name '*.java' | xargs sed -i '' -e 's/import org\.objectweb\.asm/import scala.tools.asm/'
  • update @links, @associates
    find src -name '*.java' | xargs sed -i '' -e 's/@link org\.objectweb\.asm/@link scala.tools.asm/'
    find src -name '*.java' | xargs sed -i '' -e 's/@associates org\.objectweb\.asm/@associates scala.tools.asm/'
  • remove trailing whitespace
    find src -name '*.java' | xargs sed -i '' -e 's/[ ]*$//'

Cherry-pick the actual changes that we have in our fork:

  • Include the commits labelled [asm-cherry-pick] in the previous upgrade PR
  • Include the changes to src that were added since the last upgrade, and label them [asm-cherry-pick]

Update the "Current Version" section of this README.

scala-asm-legacy's People

Contributors

lrytz avatar adriaanm avatar magarciaepfl avatar gkossakowski avatar heathermiller avatar jsuereth avatar paulp avatar mpociecha avatar

Watchers

 avatar James Cloos avatar  avatar

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.