INEO (stands for EO Inliner) is the tool to inline EO objects in order to get a faster and lighter EO code.
To run the plugin you need at least Maven 3.1.+ and Java 8+. The plugin provides two optimizations:
The optimization scans the directory and checks if there's any.xmir
file where the next code occurs:
<o base=".new">
<o base="B"/>
<o base=".new">
<o base="A"/>
<o base="int" data="bytes">
<!-- BYTES HERE -->
</o>
</o>
</o>
The plugin adds new fused BA.xmir
file into the directory and replaces the xmir
above with the
next one:
<o base=".new">
<o base="BA"/>
<o base="int" data="bytes">
<!-- BYTES HERE -->
</o>
</o>
The optimization scans the directory and checks if there's any.xmir
file where the next code occurs:
<o base=".get">
<o base=".new">
<o base="A"/>
<o base="int" data="bytes">
<!-- BYTES HERE -->
</o>
</o>
</o>
The plugin adds new staticized StaticizedA.xmir
file into the directory and replaces the xmir
above with the
next one:
<o base=".get">
<o base=".new">
<o base="StaticizedA"/>
<o base="int" data="bytes">
<!-- BYTES HERE -->
</o>
</o>
</o>
Meantime StaticizedA
will use static method instead of instance one.
Objects A
and B
must be from the same package and have the same prefix.
The optimization scans the directory and
- replaces
org/eolang/benchmark/Main.xmir
with this Main.xmir - puts
Factorialized.xmir
nearMain.xmir
Here you may find a working example that uses the plugin with other optimization tools, like JEO and OPEO
You can run the plugin from the Maven lifecycle by adding the following
configuration to your pom.xml
file:
<build>
<plugins>
<plugin>
<groupId>org.eolang</groupId>
<artifactId>ineo-maven-plugin</artifactId>
<version>0.2.0</version>
<executions>
<execution>
<id>fuse</id>
<phase>generate-sources</phase>
<goals>
<goal>fuse</goal>
</goals>
</execution>
<execution>
<id>staticize</id>
<phase>generate-sources</phase>
<goals>
<goal>fuse</goal>
</goals>
</execution>
<execution>
<id>factorialize</id>
<phase>generate-sources</phase>
<goals>
<goal>factorialize</goal>
</goals>
<configuration>
<sourcesDir>SOURCES DIRECTORY</sourcesDir>
<outputDir>OUTPUT DIRECTORY</outputDir>
<main>PATH TO Main.xmir</main>
<factorial>PATH TO Factorial.xmir</factorial>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
More details about plugin usage you can find in our Maven site.
Fork repository, make changes, then send us
a pull request.
We will review your changes and apply them to the master
branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
$ mvn clean install -Pqulice
You will need Maven 3.3+ and Java 8+ installed.